public class VectorFaceField<T extends VectorObject<T>> extends VectorMeshField<T>
T
, which must be an instance of VectorObject
.ModelComponent.NavpanelVisibility
myProps
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames
TRANSPARENT, TWO_DIMENSIONAL
Constructor and Description |
---|
VectorFaceField(java.lang.Class<T> type)
This constructor should not be called by applications, unless
ModelComponentBase.scan(maspack.util.ReaderTokenizer, java.lang.Object) is called immediately after. |
VectorFaceField(java.lang.Class<T> type,
MeshComponent mcomp)
Constructs a field for a given mesh, with a default value of 0.
|
VectorFaceField(java.lang.Class<T> type,
MeshComponent mcomp,
T defaultValue)
Constructs a field for a given mesh and default value.
|
VectorFaceField(java.lang.String name,
java.lang.Class<T> type,
MeshComponent mcomp)
Constructs a named field for a given mesh, with a default value of 0.
|
VectorFaceField(java.lang.String name,
java.lang.Class<T> type,
MeshComponent mcomp,
T 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.
|
T |
getValue(Face face)
Returns the value at a face.
|
T |
getValue(int fidx)
Returns the value at the face specified by a given index.
|
T |
getValue(MeshFieldPoint fp)
Returns the value of the this field at a specified mesh field point.
|
T |
getValue(Point3d pos)
Returns the value of the this field at a specified spatial position.
|
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,
T value)
Sets the value at a face.
|
createDefaultRenderProps, createRenderProps, createTypeInstance, getAllPropertyInfo, getDefaultValue, getParameterType, getRenderScale, getValue, hasParameterizedType, prerender, render, setDefaultValue, setRenderScale
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
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
getSelection, isSelectable, numSelectionQueriesNeeded
getRenderHints, updateBounds
getRenderProps, setRenderProps
public VectorFaceField(java.lang.Class<T> type)
ModelComponentBase.scan(maspack.util.ReaderTokenizer, java.lang.Object)
is called immediately after.public VectorFaceField(java.lang.Class<T> type, MeshComponent mcomp)
PolygonalMesh
.type
- class type of the VectorObject
describing the field's
valuesmcomp
- component containing the mesh associated with the fieldpublic VectorFaceField(java.lang.Class<T> type, MeshComponent mcomp, T defaultValue)
PolygonalMesh
.type
- class type of the VectorObject
describing the field's
valuesmcomp
- component containing the mesh associated with the fielddefaultValue
- default value for faces which don't have
explicitly set valuespublic VectorFaceField(java.lang.String name, java.lang.Class<T> type, MeshComponent mcomp)
PolygonalMesh
.name
- name of the fieldtype
- class type of the VectorObject
describing the field's
valuesmcomp
- component containing the mesh associated with the fieldpublic VectorFaceField(java.lang.String name, java.lang.Class<T> type, MeshComponent mcomp, T defaultValue)
PolygonalMesh
.name
- name of the fieldtype
- class type of the VectorObject
describing the field's
valuesmcomp
- component containing the mesh associated with the fielddefaultValue
- default value for faces which don't have
explicitly set valuespublic T getValue(int fidx)
fidx
- face indexpublic T getValue(Face face)
face
- face for which the value is requestedpublic T getValue(Point3d pos)
getValue
in interface VectorFieldComponent<T extends VectorObject<T>>
getValue
in class VectorMeshField<T extends VectorObject<T>>
pos
- position at which value is requestedpublic T getValue(MeshFieldPoint fp)
fp
- point at which value is requestedpublic void setValue(Face face, T 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 VectorMeshField<T extends VectorObject<T>>
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)