public class ScalarFaceField extends ScalarMeshField
ScalarMeshField.Visualization
ModelComponent.NavpanelVisibility
DEFAULT_COLOR_INTERPOLATION, DEFAULT_VISUALIZATION, myProps
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames
TRANSPARENT, TWO_DIMENSIONAL
Constructor and Description |
---|
ScalarFaceField()
This constructor should not be called by applications, unless
ModelComponentBase.scan(maspack.util.ReaderTokenizer, java.lang.Object) is called immediately after. |
ScalarFaceField(MeshComponent mcomp)
Constructs a field for a given mesh, with a default value of 0.
|
ScalarFaceField(MeshComponent mcomp,
double defaultValue)
Constructs a field for a given mesh and default value.
|
ScalarFaceField(java.lang.String name,
MeshComponent mcomp)
Constructs a named field for a given mesh, with a default value of 0.
|
ScalarFaceField(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(Face face)
Clears the value at a given face.
|
double |
getValue(Face face)
Returns the value at a face.
|
double |
getValue(int fidx)
Returns the value at the face 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.
|
Range |
getVisualizationRange() |
boolean |
isValueSet(Face face)
Queries whether a value has been seen at a given face.
|
void |
postscan(java.util.Deque<ScanToken> tokens,
CompositeComponent ancestor)
Performs any required post-scanning for this component.
|
void |
setValue(Face face,
double value)
Sets the value at a face.
|
createDefaultRenderProps, createRenderProps, getAllPropertyInfo, getColorInterpolation, getColorMap, getDefaultValue, getRenderRange, getValue, getValueRange, getVisualization, prerender, render, setColorInterpolation, setColorMap, setDefaultValue, setRenderRange, setVisualization
clearCacheIfNecessary, createFieldPoint, getHardReferences, getMesh, getMeshComp, getRenderHints, getRenderProps, getSelection, isSelectable, numSelectionQueriesNeeded, setRenderProps, updateBounds
checkFlag, 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, write
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSelection, isSelectable, numSelectionQueriesNeeded
getRenderHints, updateBounds
getRenderProps, setRenderProps
clearCacheIfNecessary
connectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, setWritable, updateReferences
getProperty
getChildren, hasChildren
isWritable, write
public ScalarFaceField()
ModelComponentBase.scan(maspack.util.ReaderTokenizer, java.lang.Object)
is called immediately after.public ScalarFaceField(MeshComponent mcomp)
PolygonalMesh
.mcomp
- component containing the mesh associated with the fieldpublic ScalarFaceField(MeshComponent mcomp, double defaultValue)
PolygonalMesh
.mcomp
- component containing the mesh associated with the fielddefaultValue
- default value for faces which don't have
explicitly set valuespublic ScalarFaceField(java.lang.String name, MeshComponent mcomp)
PolygonalMesh
.name
- name of the fieldmcomp
- component containing the mesh associated with the fieldpublic ScalarFaceField(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 faces which don't have
explicitly set valuespublic Range getVisualizationRange()
getVisualizationRange
in class ScalarMeshField
public double getValue(int fidx)
fidx
- face indexpublic double getValue(Face face)
face
- face for which the value is requestedpublic double getValue(Point3d pos)
getValue
in interface ScalarFieldComponent
getValue
in class ScalarMeshField
pos
- position at which value is requestedpublic double getValue(MeshFieldPoint fp)
fp
- point at which value is requestedpublic void setValue(Face face, double value)
face
- face for which the value is to be setvalue
- new value for the facepublic boolean isValueSet(Face face)
face
- face being queriedtrue
if a value has been set at the facepublic void clearValue(Face face)
face
- face whose value is to be clearedpublic void clearAllValues()
defaultValue
.clearAllValues
in class ScalarMeshField
public 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 PostScannable
postscan
in class ModelComponentBase
tokens
- 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)