public abstract class ScalarFemField extends FemFieldComp implements RenderableComponent, ScalarFieldComponent
Modifier and Type | Class and Description |
---|---|
static class |
ScalarFemField.Visualization |
ModelComponent.NavpanelVisibility
Modifier and Type | Field and Description |
---|---|
static Renderer.ColorInterpolation |
DEFAULT_COLOR_INTERPOLATION |
static ScalarFemField.Visualization |
DEFAULT_VISUALIZATION |
static PropertyList |
myProps |
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames
TRANSPARENT, TWO_DIMENSIONAL
Constructor and Description |
---|
ScalarFemField() |
ScalarFemField(FemModel3d fem) |
ScalarFemField(FemModel3d fem,
double defaultValue) |
Modifier and Type | Method and Description |
---|---|
void |
addRenderMeshComp(FemMesh mcomp) |
abstract void |
clearAllValues()
Clear all values defined for the features (e.g., nodes, elements)
associated with this field.
|
void |
clearRenderMeshComps() |
static RenderProps |
createDefaultRenderProps() |
RenderProps |
createRenderProps()
Factory method to create render properties appropriate to this object.
|
boolean |
equals(ScalarFemField field)
Returns
true if this field is functionally equal to another field. |
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by
this object.
|
Renderer.ColorInterpolation |
getColorInterpolation() |
ColorMapBase |
getColorMap() |
double |
getDefaultValue()
Returns the default value for this field.
|
FemMesh |
getRenderMeshComp(int idx) |
ScalarRange |
getRenderRange() |
void |
getSelection(java.util.LinkedList<java.lang.Object> list,
int qid)
Append to
list the component (or components) associated with
the qid -th selection query issued by this component's render
method. |
void |
getSoftReferences(java.util.List<ModelComponent> refs)
Appends all soft references for this component to a list.
|
double |
getValue(MeshFieldPoint fp)
Returns the value of the this field at a specified mesh field point.
|
abstract double |
getValue(Point3d pos)
Returns the value of the this field at a specified spatial position.
|
DoubleInterval |
getValueRange()
Returns the range of all values in this field, including
the default value.
|
ScalarFemField.Visualization |
getVisualization() |
Range |
getVisualizationRange() |
int |
numRenderMeshComps() |
int |
numSelectionQueriesNeeded()
If this selectable manages its own selection (by issuing selection
queries within its
render method), then this method should
return the maximum number of selection queries that will be
required. |
void |
prerender(RenderList list)
Called prior to rendering to allow this object to update the internal
state required for rendering (such as by caching rendering coordinates).
|
boolean |
removeRenderMeshComp(FemMesh mcomp) |
void |
render(Renderer renderer,
int flags)
Render this object using the functionality of the supplied
Renderer . |
void |
setColorInterpolation(Renderer.ColorInterpolation interp) |
void |
setColorMap(ColorMapBase map) |
void |
setDefaultValue(double value)
Sets the default value for this field.
|
void |
setRenderRange(ScalarRange range) |
void |
setVisualization(ScalarFemField.Visualization vis) |
void |
updateReferences(boolean undo,
java.util.Deque<java.lang.Object> undoInfo)
May be called by the system if any of the soft references for
this component are removed from the the component hierarchy.
|
clearCacheIfNecessary, equals, getFemModel, getRenderHints, getRenderProps, isSelectable, setRenderProps, updateBounds
checkFlag, checkName, checkNameUniqueness, clearFlag, clone, connectToHierarchy, copy, createTempFlag, disconnectFromHierarchy, getChildren, getGrandParent, getHardReferences, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, hasChildren, hasState, isFixed, isMarked, isScanning, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, postscan, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, scan, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setScanning, setSelected, setWritable, write
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isSelectable
getRenderHints, updateBounds
getRenderProps, setRenderProps
getValue
clearCacheIfNecessary
connectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, setWritable
getProperty
getChildren, hasChildren
postscan
isWritable, write
public static final Renderer.ColorInterpolation DEFAULT_COLOR_INTERPOLATION
public static ScalarFemField.Visualization DEFAULT_VISUALIZATION
public static PropertyList myProps
public ScalarFemField()
public ScalarFemField(FemModel3d fem)
public ScalarFemField(FemModel3d fem, double defaultValue)
public PropertyList getAllPropertyInfo()
HasProperties
getAllPropertyInfo
in interface HasProperties
getAllPropertyInfo
in class ModelComponentBase
public ScalarFemField.Visualization getVisualization()
public void setVisualization(ScalarFemField.Visualization vis)
public Range getVisualizationRange()
public Renderer.ColorInterpolation getColorInterpolation()
public void setColorInterpolation(Renderer.ColorInterpolation interp)
public ColorMapBase getColorMap()
public void setColorMap(ColorMapBase map)
public void setRenderRange(ScalarRange range)
public ScalarRange getRenderRange()
public void addRenderMeshComp(FemMesh mcomp)
public boolean removeRenderMeshComp(FemMesh mcomp)
public FemMesh getRenderMeshComp(int idx)
public int numRenderMeshComps()
public void clearRenderMeshComps()
public double getValue(MeshFieldPoint fp)
getValue
in interface ScalarFieldComponent
fp
- point at which value is requestedpublic abstract double getValue(Point3d pos)
getValue
in interface ScalarFieldComponent
pos
- position at which value is requestedpublic DoubleInterval getValueRange()
public abstract void clearAllValues()
defaultValue
.public double getDefaultValue()
setDefaultValue(double)
.public void setDefaultValue(double value)
value
- new default value for this fieldpublic boolean equals(ScalarFemField field)
true
if this field is functionally equal to another field.
Intended mainly for testing and debugging.public RenderProps createRenderProps()
HasRenderProps
createRenderProps
in interface HasRenderProps
public static RenderProps createDefaultRenderProps()
public void prerender(RenderList list)
IsRenderable
list.addIfVisible (obj);
for each of the objects in question.prerender
in interface IsRenderable
list
- list of objects to be renderedpublic void render(Renderer renderer, int flags)
IsRenderable
Renderer
.render
in interface IsRenderable
renderer
- provides the functionality used to perform the rendering.flags
- flags that may be used to control different
aspects of the rendering. Flags are defined in Renderer
and currently include
Renderer.HIGHLIGHT
and
Renderer.SORT_FACES
.public int numSelectionQueriesNeeded()
IsSelectable
render
method), then this method should
return the maximum number of selection queries that will be
required. Otherwise, this method should return -1.numSelectionQueriesNeeded
in interface IsSelectable
numSelectionQueriesNeeded
in class FemFieldComp
public void getSelection(java.util.LinkedList<java.lang.Object> list, int qid)
IsSelectable
list
the component (or components) associated with
the qid
-th selection query issued by this component's render
method. This will only be called if this component manages its own
selection (i.e., the number nums
returned by IsSelectable.numSelectionQueriesNeeded()
is positive), and qid
will in
turn be a number between 0 and nums
-1.getSelection
in interface IsSelectable
getSelection
in class FemFieldComp
list
- selected objects are appended to the end of this listqid
- index of the selection querypublic void getSoftReferences(java.util.List<ModelComponent> refs)
updateReferences()
method will
be called to update its internal reference information.getSoftReferences
in interface ModelComponent
getSoftReferences
in class ModelComponentBase
refs
- list to which soft references are appendedpublic void updateReferences(boolean undo, java.util.Deque<java.lang.Object> undoInfo)
undo
equal to false
,
this component should then examine its soft references and
use ComponentUtils.areConnected()
to determine which of them have been disconnected from the hierarchy.
Disconnected references should be removed, and sufficient information
should be appended to undoInfo
to allow this update
to be undone if this method is called later with undo
equal to true
. When undoing an update, the undo
information should be removed from the front of undoInfo
.updateReferences
in interface ModelComponent
updateReferences
in class ModelComponentBase
undo
- if true
, indicates that the most
recent reference update should be undone, using the supplied
undo information.undoInfo
- if undo
is false
, should be used
to store information allowing the reference update to be undone.
Otherwise, if undo
is true
, then this
supplied information to undo the most recent update.