public class ScalarVertexField extends ScalarMeshField
ScalarMeshField.VisualizationModelComponent.FilePathSaveType, ModelComponent.NavpanelVisibilityDEFAULT_COLOR_INTERPOLATION, DEFAULT_VISUALIZATION, myPropsenforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNamesTRANSPARENT, TWO_DIMENSIONAL| Constructor and Description |
|---|
ScalarVertexField()
This constructor should not be called by applications, unless
ModelComponentBase.scan(maspack.util.ReaderTokenizer, java.lang.Object) is called immediately after. |
ScalarVertexField(MeshComponent mcomp)
Constructs a field for a given mesh, with a default value of 0.
|
ScalarVertexField(MeshComponent mcomp,
double defaultValue)
Constructs a field for a given mesh and default value.
|
ScalarVertexField(java.lang.String name,
MeshComponent mcomp)
Constructs a named field for a given mesh, with a default value of 0.
|
ScalarVertexField(java.lang.String name,
MeshComponent mcomp,
double defaultValue)
Constructs a named field for a given mesh and default value.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearAllValues()
Clear all values defined for the features (e.g., vertices, faces)
associated with this field.
|
void |
clearValue(Vertex3d vtx)
Clears the value at a given vertex.
|
double |
getValue(int vidx)
Returns the value at the vertex specified by a given index.
|
double |
getValue(MeshFieldPoint fp)
Returns the value of the this field at a specified mesh field point.
|
double |
getValue(Point3d pos)
Returns the value of the this field at a specified spatial position.
|
double |
getValue(Vertex3d vtx)
Returns the value at a vertex.
|
Range |
getVisualizationRange() |
boolean |
isValueSet(Vertex3d vtx)
Queries whether a value has been seen at a given vertex.
|
void |
postscan(java.util.Deque<ScanToken> tokens,
CompositeComponent ancestor)
Performs any required post-scanning for this component.
|
void |
setValue(Vertex3d vtx,
double value)
Sets the value at a vertex.
|
createDefaultRenderProps, createRenderProps, getAllPropertyInfo, getColorInterpolation, getColorMap, getDefaultValue, getRenderRange, getValue, getValueRange, getVisualization, prerender, render, setColorInterpolation, setColorMap, setDefaultValue, setRenderRange, setVisualizationclearCacheIfNecessary, createFieldPoint, getHardReferences, getMesh, getMeshComp, getRenderHints, getRenderProps, getSelection, isSelectable, numSelectionQueriesNeeded, setRenderProps, updateBoundscheckFlag, checkName, checkNameUniqueness, clearFlag, clone, connectToHierarchy, copy, createTempFlag, disconnectFromHierarchy, getChildren, getGrandParent, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, hasChildren, hasState, isFixed, isMarked, isScanning, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, scan, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setScanning, setSelected, setWritable, updateReferences, writeequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetSelection, isSelectable, numSelectionQueriesNeededgetRenderHints, updateBoundsgetRenderProps, setRenderPropsclearCacheIfNecessaryconnectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, setWritable, updateReferencesgetPropertygetChildren, hasChildrenisWritable, writepublic ScalarVertexField()
ModelComponentBase.scan(maspack.util.ReaderTokenizer, java.lang.Object) is called immediately after.public ScalarVertexField(MeshComponent mcomp)
PolygonalMesh.mcomp - component containing the mesh associated with the fieldpublic ScalarVertexField(MeshComponent mcomp, double defaultValue)
PolygonalMesh.mcomp - component containing the mesh associated with the fielddefaultValue - default value for vertices which don't have
explicitly set valuespublic ScalarVertexField(java.lang.String name,
MeshComponent mcomp)
PolygonalMesh.name - name of the fieldmcomp - component containing the mesh associated with the fieldpublic ScalarVertexField(java.lang.String name,
MeshComponent mcomp,
double defaultValue)
PolygonalMesh.name - name of the fieldmcomp - component containing the mesh associated with the fielddefaultValue - default value for vertices which don't have
explicitly set valuespublic Range getVisualizationRange()
getVisualizationRange in class ScalarMeshFieldpublic double getValue(int vidx)
vidx - vertex indexpublic double getValue(Vertex3d vtx)
vtx - vertex for which the value is requestedpublic double getValue(Point3d pos)
getValue in interface ScalarFieldComponentgetValue in class ScalarMeshFieldpos - position at which value is requestedpublic double getValue(MeshFieldPoint fp)
fp - point at which value is requestedpublic void setValue(Vertex3d vtx, double value)
vtx - vertex for which the value is to be setvalue - new value for the vertexpublic boolean isValueSet(Vertex3d vtx)
vtx - vertex being queriedtrue if a value has been set at the vertexpublic void clearValue(Vertex3d vtx)
vtx - vertex whose value is to be clearedpublic void clearAllValues()
defaultValue.clearAllValues in class ScalarMeshFieldpublic void postscan(java.util.Deque<ScanToken> tokens, CompositeComponent ancestor) throws java.io.IOException
scan() method and stored in the token queue.
The most common use of this method is to resolve the paths
of component references, which may not have been created
at the time of the initial scan() call.postscan in interface PostScannablepostscan in class ModelComponentBasetokens - token information that was stored during
scan().ancestor - ancestor component with respect to which
reference component paths are defined.java.io.IOException - if an error is encountered (such as a reference to a
non-existent component)