artisynth.core.mechmodels
Class RigidMeshComponent
java.lang.Object
artisynth.core.modelbase.ModelComponentBase
artisynth.core.modelbase.RenderableComponentBase
artisynth.core.mechmodels.MeshComponent
artisynth.core.mechmodels.RigidMeshComponent
- All Implemented Interfaces:
- Collidable, ModelComponent, RenderableComponent, ScalableUnits, TransformableGeometry, PullController.Pullable, java.lang.Cloneable, HasProperties, HierarchyNode, GLRenderable, GLSelectable, HasRenderProps, Renderable, Scannable
public class RigidMeshComponent
- extends MeshComponent
- implements PullController.Pullable, Collidable
Methods inherited from class artisynth.core.mechmodels.MeshComponent |
createRenderProps, getMesh, getVertex, numVertices, prerender, render, scaleDistance, scaleMass, setDefaultValues, setMesh, setMesh, setMesh, transformGeometry, transformGeometry, transformGeometry, updateBounds, updatePosition, updateSlavePos |
Methods inherited from class artisynth.core.modelbase.ModelComponentBase |
checkFlag, checkName, checkNameUniqueness, clearFlag, clone, connectToHierarchy, createTempFlag, disconnectFromHierarchy, getChildren, getGrandParent, getHardReferences, 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 |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface artisynth.core.modelbase.ModelComponent |
connectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, postscan, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, updateReferences |
DEFAULT_PHYSICAL
public static boolean DEFAULT_PHYSICAL
myProps
public static PropertyList myProps
RigidMeshComponent
public RigidMeshComponent()
RigidMeshComponent
public RigidMeshComponent(java.lang.String name)
RigidMeshComponent
public RigidMeshComponent(MeshBase mesh,
java.lang.String fileName,
AffineTransform3dBase X)
getAllPropertyInfo
public PropertyList getAllPropertyInfo()
- Description copied from interface:
HasProperties
- Returns a list giving static information about all properties exported by
this object.
- Specified by:
getAllPropertyInfo
in interface HasProperties
- Overrides:
getAllPropertyInfo
in class MeshComponent
- Returns:
- static information for all exported properties
isPhysical
public boolean isPhysical()
setPhysical
public void setPhysical(boolean set)
render
public void render(GLRenderer renderer,
RenderProps props,
int flags)
- Overrides:
render
in class MeshComponent
getRigidBody
public RigidBody getRigidBody()
copy
public RigidMeshComponent copy(int flags,
java.util.Map<ModelComponent,ModelComponent> copyMap)
- Overrides:
copy
in class MeshComponent
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
numSelectionQueriesNeeded
public int numSelectionQueriesNeeded()
- Description copied from interface:
GLSelectable
- 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. Otherwise, this method should return -1.
- Specified by:
numSelectionQueriesNeeded
in interface GLSelectable
- Overrides:
numSelectionQueriesNeeded
in class RenderableComponentBase
- Returns:
- maximum number of selection queries needed by this component, or
-1 if this component does not manage its own selection.
getSelection
public void getSelection(java.util.LinkedList<java.lang.Object> list,
int qid)
- Description copied from interface:
GLSelectable
- Append to
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.
- Specified by:
getSelection
in interface GLSelectable
- Overrides:
getSelection
in class RenderableComponentBase
- Parameters:
list
- selected objects are appended to the end of this listqid
- index of the selection query
createCollisionData
public CollisionData createCollisionData()
- Specified by:
createCollisionData
in interface Collidable
getCollisionMesh
public PolygonalMesh getCollisionMesh()
getMass
public double getMass()
- Specified by:
getMass
in interface Collidable
isCollidable
public boolean isCollidable()
- Specified by:
isCollidable
in interface Collidable