public class PwScalarField extends PjWorkshop
Modifier and Type | Field and Description |
---|---|
java.lang.String[] |
m_scalarFieldName |
static int |
SCALAR_DIFF_PRINCIPAL |
static int |
SCALAR_EXTREMALITY |
static int |
SCALAR_GAUSS_CURVATURE |
static int |
SCALAR_GAUSS_VIA_PRINCIPAL |
static int |
SCALAR_IMPORTED_FUNCTION |
static int |
SCALAR_MAX_PRINCIPAL |
static int |
SCALAR_MAX_PRINCIPAL_ABS |
static int |
SCALAR_MEAN_CURVATURE |
static int |
SCALAR_MIN_PRINCIPAL |
static int |
SCALAR_MIN_PRINCIPAL_ABS |
static int |
SCALAR_T_HEIGHT |
static int |
SCALAR_TOTAL_CURVATURE |
static int |
SCALAR_X_HEIGHT |
static int |
SCALAR_Y_HEIGHT |
static int |
SCALAR_Z_HEIGHT |
HAS_BOUNDARY_PANEL, HAS_CONFIG_PANEL, HAS_INFO_PANEL, HAS_LABEL_PANEL, HAS_MATERIAL_PANEL, HAS_TEXTURE_PANEL, HAS_VECTOR_PANEL, INSPECTOR_INFO, INSPECTOR_INFO_EXT, IS_DELETED, IS_FIXED, IS_FOCUSSED, IS_PICKED, IS_SELECTED, IS_USED, NUM_TAGS
MODE_BUG, MODE_STANDARD, MODE_VALIDATE
Constructor and Description |
---|
PwScalarField()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static PgVectorField |
array2ScalarField(PgPointSet domain,
double[] func,
PgVectorField scalarField)
Method converts a function given as an array of doubles into a scalar field
(PgVectorField with dimension of vectors equal one) on the specified domain.
|
void |
cancel()
Cancel operation of this workshop by resetting the assigned geometry,
and finally close this workshop.
|
static java.awt.Color |
colorMap(double d)
Maps (0,1) onto a Color, starting from white to red.
|
static java.awt.Color |
colorMapGray(double d)
Maps (0,1) onto a Color using only gray levels.
|
PgVectorField |
computeGradient(PgVectorField gradient)
Method computes the gradient of the actual scalar field.
|
boolean |
computeScalar()
Compute color of surface and vertices depending on current color criteria.
|
boolean |
computeScalar(PgElementSet geom,
int type)
Compute color of surface and vertices depending on current color criteria.
|
boolean |
getAdjustColoring()
Get information, whether color sliders are adjusted for new scalar fields.
|
double |
getColorMax()
Get maximal color value.
|
double |
getColorMin()
Get minimal color value.
|
java.lang.String |
getScalarName(int type)
Get name of given scalar field type.
|
int |
getScalarType()
Get type of current scalar field.
|
void |
init()
Initialize and reset project, stops the running animation if any.
|
boolean |
isShowingOnlyGrayLevels(boolean gl)
The workshop and can assign colors to the surface according to
the value of the scalar field.
|
void |
reset()
Reset workshop and geometry to original state.
|
static double[] |
scalarField2Array(PgVectorField scalarField,
double[] func)
Method converts a scalar field into an array of doubles.
|
void |
setAdjustColoring(boolean flag)
Indicate whether to adjust the color sliders when computing a new scalar field.
|
void |
setColorMax(double value)
Sets maximal color value.
|
void |
setColorMin(double value)
Sets minimal color value.
|
void |
setGeometry(PgElementSet geom) |
void |
setScalarType(int type)
Set type of current scalar field.
|
void |
showOnlyGrayLevels(boolean gl)
The workshop and can assign colors to the surface according to
the value of the scalar field.
|
boolean |
update(java.lang.Object event)
Each time another geometry is loaded.
|
close, getDisplay, getDisplays, getGeometry, getMode, getSavedGeometry, getViewer, isModal, isStandalone, ok, openDialog, removeGeometry, setDisplay, setDisplays, setGeometry, setModal, setMode, setStandalone, setViewer
addInspector, addUpdateListener, assureInspector, clearTag, clone, clone, clone, copy, getFather, getInfoPanel, getInspector, getName, getNumObjects, getSymbol, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, newInspector, newInspector, removeInspector, removeInspector, removeUpdateListener, setName, setParent, setSymbol, setTag, toString, updatePanels
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getFather, getName, setParent
public final java.lang.String[] m_scalarFieldName
public static final int SCALAR_X_HEIGHT
public static final int SCALAR_Y_HEIGHT
public static final int SCALAR_Z_HEIGHT
public static final int SCALAR_T_HEIGHT
public static final int SCALAR_GAUSS_CURVATURE
public static final int SCALAR_MEAN_CURVATURE
public static final int SCALAR_MAX_PRINCIPAL
public static final int SCALAR_MIN_PRINCIPAL
public static final int SCALAR_MAX_PRINCIPAL_ABS
public static final int SCALAR_MIN_PRINCIPAL_ABS
public static final int SCALAR_DIFF_PRINCIPAL
public static final int SCALAR_TOTAL_CURVATURE
public static final int SCALAR_GAUSS_VIA_PRINCIPAL
public static final int SCALAR_IMPORTED_FUNCTION
public static final int SCALAR_EXTREMALITY
public void init()
PjWorkshop
init
in class PjWorkshop
public void reset()
reset
in class PjWorkshop
public boolean update(java.lang.Object event)
update
in interface PsUpdateIf
update
in class PjWorkshop
event
- sender of this update.PsObject.setParent(PsUpdateIf)
,
PsObject.getFather()
,
PsObject.addUpdateListener(PsUpdateIf)
public void cancel()
PjWorkshop
If necessary, the duplicate of the original geometry is restored into the geometry. The update method of the geometry is called.
cancel
in class PjWorkshop
public void showOnlyGrayLevels(boolean gl)
public boolean isShowingOnlyGrayLevels(boolean gl)
public void setColorMin(double value)
value
- the color value to be set.public double getColorMin()
public void setColorMax(double value)
value
- the color value to be set.public double getColorMax()
public void setGeometry(PgElementSet geom)
public int getScalarType()
public void setScalarType(int type)
public void setAdjustColoring(boolean flag)
public boolean getAdjustColoring()
public java.lang.String getScalarName(int type)
public boolean computeScalar()
public boolean computeScalar(PgElementSet geom, int type)
public PgVectorField computeGradient(PgVectorField gradient)
jv.geom.PgVectorField.computeGradient(jv.geom.PgElementSet, PdVector[], int)
.public static PgVectorField array2ScalarField(PgPointSet domain, double[] func, PgVectorField scalarField)
domain
- domain of the function resp. scalar fieldfunc
- double array that specifies a function value for each vertex of the domainscalarField
- scalar field that will be filled, this argument can be nullpublic static double[] scalarField2Array(PgVectorField scalarField, double[] func)
func
- double array that will be filled, this argument can be nullscalarField
- scalar field that specifies a function value for each vertex of its domainpublic static java.awt.Color colorMapGray(double d)
public static java.awt.Color colorMap(double d)
"