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)
ContactMaster
bj
,
while the block row(s) are determined internally by the solve indices of
the underlying dynamic components.add1DConstraintBlocks
in interface ContactMaster
GT
- constraint matrixbj
- block column indexscale
- TODOcpnt
- contact pointdir
- friction directionpublic void add2DConstraintBlocks(SparseBlockMatrix GT, int bj, double scale, ContactPoint cpnt, Vector3d dir0, Vector3d dir1)
ContactMaster
bj
, while the block row(s) are determined internally
by the solve indices of the underlying dynamic components.add2DConstraintBlocks
in interface ContactMaster
GT
- constraint matrixbj
- block column indexscale
- TODOcpnt
- contact pointdir0
- first friction directiondir1
- second friction directionpublic void addRelativeVelocity(Vector3d vel, double scale, ContactPoint cpnt)
ContactMaster
addRelativeVelocity
in interface ContactMaster
vel
- accumulates velocityscale
- TODOcpnt
- contact pointpublic void computeForceOnMasters(VectorNd uvec, Vector3d fc, double scale, ContactPoint cpnt, SparseBlockMatrix S)
ContactMaster
computeForceOnMasters
in interface ContactMaster
public boolean isControllable()
ContactMaster
isControllable
in interface ContactMaster
true
if at least one dynamic component is
controllablepublic int collectMasterComponents(java.util.HashSet<DynamicComponent> masters, boolean activeOnly)
ContactMaster
masters
, i.e., the number of components that were not already present
there.collectMasterComponents
in interface ContactMaster
masters
- set to which the dynamic components should be addedactiveOnly
- restrict collected components to those which are active