|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectartisynth.core.mechmodels.DeformableCollisionDataBase
public abstract class DeformableCollisionDataBase
Constructor Summary | |
---|---|
DeformableCollisionDataBase(PolygonalMesh mesh)
|
|
DeformableCollisionDataBase(PolygonalMesh mesh,
DeformableContactConstraint stub)
|
Method Summary | |
---|---|
int |
addBilateralConstraints(SparseBlockMatrix GT,
VectorNd dg,
int numb)
Adds the matrix blocks associated with the bodies contact constraints to the constraint matrix transpose. |
int |
addConstraintInfo(Vertex3d vtx,
Point3d pnt,
double weight,
DeformableContactConstraint con)
Adds the point information from this object's vertex and weight to the
supplied constraint. |
void |
addContact(DeformableContactConstraint c)
Add contact constraint to set of constraints |
int |
addFrictionConstraints(SparseBlockMatrix DT,
MechSystem.FrictionInfo[] finfo,
int numf)
|
boolean |
allowCollision(EdgeEdgeContact eec,
boolean isFirst,
CollisionData otherData)
|
void |
clearContactActivity()
Deactivates all the current contact constraints. |
void |
clearContactData()
Clears all the contact constraint data. |
boolean |
contactsHaveChanged()
Returns true if the contact structure has changed such that the GT matrix will have a different structure and will have to be reanalyzed. |
void |
getAuxState(DataBuffer data,
CollisionData otherData)
|
int |
getBilateralImpulses(VectorNd lam,
int idx)
|
int |
getBilateralInfo(MechSystem.ConstraintInfo[] ginfo,
int idx)
|
void |
getBilateralSizes(VectorNi sizes)
|
double |
getCollisionTol()
|
DeformableContactConstraint |
getContact(ContactPenetratingPoint cpp,
boolean isVertex)
Gets a constraint for vertex-face contact. |
DeformableContactConstraint |
getContact(EdgeEdgeContact eec,
boolean isFirst)
Gets a constraint for an edge-edge contact. |
double |
getFriction()
|
void |
getInitialAuxState(DataBuffer newData,
DataBuffer oldData)
|
PolygonalMesh |
getMesh()
Gets the PolygonalMesh used for collisions |
boolean |
hasActiveContact(ContactPenetratingPoint cpp,
boolean isVertex)
Returns true if this FEM data set contains an active contact involving a specified vertex or pair of vertices. |
boolean |
hasActiveContact(EdgeEdgeContact eec,
boolean isFirst)
|
boolean |
hasActiveContacts()
Determines whether or not any of the contact constraints are currently active |
int |
maxFrictionConstraintSets()
|
void |
notifyContactsChanged()
Notification that the components associated with a specific contact constraint has changed, and therefore the GT matrix will have a different structure for the next step. |
int |
numActiveContacts()
Counts the number of contact constraints that are currently active |
void |
reduceConstraints(java.util.ArrayList<ContactPenetratingPoint> myPoints,
java.util.ArrayList<ContactPenetratingPoint> otherPoints,
CollisionData otherData)
Culls the set of constraints to a reduced set |
void |
removeInactiveContacts()
Removes all contact contraints which are currently inactive. |
void |
setAuxState(DataBuffer data,
CollisionData other)
|
int |
setBilateralImpulses(VectorNd lam,
int idx)
Sets the impulses associated with the contact constraints. |
void |
setFriction(double mu)
|
void |
setPenetrationTol(double tol)
|
void |
skipAuxState(DataBuffer data)
|
void |
updateFrictionConstraints()
|
void |
zeroImpulses()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface artisynth.core.mechmodels.DeformableCollisionData |
---|
allowCollision, createContact, getVertexDependencies, numActiveMasters, numActiveMasters |
Methods inherited from interface artisynth.core.mechmodels.CollisionData |
---|
getComponent, markMasters, numActiveUnmarkedMasters |
Constructor Detail |
---|
public DeformableCollisionDataBase(PolygonalMesh mesh, DeformableContactConstraint stub)
public DeformableCollisionDataBase(PolygonalMesh mesh)
Method Detail |
---|
public PolygonalMesh getMesh()
CollisionData
getMesh
in interface CollisionData
public void getBilateralSizes(VectorNi sizes)
getBilateralSizes
in interface DeformableCollisionData
public int getBilateralInfo(MechSystem.ConstraintInfo[] ginfo, int idx)
getBilateralInfo
in interface DeformableCollisionData
public int addBilateralConstraints(SparseBlockMatrix GT, VectorNd dg, int numb)
DeformableCollisionData
Deformable contact constraints are currently implemented as bilateral constraints to save computational effort. The unilateral nature of the constraint is handled by examining its impulse after the velocity solve. If the impulse is negative, that indicates that the constraint is trying to separate and constraint is removed.
addBilateralConstraints
in interface DeformableCollisionData
GT
- constraint matrix transposenumb
- block column number where the blocks should begin
public int maxFrictionConstraintSets()
maxFrictionConstraintSets
in interface DeformableCollisionData
public int addFrictionConstraints(SparseBlockMatrix DT, MechSystem.FrictionInfo[] finfo, int numf)
addFrictionConstraints
in interface DeformableCollisionData
public void updateFrictionConstraints()
updateFrictionConstraints
in interface DeformableCollisionData
public int setBilateralImpulses(VectorNd lam, int idx)
DeformableCollisionData
setBilateralImpulses
in interface DeformableCollisionData
lam
- vector containing impulse valuesidx
- starting index for constraint impulses associated with this collision
pair
public void zeroImpulses()
zeroImpulses
in interface DeformableCollisionData
public int getBilateralImpulses(VectorNd lam, int idx)
getBilateralImpulses
in interface DeformableCollisionData
public void clearContactActivity()
DeformableCollisionData
clearContactActivity
in interface DeformableCollisionData
public boolean hasActiveContact(ContactPenetratingPoint cpp, boolean isVertex)
DeformableCollisionData
hasActiveContact
in interface DeformableCollisionData
public DeformableContactConstraint getContact(ContactPenetratingPoint cpp, boolean isVertex)
DeformableCollisionData
getContact
in interface DeformableCollisionData
cpp
- the contact penetrating point, consisting of a vertex/face
pairisVertex
- boolean indicating whether for this data, we own
the vertex or the face
public DeformableContactConstraint getContact(EdgeEdgeContact eec, boolean isFirst)
DeformableCollisionData
getContact
in interface DeformableCollisionData
eec
- Edge-Edge contactisFirst
- indicates whether this object owns the first edge
or second
public void addContact(DeformableContactConstraint c)
DeformableCollisionData
addContact
in interface DeformableCollisionData
public boolean hasActiveContact(EdgeEdgeContact eec, boolean isFirst)
hasActiveContact
in interface DeformableCollisionData
public void removeInactiveContacts()
DeformableCollisionData
removeInactiveContacts
in interface DeformableCollisionData
public boolean hasActiveContacts()
DeformableCollisionData
hasActiveContacts
in interface DeformableCollisionData
public int numActiveContacts()
DeformableCollisionData
numActiveContacts
in interface DeformableCollisionData
public void notifyContactsChanged()
DeformableCollisionData
notifyContactsChanged
in interface DeformableCollisionData
public boolean contactsHaveChanged()
DeformableCollisionData
contactsHaveChanged
in interface DeformableCollisionData
public void clearContactData()
DeformableCollisionData
clearContactData
in interface DeformableCollisionData
public void skipAuxState(DataBuffer data)
skipAuxState
in interface DeformableCollisionData
public void getAuxState(DataBuffer data, CollisionData otherData)
getAuxState
in interface DeformableCollisionData
public void setAuxState(DataBuffer data, CollisionData other)
setAuxState
in interface DeformableCollisionData
public void getInitialAuxState(DataBuffer newData, DataBuffer oldData)
getInitialAuxState
in interface DeformableCollisionData
public void setPenetrationTol(double tol)
setPenetrationTol
in interface DeformableCollisionData
public double getCollisionTol()
getCollisionTol
in interface DeformableCollisionData
public void setFriction(double mu)
setFriction
in interface DeformableCollisionData
public double getFriction()
getFriction
in interface DeformableCollisionData
public boolean allowCollision(EdgeEdgeContact eec, boolean isFirst, CollisionData otherData)
allowCollision
in interface DeformableCollisionData
public int addConstraintInfo(Vertex3d vtx, Point3d pnt, double weight, DeformableContactConstraint con)
CollisionData
this
object's vertex and weight to the
supplied constraint.
addConstraintInfo
in interface CollisionData
vtx
- vertex belonging to this
objectpnt
- actual world location of constraintweight
- weight used in constraintcon
- the constraint to modify
public void reduceConstraints(java.util.ArrayList<ContactPenetratingPoint> myPoints, java.util.ArrayList<ContactPenetratingPoint> otherPoints, CollisionData otherData)
DeformableCollisionData
reduceConstraints
in interface DeformableCollisionData
myPoints
- list of deformable penetrating pointsotherData
- collision data from the other object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |