artisynth.core.mechmodels
Interface DeformableContactConstraint

All Known Implementing Classes:
DeformableContactConstraintBase, DeformableContactConstraintGeneric, EmbeddedContactConstraint, FemContactConstraint, MFreeContactConstraint

public interface DeformableContactConstraint


Method Summary
 void addConstraintBlocks(SparseBlockMatrix GT, int bj)
          Adds matrix blocks for this constraint to a specified block column of the transposed constraint matrix.
 void addFrame(Frame frame, double weight, Point3d loc)
          Adds a frame as a component for this constraint.
 int addFrictionConstraints(SparseBlockMatrix DT, MechSystem.FrictionInfo[] finfo, int numf)
           
 void addPoint(Point pnt, double weight)
          Adds a point as a component for this constraint.
 void beginSet()
          Begin the process of setting this constraint.
 boolean componentsChanged()
          Returns true if the component structure of this constraint has changed.
 void endSet()
          Concludes the process of setting this constraint.
 boolean equals(java.lang.Object obj)
           
 void getAuxState(DataBuffer data, CollisionData myData, CollisionData otherData)
           
 double getDerivative()
           
 double getDistance()
           
 double getFriction()
          Returns the friction coefficent for this constraint.
 double getImpulse()
          Returns the impulse associated with this constraint.
 Vector3d getNormal()
          Returns the normal for this constraint.
 int getSolveIndex()
           
 int hashCode()
           
 boolean isActive()
          Returns true if this constraint is marked as being active.
 boolean isAdded()
          Returns true if the constraint is marked as being already added to the system
 boolean isControllable()
          Returns true if at least one of the components associated with this constraint is controllable.
 int numFrames()
          Returns the number of frames involved in the constraint
 int numPoints()
          Returns the number of points involved in the constraint
 void print(java.io.PrintStream os)
           
 void setActive(boolean active)
          Marks this constraint as being inactive.
 void setAdded(boolean added)
          Marks this constraint as being added to the system
 void setAuxState(DataBuffer data, CollisionData myData, CollisionData otherData)
           
 void setDistance(double d)
           
 void setEdgeEdge(EdgeEdgeContact eec, double mu, DeformableCollisionData thisData, DeformableCollisionData otherData)
          Assigns an edge-edge collision
 void setEdgeRigidBody(EdgeEdgeContact eec, double mu, DeformableCollisionData thisData, RigidBodyCollisionData rbData)
          Assigns an edge-rigidBody collision
 double setFaceRigidBody(ContactPenetratingPoint cpp, double mu, DeformableCollisionData thisData, RigidBodyCollisionData rbData)
          Assigns a Face->RigidBody collision, returning the perpendicular distance to the face
 void setFriction(double mu)
          Sets the friction coefficient for this constraint.
 void setImpulse(double lam)
          Sets the impulse associated with this constraint.
 void setSolveIndex(int idx)
           
 double setVertexDeformable(ContactPenetratingPoint cpp, double mu, DeformableCollisionData thisData, DeformableCollisionData otherData)
          Assigns a Vertex->Deformable collision, returning the perpendicular distance to the face
 double setVertexRigidBody(ContactPenetratingPoint cpp, double mu, DeformableCollisionData thisData, RigidBodyCollisionData rbData, boolean useSignedDistanceCollider)
          Assigns a Vertex->Rigid body collision, returning the perpendicular distance to the face
 void setVertices(Vertex3d... vtxs)
          For creating a "stub" to quickly retrieve an existing constraint
 void skipAuxState(DataBuffer data)
           
 void updateFriction()
           
 

Method Detail

hashCode

int hashCode()
Overrides:
hashCode in class java.lang.Object

setVertices

void setVertices(Vertex3d... vtxs)
For creating a "stub" to quickly retrieve an existing constraint

Parameters:
vtxs -

equals

boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

getSolveIndex

int getSolveIndex()

setSolveIndex

void setSolveIndex(int idx)

getDistance

double getDistance()

setDistance

void setDistance(double d)

getDerivative

double getDerivative()

addConstraintBlocks

void addConstraintBlocks(SparseBlockMatrix GT,
                         int bj)
Adds matrix blocks for this constraint to a specified block column of the transposed constraint matrix.

Parameters:
GT - transposed constraint matrix
bj - block column where blocks should be added

setFriction

void setFriction(double mu)
Sets the friction coefficient for this constraint.


getFriction

double getFriction()
Returns the friction coefficent for this constraint.


updateFriction

void updateFriction()

addFrictionConstraints

int addFrictionConstraints(SparseBlockMatrix DT,
                           MechSystem.FrictionInfo[] finfo,
                           int numf)

getNormal

Vector3d getNormal()
Returns the normal for this constraint.


getImpulse

double getImpulse()
Returns the impulse associated with this constraint.


setImpulse

void setImpulse(double lam)
Sets the impulse associated with this constraint. In particular, this will be done after velocity solves. The resulting impulse is then used to compute friction and determine if the constraint should be broken.


isActive

boolean isActive()
Returns true if this constraint is marked as being active.


setActive

void setActive(boolean active)
Marks this constraint as being inactive.


isAdded

boolean isAdded()
Returns true if the constraint is marked as being already added to the system


setAdded

void setAdded(boolean added)
Marks this constraint as being added to the system


beginSet

void beginSet()
Begin the process of setting this constraint. After this method call, components can be added using the addPoint() and addFrame() methods. When all components have been added, endSet() should be called.


endSet

void endSet()
Concludes the process of setting this constraint.


componentsChanged

boolean componentsChanged()
Returns true if the component structure of this constraint has changed. This will be true if, since the last call to clearComponents(), new component infos have been added, or if any infos are left on the free list.


isControllable

boolean isControllable()
Returns true if at least one of the components associated with this constraint is controllable.


skipAuxState

void skipAuxState(DataBuffer data)

getAuxState

void getAuxState(DataBuffer data,
                 CollisionData myData,
                 CollisionData otherData)

setAuxState

void setAuxState(DataBuffer data,
                 CollisionData myData,
                 CollisionData otherData)

print

void print(java.io.PrintStream os)

setEdgeEdge

void setEdgeEdge(EdgeEdgeContact eec,
                 double mu,
                 DeformableCollisionData thisData,
                 DeformableCollisionData otherData)
Assigns an edge-edge collision

Parameters:
eec - edge-edge contact
mu - friction coefficient
thisData - the primary deformable collision info
otherData - the other object's collision info

setEdgeRigidBody

void setEdgeRigidBody(EdgeEdgeContact eec,
                      double mu,
                      DeformableCollisionData thisData,
                      RigidBodyCollisionData rbData)
Assigns an edge-rigidBody collision

Parameters:
eec - edge-edge contact
mu - friction coefficient
thisData - the primary deformable collision info
rbData - the other object's collision info

setVertexRigidBody

double setVertexRigidBody(ContactPenetratingPoint cpp,
                          double mu,
                          DeformableCollisionData thisData,
                          RigidBodyCollisionData rbData,
                          boolean useSignedDistanceCollider)
Assigns a Vertex->Rigid body collision, returning the perpendicular distance to the face

Parameters:
cpp - contact penetrating point
mu - friction coefficient
thisData - the primary deformable collision info
rbData - the other object's collision info
useSignedDistanceCollider - flag for determining normal and collision location information
Returns:
perpendicular distance to face

setFaceRigidBody

double setFaceRigidBody(ContactPenetratingPoint cpp,
                        double mu,
                        DeformableCollisionData thisData,
                        RigidBodyCollisionData rbData)
Assigns a Face->RigidBody collision, returning the perpendicular distance to the face

Parameters:
cpp - contact penetrating point
mu - friction coefficient
thisData - the primary deformable info
rbData - the other object's collision info
Returns:
perpendicular distance to face

setVertexDeformable

double setVertexDeformable(ContactPenetratingPoint cpp,
                           double mu,
                           DeformableCollisionData thisData,
                           DeformableCollisionData otherData)
Assigns a Vertex->Deformable collision, returning the perpendicular distance to the face

Parameters:
cpp - contact penetrating point
mu - friction coefficient
thisData - the primary deformable collision info
otherData - the other object's collision info
Returns:
perpendicular distance to face

addPoint

void addPoint(Point pnt,
              double weight)
Adds a point as a component for this constraint.

Parameters:
pnt - point to add
weight - weighting factor for the point

addFrame

void addFrame(Frame frame,
              double weight,
              Point3d loc)
Adds a frame as a component for this constraint.

Parameters:
frame - Frame to add
loc - location of the point in frame coordinates

numPoints

int numPoints()
Returns the number of points involved in the constraint

Returns:
number of points involved

numFrames

int numFrames()
Returns the number of frames involved in the constraint

Returns:
number of frames involved