public abstract class FemElement extends RenderableComponentBase implements ScalableUnits, CopyableComponent, PropertyChangeListener
ModelComponent.NavpanelVisibility| Modifier and Type | Field and Description |
|---|---|
static PropertyList |
myProps |
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNamesCOPY_REFERENCESTRANSPARENT, TWO_DIMENSIONAL| Constructor and Description |
|---|
FemElement() |
| Modifier and Type | Method and Description |
|---|---|
abstract double |
computeVolumes()
Computes the volume and partial volumes associated with this element.
|
boolean |
containsNode(FemNode p) |
FemElement |
copy(int flags,
java.util.Map<ModelComponent,ModelComponent> copyMap)
Create a copy of this component.
|
RenderProps |
createRenderProps()
Factory method to create render properties appropriate to this object.
|
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by
this object.
|
boolean |
getCopyReferences(java.util.List<ModelComponent> refs,
ModelComponent ancestor)
Collects external references which must also be copied in order to
duplicate this component.
|
double |
getDensity() |
PropertyMode |
getDensityMode() |
FemMaterial |
getEffectiveMaterial() |
void |
getHardReferences(java.util.List<ModelComponent> refs)
Appends all hard references for this component to a list.
|
int |
getIndex() |
int |
getLocalNodeIndex(FemNode p) |
boolean |
getMarkerCoordinates(VectorNd coords,
Point3d pnt,
boolean checkInside) |
double |
getMass() |
FemMaterial |
getMaterial() |
abstract FemNode[] |
getNodes() |
double |
getRestVolume() |
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. |
double |
getVolume()
Returns the most recently computed volume for this element, as determined
by computeVolume().
|
boolean |
hasActiveNodes()
Returns true if at least one node in this element is active
|
boolean |
hasControllableNodes()
Returns true if at least one node in this element is controllable
|
boolean |
integrationPointsInterpolateToNodes()
Queries whether there is an interpolation mapping between integration points
and nodes.
|
boolean |
integrationPointsMapToNodes()
Queries whether there is a one-to-one mapping between integration points
and nodes.
|
void |
invalidateRestData()
Invalidate data that relies on the element's rest position,
such as rest Jacobians and the base stiffness for co-rotated
stiffness.
|
boolean |
isDuplicatable()
Returns true if this component can be duplicated.
|
boolean |
isInverted()
Returns true if this element has been marked as inverted by the FEM code.
|
boolean |
isMassExplicit() |
java.lang.String |
numberString()
Returns a string giving the node numbers associated with this element.
|
int |
numNodes() |
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).
|
void |
propertyChanged(PropertyChangeEvent e) |
void |
render(Renderer renderer,
int flags)
Render this object using the functionality of the supplied
Renderer. |
abstract void |
render(Renderer renderer,
RenderProps rprops,
int flags) |
void |
scaleDistance(double s)
Scales all distance coordinates.
|
void |
scaleMass(double s)
Scales all mass units.
|
void |
setDensity(double p) |
void |
setDensityMode(PropertyMode mode) |
void |
setIndex(int idx) |
void |
setInverted(boolean inverted)
Used by the internal FEM code to mark whether or not this element is
inverted.
|
void |
setMass(double m) |
void |
setMassExplicit(boolean set) |
void |
setMaterial(FemMaterial mat) |
void |
updateBounds(Vector3d pmin,
Vector3d pmax)
Update the minimum and maximum points for this object.
|
void |
updateRestVolumeAndMass() |
getRenderHints, getRenderProps, isSelectable, numSelectionQueriesNeeded, setRenderProps, updateRenderPropscheckFlag, checkName, checkNameUniqueness, clearFlag, clone, connectToHierarchy, createTempFlag, disconnectFromHierarchy, getChildren, getGrandParent, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, hasChildren, hasState, isConnectedToHierarchy, isFixed, isMarked, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, postscan, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, scan, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setSelected, updateReferences, writeequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconnectToHierarchy, disconnectFromHierarchy, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, postscan, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, updateReferencesgetPropertygetChildren, hasChildrenisWritable, writepublic static PropertyList myProps
public PropertyList getAllPropertyInfo()
HasPropertiesgetAllPropertyInfo in interface HasPropertiesgetAllPropertyInfo in class ModelComponentBasepublic FemMaterial getMaterial()
public void setMaterial(FemMaterial mat)
public FemMaterial getEffectiveMaterial()
public void setMass(double m)
public void setMassExplicit(boolean set)
public boolean isMassExplicit()
public void setDensity(double p)
public double getDensity()
public void setDensityMode(PropertyMode mode)
public PropertyMode getDensityMode()
public int numNodes()
public boolean integrationPointsMapToNodes()
true if there is a one-to-one mapping between
integration points and nodespublic boolean integrationPointsInterpolateToNodes()
true if there is an interpolation mapping between
integration points and nodespublic abstract FemNode[] getNodes()
public int getLocalNodeIndex(FemNode p)
public boolean containsNode(FemNode p)
public double getVolume()
public abstract double computeVolumes()
public double getMass()
public void invalidateRestData()
public double getRestVolume()
public void updateRestVolumeAndMass()
public RenderProps createRenderProps()
HasRenderPropscreateRenderProps in interface HasRenderPropscreateRenderProps in class RenderableComponentBasepublic void prerender(RenderList list)
IsRenderablelist.addIfVisible (obj);
for each of the objects in question.prerender in interface IsRenderableprerender in class RenderableComponentBaselist - list of objects to be renderedpublic void updateBounds(Vector3d pmin, Vector3d pmax)
IsRenderableupdateBounds in interface IsRenderableupdateBounds in class RenderableComponentBasepmin - minimum pointpmax - maximum pointpublic abstract void render(Renderer renderer, RenderProps rprops, int flags)
public void render(Renderer renderer, int flags)
IsRenderableRenderer.render in interface IsRenderablerender in class RenderableComponentBaserenderer - 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 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 RenderableComponentBaselist - selected objects are appended to the end of this listqid - index of the selection querypublic void scaleDistance(double s)
ScalableUnitsscaleDistance in interface ScalableUnitss - scaling factorpublic void scaleMass(double s)
ScalableUnitsscaleMass in interface ScalableUnitss - scaling factorpublic java.lang.String numberString()
public void setInverted(boolean inverted)
inverted - if true, marks this element as inverted.public boolean isInverted()
public boolean getMarkerCoordinates(VectorNd coords, Point3d pnt, boolean checkInside)
public boolean hasActiveNodes()
public boolean hasControllableNodes()
public boolean isDuplicatable()
true if and only if CopyableComponent.getCopyReferences(java.util.List<artisynth.core.modelbase.ModelComponent>, artisynth.core.modelbase.ModelComponent) returns true.
This method is not currently used. It is intended to provide a faster
way of determining if a component can be duplicated, without having to
use CopyableComponent.getCopyReferences(java.util.List<artisynth.core.modelbase.ModelComponent>, artisynth.core.modelbase.ModelComponent) to build the list of copy references.
isDuplicatable in interface CopyableComponenttrue if this component can be duplicated.public boolean getCopyReferences(java.util.List<ModelComponent> refs, ModelComponent ancestor)
true if and only if CopyableComponent.isDuplicatable() returns
true.getCopyReferences in interface CopyableComponentrefs - list to which references are appendedancestor - root node of the hierarchy from which references are to be excludedpublic int getIndex()
public void setIndex(int idx)
public void getHardReferences(java.util.List<ModelComponent> refs)
getHardReferences in interface ModelComponentgetHardReferences in class ModelComponentBaserefs - list to which hard references are appendedpublic FemElement copy(int flags, java.util.Map<ModelComponent,ModelComponent> copyMap)
CopyableComponentCOPY_REFERENCES
is set in flags, then any component referenced
by this component should itself be set to a copy. This
should be done first checking copyMap for an
existing copy of the referenced component. If there is no existing
copy, then a copy should be created by calling copy
recursively and adding the new copy to copyMap.copy in interface CopyableComponentcopy in class RenderableComponentBaseflags - flags to control the copyingcopyMap - map to possible existing instances of referenced
componentspublic void propertyChanged(PropertyChangeEvent e)
propertyChanged in interface PropertyChangeListener