public interface BodyConstrainer extends HasAuxState
HasAuxState.StateContext
Modifier and Type | Method and Description |
---|---|
int |
getBilateralConstraints(java.util.ArrayList<RigidBodyConstraint> bilaterals)
Gets the bilateral constraints associated with this constrainer.
|
int |
getBilateralImpulses(VectorNd lam,
int idx) |
void |
getBilateralSizes(VectorNi sizes) |
ConnectableBody |
getBodyA()
Returns the first body associated with this constrainer.
|
ConnectableBody |
getBodyB()
Returns the second body associated with this constrainer, or null if there
is no such body.
|
double |
getPenetrationTol() |
double |
getUnilateralConstraints(java.util.ArrayList<RigidBodyConstraint> unilaterals,
boolean setEngaged)
Gets the unilateral constraints associated with this constrainer.
|
int |
getUnilateralImpulses(VectorNd the,
int idx) |
void |
getUnilateralSizes(VectorNi sizes) |
boolean |
hasUnilateralConstraints()
Returns true if this constrainer has unilateral constraints.
|
int |
numBilateralConstraints()
Returns the number of bilateral constraints associated with this
constrainer.
|
int |
numUnilateralConstraints()
Returns the number of unilateral constraints which are currently
engaged.
|
int |
setBilateralImpulses(VectorNd lam,
double h,
int idx) |
void |
setPenetrationTol(double tol) |
int |
setUnilateralImpulses(VectorNd the,
double h,
int idx) |
void |
updateBodyStates(double t,
boolean setEngaged)
Updates internal information needed for computing constraints.
|
double |
updateConstraints(double t,
int flags) |
void |
updateUnilateralConstraints(java.util.ArrayList<RigidBodyConstraint> unilaterals,
int offset,
int num)
Updates the unilateral constraints associated with this constrainer.
|
void |
zeroImpulses() |
advanceAuxState, getAuxState, getInitialAuxState, setAuxState, skipAuxState
void updateBodyStates(double t, boolean setEngaged)
t
- current time (seconds)setEngaged
- if true
, then the method should determine
which unilateral constraints are engagedConnectableBody getBodyA()
ConnectableBody getBodyB()
int numBilateralConstraints()
int numUnilateralConstraints()
getUnilateralConstraints
with
setEngaged
set to false
.int getBilateralConstraints(java.util.ArrayList<RigidBodyConstraint> bilaterals)
bilaterals
- array list into which the constrainer places the constraintsint setBilateralImpulses(VectorNd lam, double h, int idx)
int getBilateralImpulses(VectorNd lam, int idx)
void getBilateralSizes(VectorNi sizes)
void getUnilateralSizes(VectorNi sizes)
double updateConstraints(double t, int flags)
double getUnilateralConstraints(java.util.ArrayList<RigidBodyConstraint> unilaterals, boolean setEngaged)
unilaterals
- array list into which the constrainer places the constraintssetEngaged
- if true, recompute the set of unilateral constraints.
If false, the set of unilateral constraints will stay the same.int setUnilateralImpulses(VectorNd the, double h, int idx)
int getUnilateralImpulses(VectorNd the, int idx)
void zeroImpulses()
boolean hasUnilateralConstraints()
void updateUnilateralConstraints(java.util.ArrayList<RigidBodyConstraint> unilaterals, int offset, int num)
getUnilateralConstraints
, located at a specific offset within an array
list.unilaterals
- contains constraints which should be updatedoffset
- starting location of constraints within unilaterals
num
- number of constraints to updatevoid setPenetrationTol(double tol)
double getPenetrationTol()