artisynth.core.femmodels
Class FemMesh

java.lang.Object
  extended by artisynth.core.modelbase.ModelComponentBase
      extended by artisynth.core.modelbase.RenderableComponentBase
          extended by artisynth.core.mechmodels.MeshComponent
              extended by artisynth.core.mechmodels.SkinMeshBase
                  extended by artisynth.core.femmodels.FemMeshBase
                      extended by artisynth.core.femmodels.FemMesh
All Implemented Interfaces:
Collidable, HasSlaveObjects, ComponentChangeListener, CompositeComponent, IndexedComponentList, ModelComponent, RenderableComponent, ScalableUnits, TransformableGeometry, PullController.Pullable, java.lang.Cloneable, HasProperties, HierarchyNode, GLRenderable, GLSelectable, HasRenderProps, Renderable, Scannable

public class FemMesh
extends FemMeshBase
implements PullController.Pullable, Collidable

Describes a surface mesh that is "skinned" onto an FEM, such that its vertex positions are determined by weighted combinations of FEM node positions.


Nested Class Summary
 
Nested classes/interfaces inherited from interface artisynth.core.mechmodels.Collidable
Collidable.DefaultCollidable
 
Nested classes/interfaces inherited from interface artisynth.core.modelbase.ModelComponent
ModelComponent.NavpanelVisibility
 
Nested classes/interfaces inherited from interface artisynth.core.modelbase.CompositeComponent
CompositeComponent.NavpanelDisplay
 
Field Summary
 
Fields inherited from class artisynth.core.femmodels.FemMeshBase
myProps
 
Fields inherited from class artisynth.core.modelbase.ModelComponentBase
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames
 
Fields inherited from interface artisynth.core.mechmodels.Collidable
Default, Deformable, RigidBody, Self
 
Fields inherited from interface artisynth.core.util.TransformableGeometry
ARTICULATED, SIMULATING
 
Fields inherited from interface maspack.render.GLRenderable
TRANSLUCENT, TWO_DIMENSIONAL
 
Constructor Summary
FemMesh()
           
FemMesh(FemModel3d fem)
           
FemMesh(FemModel3d fem, java.lang.String name)
           
 
Method Summary
 void applyForce(java.lang.Object orig, Vector3d force)
          Given the supplied force origin info and a force vector, apply the force (typically sets an external force)
 void connectToHierarchy()
          Called by the system after this component is added to the component hierarchy (i.e., when it is added as a child of another CompositeComponent).
 FemMesh copy(int flags, java.util.Map<ModelComponent,ModelComponent> copyMap)
           
 CollisionData createCollisionData()
           
static FemMesh createEmbedded(FemMesh surf, MeshBase mesh)
           
static FemMesh createEmbedded(FemMesh surf, MeshBase mesh, FemModel3d fem)
           
static FemMesh createEmbedded(FemModel3d fem, MeshBase mesh)
           
 void createSurface(FemModel.ElementFilter efilter, java.util.Map<FemNode3d,FemMeshVertex> surfaceNodeMap)
           
 void disconnectFromHierarchy()
          Called by the system after this component is removed from the component hierarchy (i.e., when it is removed as a child of its parent).
 PointAttachment getAttachment(int idx)
           
 double getMass()
           
 java.lang.Object getOriginData(MouseRayEvent ray)
          Constructs force origin storage data given a mouse ray (e.g.
 Point3d getOriginPoint(java.lang.Object data)
          Determines the world-coordinate point to which force will be applied (used for determining magnitude of force)
 double getPointRenderRadius()
           
 boolean hasNodeDependency(FemNode3d node)
          Check if this mesh depends on a particular node
 boolean isCollidable()
           
 boolean isPullable()
           
 boolean isSurfaceMesh()
           
 int numAttachments()
           
 void scan(ReaderTokenizer rtok, java.lang.Object ref)
          Scans this element from a ReaderTokenizer.
 
Methods inherited from class artisynth.core.femmodels.FemMeshBase
getAllPropertyInfo, getColorMap, getColorMapMode, getColorRendering, getColorRenderingMode, getFem, getSelection, getStressPlotRange, getStressPlotRangeMode, getStressPlotRanging, getStressPlotRangingMode, numSelectionQueriesNeeded, prerender, render, resetStressPlotRange, setColorMap, setColorMapMode, setColorRendering, setColorRenderingMode, setFem, setMesh, setMeshFromInfo, setStressPlotRange, setStressPlotRangeMode, setStressPlotRanging, setStressPlotRangingMode
 
Methods inherited from class artisynth.core.mechmodels.SkinMeshBase
componentChanged, findComponent, get, get, getByNumber, getNavpanelDisplay, getNavpanelVisibility, getNumberLimit, hierarchyContainsReferences, indexOf, numComponents, postscan, scaleDistance, setDisplayMode, setNavpanelDisplay, transformGeometry, updateNameMap, updateSlavePos, updateSlaveVel
 
Methods inherited from class artisynth.core.mechmodels.MeshComponent
createRenderProps, getMesh, getVertex, numVertices, render, scaleMass, setDefaultValues, setMesh, setMesh, transformGeometry, transformGeometry, updateBounds, updatePosition
 
Methods inherited from class artisynth.core.modelbase.RenderableComponentBase
getRenderHints, getRenderProps, isSelectable, setRenderProps, updateRenderProps
 
Methods inherited from class artisynth.core.modelbase.ModelComponentBase
checkFlag, checkName, checkNameUniqueness, clearFlag, clone, createTempFlag, getChildren, getGrandParent, getHardReferences, getName, getNameRange, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, hasChildren, hasState, isFixed, isMarked, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setSelected, updateReferences, write
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface artisynth.core.modelbase.ModelComponent
getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, postscan, setFixed, setMarked, setName, setNumber, setParent, setSelected, updateReferences
 
Methods inherited from interface maspack.properties.HasProperties
getAllPropertyInfo, getProperty
 
Methods inherited from interface maspack.properties.HierarchyNode
getChildren, hasChildren
 
Methods inherited from interface maspack.util.Scannable
isWritable, write
 

Constructor Detail

FemMesh

public FemMesh()

FemMesh

public FemMesh(FemModel3d fem)

FemMesh

public FemMesh(FemModel3d fem,
               java.lang.String name)
Method Detail

numAttachments

public int numAttachments()
Specified by:
numAttachments in class FemMeshBase

getAttachment

public PointAttachment getAttachment(int idx)
Specified by:
getAttachment in class FemMeshBase

createEmbedded

public static FemMesh createEmbedded(FemMesh surf,
                                     MeshBase mesh)

createEmbedded

public static FemMesh createEmbedded(FemMesh surf,
                                     MeshBase mesh,
                                     FemModel3d fem)

createEmbedded

public static FemMesh createEmbedded(FemModel3d fem,
                                     MeshBase mesh)

createSurface

public void createSurface(FemModel.ElementFilter efilter,
                          java.util.Map<FemNode3d,FemMeshVertex> surfaceNodeMap)

scan

public void scan(ReaderTokenizer rtok,
                 java.lang.Object ref)
          throws java.io.IOException
Description copied from class: ModelComponentBase
Scans this element from a ReaderTokenizer. The expected text format is assumed to be compatible with that produced by write.

Specified by:
scan in interface ModelComponent
Specified by:
scan in interface Scannable
Overrides:
scan in class SkinMeshBase
Parameters:
rtok - Tokenizer from which to scan the element
ref - optional reference object which can be used for resolving references to other objects
Throws:
java.io.IOException - if an I/O or formatting error occured

connectToHierarchy

public void connectToHierarchy()
Description copied from class: ModelComponentBase
Called by the system after this component is added to the component hierarchy (i.e., when it is added as a child of another CompositeComponent). This method is responsible for doing any required hierarchy-dependent initialization.

When this method is called, ModelComponent.getParent() will return the new parent component; the system will have set this beforehand.

Specified by:
connectToHierarchy in interface ModelComponent
Overrides:
connectToHierarchy in class FemMeshBase

disconnectFromHierarchy

public void disconnectFromHierarchy()
Description copied from class: ModelComponentBase
Called by the system after this component is removed from the component hierarchy (i.e., when it is removed as a child of its parent). This method is responsible for any required hierarchy-dependent deinitialization.

When this method is called, ModelComponent.getParent() will still return this original parent component; the system will set this to null after.

Specified by:
disconnectFromHierarchy in interface ModelComponent
Overrides:
disconnectFromHierarchy in class FemMeshBase

copy

public FemMesh copy(int flags,
                    java.util.Map<ModelComponent,ModelComponent> copyMap)
Overrides:
copy in class FemMeshBase

isSurfaceMesh

public boolean isSurfaceMesh()

hasNodeDependency

public boolean hasNodeDependency(FemNode3d node)
Check if this mesh depends on a particular node


isPullable

public boolean isPullable()
Specified by:
isPullable in interface PullController.Pullable

getOriginData

public java.lang.Object getOriginData(MouseRayEvent ray)
Description copied from interface: PullController.Pullable
Constructs force origin storage data given a mouse ray (e.g. intersect ray with mesh to determine for origin point) If null, assumes that there is no origin, so no force can be applied

Specified by:
getOriginData in interface PullController.Pullable

getOriginPoint

public Point3d getOriginPoint(java.lang.Object data)
Description copied from interface: PullController.Pullable
Determines the world-coordinate point to which force will be applied (used for determining magnitude of force)

Specified by:
getOriginPoint in interface PullController.Pullable

getPointRenderRadius

public double getPointRenderRadius()
Specified by:
getPointRenderRadius in interface PullController.Pullable

applyForce

public void applyForce(java.lang.Object orig,
                       Vector3d force)
Description copied from interface: PullController.Pullable
Given the supplied force origin info and a force vector, apply the force (typically sets an external force)

Specified by:
applyForce in interface PullController.Pullable

createCollisionData

public CollisionData createCollisionData()
Specified by:
createCollisionData in interface Collidable

isCollidable

public boolean isCollidable()
Specified by:
isCollidable in interface Collidable

getMass

public double getMass()
Specified by:
getMass in interface Collidable