public class RigidMeshComp extends MeshComponent implements PointAttachable, HasSurfaceMesh, CollidableBody
Collidable.Collidability, Collidable.GroupModelComponent.NavpanelVisibility| Modifier and Type | Field and Description | 
|---|---|
| static boolean | DEFAULT_PHYSICAL | 
| static PropertyList | myProps | 
DEFAULT_COLOR_INTERPOLATION, DEFAULT_VERTEX_COLOR_MIXINGenforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNamesAll, AllBodies, Deformable, Rigid, SelfTG_ARTICULATED, TG_DRAGGER, TG_PRESERVE_ORIENTATION, TG_SIMULATINGTRANSPARENT, TWO_DIMENSIONAL| Constructor and Description | 
|---|
| RigidMeshComp() | 
| RigidMeshComp(MeshBase mesh,
             java.lang.String fileName,
             AffineTransform3dBase X) | 
| RigidMeshComp(java.lang.String name) | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | allowCollision(ContactPoint cpnt,
              Collidable other,
              java.util.Set<Vertex3d> attachedVertices)Returns  trueif a collision between this Collidable
 andothershould be allowed for the contact pointcpnt. | 
| boolean | containsContactMaster(CollidableDynamicComponent comp)Returns true if this Collidable contains a specified contact master
 component. | 
| RigidMeshComp | copy(int flags,
    java.util.Map<ModelComponent,ModelComponent> copyMap) | 
| PointFrameAttachment | createPointAttachment(Point pnt)Returns a PointAttachment that attaches  pntto this component. | 
| PropertyList | getAllPropertyInfo()Returns a list giving static information about all properties exported by
 this object. | 
| Collidable.Collidability | getCollidable()Returns the  Collidable.Collidabilityof this Collidable. | 
| Collidable | getCollidableAncestor()Returns the most immediate Collidable ancestor of this Collidable,
 if any. | 
| int | getCollidableIndex() | 
| PolygonalMesh | getCollisionMesh()Returns the mesh that should be used for computing collisions, or
  nullif there is no such mesh. | 
| DistanceGrid | getDistanceGrid()Returns a signed distance grid that can be used with a 
 SignedDistanceCollider, or  nullif this Collidable
 does not support a signed distance grid (i.e., ifCollidableBody.hasDistanceGrid()returnsfalse). | 
| double | getMass() | 
| int | getMaxGridDivisions() | 
| RigidBody | getRigidBody() | 
| void | getSelection(java.util.LinkedList<java.lang.Object> list,
            int qid)Append to  listthe component (or components) associated with
 theqid-th selection query issued by this component's render
 method. | 
| PolygonalMesh | getSurfaceMesh()Returns the surface mesh associated with this component, or
  nullif no mesh exists. | 
| PolygonalMesh[] | getSurfaceMeshes()Returns an array listing all the (non-null) surface meshes associated
 with this component, or a zero-length array if there are none. | 
| void | getVertexMasters(java.util.List<ContactMaster> mlist,
                Vertex3d vtx)Returns all the contact master components associated with a particular
 mesh vertex. | 
| boolean | hasDistanceGrid()Returns  trueif this Collidable supports a signed
 distance grid that can be used with a SignedDistanceCollider. | 
| boolean | isCompound()Queries whether or not this collidable has sub-collidables. | 
| boolean | isDeformable()Returns  trueif this collidable is deformable. | 
| boolean | isPhysical() | 
| int | numSelectionQueriesNeeded()If this selectable manages its own selection (by issuing selection
 queries within its  rendermethod), then this method should
 return the maximum number of selection queries that will be
 required. | 
| int | numSurfaceMeshes()Returns the number of surfaces meshes associated with this
 component, or 0 if no meshes exist. | 
| void | render(Renderer renderer,
      RenderProps props,
      int flags) | 
| void | setCollidable(Collidable.Collidability c) | 
| void | setCollidableIndex(int idx) | 
| void | setMaxGridDivisions(int max) | 
| void | setPhysical(boolean set) | 
| void | transformGeometry(GeometryTransformer gtr,
                 TransformGeometryContext context,
                 int flags)Transforms the geometry of this component, using the geometry transformer
  gtrto transform its individual attributes. | 
addTransformableDependencies, createRenderProps, createSurfaceMeshArray, getColorInterpolation, getFileTransform, getMesh, getMeshToWorld, getSurfaceMeshes, getVertex, getVertexColorMixing, isFileTransformRigid, isMeshModfied, numSurfaceMeshes, numVertices, prerender, render, scaleDistance, scaleMass, setColorInterpolation, setDefaultValues, setMesh, setMesh, setMesh, setMeshToWorld, setVertexColorMixing, transformGeometry, updateBounds, updatePosition, updateSlavePosgetRenderHints, getRenderProps, isSelectable, setRenderProps, updateRenderPropscheckFlag, checkName, checkNameUniqueness, clearFlag, clone, connectToHierarchy, createTempFlag, disconnectFromHierarchy, getChildren, getGrandParent, getHardReferences, 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, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, postscan, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, updateReferencesgetPropertygetChildren, hasChildrenisWritable, writepublic static boolean DEFAULT_PHYSICAL
public static PropertyList myProps
public RigidMeshComp()
public RigidMeshComp(java.lang.String name)
public RigidMeshComp(MeshBase mesh, java.lang.String fileName, AffineTransform3dBase X)
public PropertyList getAllPropertyInfo()
HasPropertiesgetAllPropertyInfo in interface HasPropertiesgetAllPropertyInfo in class MeshComponentpublic boolean isPhysical()
public void setPhysical(boolean set)
public void render(Renderer renderer, RenderProps props, int flags)
render in class MeshComponentpublic RigidBody getRigidBody()
public RigidMeshComp copy(int flags, java.util.Map<ModelComponent,ModelComponent> copyMap)
copy in class MeshComponentpublic 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 RenderableComponentBasepublic 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 PolygonalMesh getCollisionMesh()
CollidableBodynull if there is no such mesh. If this method
 returns null, then no collisions will
 be performed for this collidable, regardless any default or explicit
 collision behaviors that have been arranged by the system.getCollisionMesh in interface CollidableBodypublic boolean hasDistanceGrid()
CollidableBodytrue if this Collidable supports a signed
 distance grid that can be used with a SignedDistanceCollider. At
 present, this will only be true for non-deformable bodies.hasDistanceGrid in interface CollidableBodytrue if this Collidable supports a signed
 distance gridpublic DistanceGrid getDistanceGrid()
CollidableBodynull if this Collidable
 does not support a signed distance grid (i.e., if 
 CollidableBody.hasDistanceGrid() returns false).getDistanceGrid in interface CollidableBodypublic double getMass()
getMass in interface CollidableBodypublic Collidable getCollidableAncestor()
Collidablenull.getCollidableAncestor in interface Collidablenull.public boolean isCompound()
CollidableisCompound in interface Collidabletrue if this collidable has sub-collidablespublic Collidable.Collidability getCollidable()
CollidableCollidable.Collidability of this Collidable. This provides
 control over whether external and/or internal collisions are enabled for
 this Collidable. This setting takes precedence over default and
 explicitly requested collision behaviors.
 Note that for collisions to actually occur, they still need to be enabled through either a default or explicit collision behavior in the MechModel.
getCollidable in interface Collidablepublic void setCollidable(Collidable.Collidability c)
public boolean isDeformable()
Collidabletrue if this collidable is deformable. Whether or
 not a collidable is deformable determines how it responds to default
 collision behaviors involving deformable and rigid collidables. Also,
 self-collisions among sub-collidables of a collidable A are permitted
 only if A is deformable.isDeformable in interface Collidabletrue if this collidable is deformablepublic void getVertexMasters(java.util.List<ContactMaster> mlist, Vertex3d vtx)
CollidableBodymlist. The list should not be cleared. The vertex
 should be a vertex of the mesh returned by CollidableBody.getCollisionMesh().getVertexMasters in interface CollidableBodymlist - collected master component informationvtx - vertex for which the master components are requestedpublic boolean containsContactMaster(CollidableDynamicComponent comp)
CollidableBodycontainsContactMaster in interface CollidableBodycomp - component to test fortrue if comp is contained in
 this Collidablepublic boolean allowCollision(ContactPoint cpnt, Collidable other, java.util.Set<Vertex3d> attachedVertices)
CollidableBodytrue if a collision between this Collidable
 and other should be allowed for the contact point
 cpnt. In making this decision, this method may
 refer to attachedVertices, which supplies a list
 of vertices on this Collidable which are attached in some way 
 to the other Collidable.allowCollision in interface CollidableBodycpnt - contact point being testedother - opposing collidableattachedVertices - list of vertices attached to other.true if the collision should be allowedpublic int getCollidableIndex()
getCollidableIndex in interface CollidableBodypublic void setCollidableIndex(int idx)
setCollidableIndex in interface CollidableBodypublic void setMaxGridDivisions(int max)
public int getMaxGridDivisions()
public PointFrameAttachment createPointAttachment(Point pnt)
PointAttachablepnt
 to this component. It should not be assumed that pnt
 is currently connected to the component hierarchy, and no attempt
 should be made to connect the returned attachment to the hierarchy;
 the latter, if desired, is the responsibility of the caller.
 
 In some cases, it may not be possible to attach the point at its present location. In that case, the method will create an attachment to the nearest feasible location.
createPointAttachment in interface PointAttachablepnt - point for which an attachment should be createdpnt to this componentpublic PolygonalMesh getSurfaceMesh()
HasSurfaceMeshnull if no mesh exists. If multiple surface
 meshes exist, this should be first one in the array returned
 by HasSurfaceMesh.getSurfaceMeshes().getSurfaceMesh in interface HasSurfaceMeshpublic int numSurfaceMeshes()
HasSurfaceMeshHasSurfaceMesh.getSurfaceMesh()
 returns null, then this method should return 0.numSurfaceMeshes in interface HasSurfaceMeshpublic PolygonalMesh[] getSurfaceMeshes()
HasSurfaceMeshHasSurfaceMesh.getSurfaceMesh() returns null, then a 
 zero-length array should be returned.getSurfaceMeshes in interface HasSurfaceMeshpublic void transformGeometry(GeometryTransformer gtr, TransformGeometryContext context, int flags)
TransformableGeometrygtr to transform its individual attributes. The
 context argument supplies information about what other
 components are currently being transformed, and also allows the
 requesting of update actions to be performed after all transform called
 have completed. The context is also the usual entity that calls
 this method, from within its TransformGeometryContext.apply(maspack.geometry.GeometryTransformer, int)
 method. The argument flags provides flags to specify
 various conditions associated with the the transformation. 
 At present, the available flags are TransformableGeometry.TG_SIMULATING and 
 TransformableGeometry.TG_ARTICULATED.
 This method is not usually called directly by applications. 
 Instead, it is typically called from within the 
 TransformGeometryContext.apply(maspack.geometry.GeometryTransformer, int) method of the context,
 which takes care of the various operations needed for a
 complete transform operation, including calling 
 TransformableGeometry.addTransformableDependencies(artisynth.core.modelbase.TransformGeometryContext, int) to collect other 
 components that should be transformed, calling 
 TransformableGeometry.transformGeometry(maspack.matrix.AffineTransform3dBase) for each component, notifying
 component parents that the geometry has changed, and calling
 any requested TransformGeometryActions. More details
 are given in the documentation for 
 TransformGeometryContext.apply(maspack.geometry.GeometryTransformer, int).
 
 
TransformGeometryContext provides a number of
 static convenience transform methods
 which take care of building the context and calling
 apply() for a specified set of components.
 
 
This method should not
 generally call transformGeometry() for its descendant
 components. Instead, descendants needing transformation should be
 specified by adding them to the context in the method TransformableGeometry.addTransformableDependencies(artisynth.core.modelbase.TransformGeometryContext, int).
transformGeometry in interface TransformableGeometrytransformGeometry in class MeshComponentgtr - transformer implementing the transformcontext - context information, including what other components
 are being transformedflags - specifies conditions associated with the transformation