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, useCompactPathNames
COPY_REFERENCES
TRANSLUCENT, 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.
|
abstract void |
computeWarping() |
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) |
void |
getMarkerCoordinates(VectorNd coords,
Point3d pnt) |
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 |
integrationPointsMapToNodes()
Returns true if 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.
|
java.lang.String |
numberString()
Returns a string giving the node numbers associated with this element.
|
int |
numNodes() |
void |
prerender(RenderList list)
Prepare for rendering, and potentially add itself to a list to be drawn
by a GLRenderer.
|
void |
propertyChanged(PropertyChangeEvent e) |
void |
render(GLRenderer renderer,
int flags)
Render this object using Open GL via the JOGL.
|
void |
render(GLRenderer 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 |
setMaterial(FemMaterial mat) |
void |
updateBounds(Point3d pmin,
Point3d pmax)
Update the minimum and maximum points for this object.
|
void |
updateNodeMasses(double elementMass) |
getRenderHints, getRenderProps, isSelectable, numSelectionQueriesNeeded, setRenderProps, updateRenderProps
checkFlag, checkName, checkNameUniqueness, clearFlag, clone, connectToHierarchy, createTempFlag, disconnectFromHierarchy, getChildren, getGrandParent, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, hasChildren, hasState, isFixed, isMarked, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, postscan, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, scan, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setSelected, updateReferences, write
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
connectToHierarchy, disconnectFromHierarchy, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, postscan, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, updateReferences
getProperty
getChildren, hasChildren
isWritable, write
public static PropertyList myProps
public PropertyList getAllPropertyInfo()
HasProperties
getAllPropertyInfo
in interface HasProperties
getAllPropertyInfo
in class ModelComponentBase
public FemMaterial getMaterial()
public void setMaterial(FemMaterial mat)
public FemMaterial getEffectiveMaterial()
public void updateNodeMasses(double elementMass)
public void setMass(double m)
public void setDensity(double p)
public double getDensity()
public void setDensityMode(PropertyMode mode)
public PropertyMode getDensityMode()
public int numNodes()
public boolean integrationPointsMapToNodes()
public 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 abstract void computeWarping()
public RenderProps createRenderProps()
HasRenderProps
createRenderProps
in interface HasRenderProps
createRenderProps
in class RenderableComponentBase
public void prerender(RenderList list)
GLRenderable
prerender
in interface GLRenderable
prerender
in class RenderableComponentBase
public void updateBounds(Point3d pmin, Point3d pmax)
GLRenderable
updateBounds
in interface GLRenderable
updateBounds
in class RenderableComponentBase
pmin
- minimum pointpmax
- maximum pointpublic void render(GLRenderer renderer, RenderProps rprops, int flags)
public void render(GLRenderer renderer, int flags)
GLRenderable
render
in interface GLRenderable
render
in class RenderableComponentBase
renderer
- renderer object which is used to perform the rendering. Provides pointers
to GL and GLU, along with helper functions.flags
- supplies flags that may be used to control different
aspects of the rendering. Flags are defined in GLRenderer
and currently include
GLRenderer.SELECTED
,
GLRenderer.VERTEX_COLORING
,
GLRenderer.HSV_COLOR_INTERPOLATION
,
GLRenderer.SORT_FACES
, and
GLRenderer.CLEAR_MESH_DISPLAY_LISTS
.public void getSelection(java.util.LinkedList<java.lang.Object> list, int qid)
GLSelectable
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 GLSelectable.numSelectionQueriesNeeded()
is positive), and qid
will in
turn be a number between 0 and nums
-1.getSelection
in interface GLSelectable
getSelection
in class RenderableComponentBase
list
- selected objects are appended to the end of this listqid
- index of the selection querypublic void scaleDistance(double s)
ScalableUnits
scaleDistance
in interface ScalableUnits
s
- scaling factorpublic void scaleMass(double s)
ScalableUnits
scaleMass
in interface ScalableUnits
s
- scaling factorpublic java.lang.String numberString()
public void setInverted(boolean inverted)
inverted
- if true
, marks this element as inverted.public boolean isInverted()
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 CopyableComponent
true
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 CopyableComponent
refs
- 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 ModelComponent
getHardReferences
in class ModelComponentBase
refs
- list to which hard references are appendedpublic FemElement copy(int flags, java.util.Map<ModelComponent,ModelComponent> copyMap)
CopyableComponent
COPY_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 CopyableComponent
copy
in class RenderableComponentBase
public void propertyChanged(PropertyChangeEvent e)
propertyChanged
in interface PropertyChangeListener