artisynth.core.mechmodels
Class RigidBodyCollisionData

java.lang.Object
  extended by artisynth.core.mechmodels.RigidBodyCollisionData
All Implemented Interfaces:
CollisionData

public class RigidBodyCollisionData
extends java.lang.Object
implements CollisionData


Constructor Summary
RigidBodyCollisionData(RigidBody body, PolygonalMesh mesh)
           
RigidBodyCollisionData(RigidCompositeBody body, int meshIdx)
           
 
Method Summary
 int addConstraintInfo(Vertex3d vtx, Point3d constraintLoc, double weight, DeformableContactConstraint con)
          Adds the point information from this object's vertex and weight to the supplied constraint.
 RigidBody getBody()
           
 RigidBody getComponent()
          Returns the component involved in the collision
 PolygonalMesh getMesh()
          Gets the PolygonalMesh used for collisions
 void markMasters(Vertex3d vtx, boolean marked)
          Mark the master dynamic components of vertex vtx as being "used"
 int numActiveUnmarkedMasters(Vertex3d vtx)
          Count the number of "free" master components for vertex vtx.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RigidBodyCollisionData

public RigidBodyCollisionData(RigidBody body,
                              PolygonalMesh mesh)

RigidBodyCollisionData

public RigidBodyCollisionData(RigidCompositeBody body,
                              int meshIdx)
Method Detail

getMesh

public PolygonalMesh getMesh()
Description copied from interface: CollisionData
Gets the PolygonalMesh used for collisions

Specified by:
getMesh in interface CollisionData
Returns:
mesh used for collisions

getComponent

public RigidBody getComponent()
Description copied from interface: CollisionData
Returns the component involved in the collision

Specified by:
getComponent in interface CollisionData

getBody

public RigidBody getBody()

addConstraintInfo

public int addConstraintInfo(Vertex3d vtx,
                             Point3d constraintLoc,
                             double weight,
                             DeformableContactConstraint con)
Description copied from interface: CollisionData
Adds the point information from this object's vertex and weight to the supplied constraint.

Specified by:
addConstraintInfo in interface CollisionData
Parameters:
vtx - vertex belonging to this object
constraintLoc - actual world location of constraint
weight - weight used in constraint
con - the constraint to modify
Returns:
the number of constraints added or modified

markMasters

public void markMasters(Vertex3d vtx,
                        boolean marked)
Description copied from interface: CollisionData
Mark the master dynamic components of vertex vtx as being "used"

Specified by:
markMasters in interface CollisionData

numActiveUnmarkedMasters

public int numActiveUnmarkedMasters(Vertex3d vtx)
Description copied from interface: CollisionData
Count the number of "free" master components for vertex vtx. Used for determining whether or not a collision should be allowed.

Specified by:
numActiveUnmarkedMasters in interface CollisionData