|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DeformableCollisionData
Interface for handling collisions with a particular component
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. |
void |
addContact(DeformableContactConstraint c)
Add contact constraint to set of constraints |
int |
addFrictionConstraints(SparseBlockMatrix DT,
MechSystem.FrictionInfo[] finfo,
int numf)
|
boolean |
allowCollision(ContactPenetratingPoint cpp,
boolean isVertex,
CollisionData otherData)
Allow a collision between this object and the supplied 'other'. |
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. |
DeformableContactConstraint |
createContact(Vertex3d... vtxs)
|
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)
|
int |
getVertexDependencies(Vertex3d vtx,
java.util.ArrayList<Point> pointDeps,
VectorNd pointWgts,
java.util.ArrayList<Frame> frameDeps,
VectorNd frameWgts)
Determines the set of points that a vertex's position is dependent upon, along with their weights (assuming a linear relationship) |
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 |
int |
numActiveMasters(ContactPenetratingPoint cpp,
boolean isVertex)
|
int |
numActiveMasters(EdgeEdgeContact eec,
boolean isFirst)
|
void |
reduceConstraints(java.util.ArrayList<ContactPenetratingPoint> points,
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 otherData)
|
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 interface artisynth.core.mechmodels.CollisionData |
---|
addConstraintInfo, getComponent, getMesh, markMasters, numActiveUnmarkedMasters |
Method Detail |
---|
void getBilateralSizes(VectorNi sizes)
int getBilateralInfo(MechSystem.ConstraintInfo[] ginfo, int idx)
int addBilateralConstraints(SparseBlockMatrix GT, VectorNd dg, int numb)
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.
GT
- constraint matrix transposenumb
- block column number where the blocks should begin
int maxFrictionConstraintSets()
int addFrictionConstraints(SparseBlockMatrix DT, MechSystem.FrictionInfo[] finfo, int numf)
void updateFrictionConstraints()
int setBilateralImpulses(VectorNd lam, int idx)
lam
- vector containing impulse valuesidx
- starting index for constraint impulses associated with this collision
pair
void zeroImpulses()
int getBilateralImpulses(VectorNd lam, int idx)
void clearContactActivity()
DeformableContactConstraint getContact(ContactPenetratingPoint cpp, boolean isVertex)
cpp
- the contact penetrating point, consisting of a vertex/face
pairisVertex
- boolean indicating whether for this data, we own
the vertex or the face
DeformableContactConstraint getContact(EdgeEdgeContact eec, boolean isFirst)
eec
- Edge-Edge contactisFirst
- indicates whether this object owns the first edge
or second
void addContact(DeformableContactConstraint c)
DeformableContactConstraint createContact(Vertex3d... vtxs)
boolean hasActiveContact(ContactPenetratingPoint cpp, boolean isVertex)
boolean hasActiveContact(EdgeEdgeContact eec, boolean isFirst)
boolean hasActiveContacts()
int numActiveContacts()
void removeInactiveContacts()
void notifyContactsChanged()
boolean contactsHaveChanged()
void clearContactData()
void skipAuxState(DataBuffer data)
void getAuxState(DataBuffer data, CollisionData otherData)
void setAuxState(DataBuffer data, CollisionData otherData)
void getInitialAuxState(DataBuffer newData, DataBuffer oldData)
void setPenetrationTol(double tol)
double getCollisionTol()
void setFriction(double mu)
double getFriction()
boolean allowCollision(ContactPenetratingPoint cpp, boolean isVertex, CollisionData otherData)
cpp
- the contact-penetrating point involved between the two.isVertex
- if true, checks if we can allow collision based
on the vertex, otherwise if we are checking the faceotherData
- the other collision object involved
boolean allowCollision(EdgeEdgeContact eec, boolean isFirst, CollisionData otherData)
int numActiveMasters(ContactPenetratingPoint cpp, boolean isVertex)
int numActiveMasters(EdgeEdgeContact eec, boolean isFirst)
int getVertexDependencies(Vertex3d vtx, java.util.ArrayList<Point> pointDeps, VectorNd pointWgts, java.util.ArrayList<Frame> frameDeps, VectorNd frameWgts)
vtx
- the vertex belonging to this
collision
datapointDeps
- list of points that is filledpointWgts
- weights associated with the returned pointsframeDeps
- list of frames that is filledframeWgts
- weights associated with the returned frames
void reduceConstraints(java.util.ArrayList<ContactPenetratingPoint> points, java.util.ArrayList<ContactPenetratingPoint> otherPoints, CollisionData otherData)
points
- 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 |