public abstract class ScalarFemField extends FemFieldComp implements RenderableComponent, ScalarFieldComponent
| Modifier and Type | Class and Description |
|---|---|
static class |
ScalarFemField.Visualization |
ModelComponent.FilePathSaveType, 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, useCompactPathNamesTRANSPARENT, 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, updateBoundscheckFlag, 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, writeequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisSelectablegetRenderHints, updateBoundsgetRenderProps, setRenderPropsgetValueclearCacheIfNecessaryconnectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, setWritablegetPropertygetChildren, hasChildrenpostscanisWritable, writepublic 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()
HasPropertiesgetAllPropertyInfo in interface HasPropertiesgetAllPropertyInfo in class ModelComponentBasepublic 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 ScalarFieldComponentfp - point at which value is requestedpublic abstract double getValue(Point3d pos)
getValue in interface ScalarFieldComponentpos - 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()
HasRenderPropscreateRenderProps in interface HasRenderPropspublic static RenderProps createDefaultRenderProps()
public void prerender(RenderList list)
IsRenderablelist.addIfVisible (obj);
for each of the objects in question.prerender in interface IsRenderablelist - list of objects to be renderedpublic void render(Renderer renderer, int flags)
IsRenderableRenderer.render in interface IsRenderablerenderer - 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()
IsSelectablerender 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 IsSelectablenumSelectionQueriesNeeded in class FemFieldComppublic void getSelection(java.util.LinkedList<java.lang.Object> list,
int qid)
IsSelectablelist 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 IsSelectablegetSelection in class FemFieldComplist - 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 ModelComponentgetSoftReferences in class ModelComponentBaserefs - 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 ModelComponentupdateReferences in class ModelComponentBaseundo - 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.