public class VertexContactMaster extends java.lang.Object implements ContactMaster
| Constructor and Description |
|---|
VertexContactMaster(CollidableBody collidable,
Vertex3d[] vtxs,
double[] wgts) |
| Modifier and Type | Method and Description |
|---|---|
void |
add1DConstraintBlocks(SparseBlockMatrix GT,
int bj,
double scale,
ContactPoint cpnt,
Vector3d dir)
Adds blocks to the constraint matrix GT to implement a 1D constraint in a
specified direction.
|
void |
add2DConstraintBlocks(SparseBlockMatrix GT,
int bj,
double scale,
ContactPoint cpnt,
Vector3d dir0,
Vector3d dir1)
Adds blocks to the constraint matrix GT to implement a 2D constraint in
two specified directions.
|
void |
addRelativeVelocity(Vector3d vel,
double scale,
ContactPoint cpnt)
Accumulate the velocity at the contact due to the current
velocity of the underlying dynamic components.
|
int |
collectMasterComponents(java.util.HashSet<DynamicComponent> masters,
boolean activeOnly)
Collects all the underlying dynamic ``master'' components.
|
void |
computeForceOnMasters(VectorNd uvec,
Vector3d fc,
double scale,
ContactPoint cpnt,
SparseBlockMatrix S)
XXX Experimental XXX
Compute the forces on the masters resulting from a force
fc applied at the contact point, and accumulate them in uvec,
whose size should equal that of the system forces.
|
boolean |
isControllable()
Queries whether at least one of the underlying dynamic components is
controllable.
|
public VertexContactMaster(CollidableBody collidable, Vertex3d[] vtxs, double[] wgts)
public void add1DConstraintBlocks(SparseBlockMatrix GT, int bj, double scale, ContactPoint cpnt, Vector3d dir)
ContactMasterbj,
while the block row(s) are determined internally by the solve indices of
the underlying dynamic components.add1DConstraintBlocks in interface ContactMasterGT - constraint matrixbj - block column indexscale - TODOcpnt - contact pointdir - friction directionpublic void add2DConstraintBlocks(SparseBlockMatrix GT, int bj, double scale, ContactPoint cpnt, Vector3d dir0, Vector3d dir1)
ContactMasterbj, while the block row(s) are determined internally
by the solve indices of the underlying dynamic components.add2DConstraintBlocks in interface ContactMasterGT - constraint matrixbj - block column indexscale - TODOcpnt - contact pointdir0 - first friction directiondir1 - second friction directionpublic void addRelativeVelocity(Vector3d vel, double scale, ContactPoint cpnt)
ContactMasteraddRelativeVelocity in interface ContactMastervel - accumulates velocityscale - TODOcpnt - contact pointpublic void computeForceOnMasters(VectorNd uvec, Vector3d fc, double scale, ContactPoint cpnt, SparseBlockMatrix S)
ContactMastercomputeForceOnMasters in interface ContactMasterpublic boolean isControllable()
ContactMasterisControllable in interface ContactMastertrue if at least one dynamic component is
controllablepublic int collectMasterComponents(java.util.HashSet<DynamicComponent> masters, boolean activeOnly)
ContactMastermasters, i.e., the number of components that were not already present
there.collectMasterComponents in interface ContactMastermasters - set to which the dynamic components should be addedactiveOnly - restrict collected components to those which are active