public interface ForceEffector
Modifier and Type | Method and Description |
---|---|
void |
addPosJacobian(SparseNumberedBlockMatrix M,
double s)
Scales the components of the position Jacobian associated with this force
effector and adds it to the supplied solve matrix M.
|
void |
addSolveBlocks(SparseNumberedBlockMatrix M)
Adds any needed blocks to a solve matrix in order to accomodate the
Jacobian terms associated with this force effector.
|
void |
addVelJacobian(SparseNumberedBlockMatrix M,
double s)
Scales the components of the velocity Jacobian associated with this force
effector and adds it to the supplied solve matrix M.
|
void |
applyForces(double t)
Adds forces to the components affected by this force effector at a
particular time.
|
int |
getJacobianType()
Returns a code indicating the matrix type that results when the Jacobian
terms of this force effector are added to the solve matrix.
|
void applyForces(double t)
t
- time (seconds)void addSolveBlocks(SparseNumberedBlockMatrix M)
getSolveIndex
) for all dynamic or attached components affected by this
force effector.M
- solve matrix to which blocks should be addedvoid addPosJacobian(SparseNumberedBlockMatrix M, double s)
M is guaranteed to be the same matrix supplied in the most recent call to
addSolveBlocks
, and so implementations may choose
to cache the relevant matrix blocks from that call, instead of retrieving
them directly from M.
M
- solve matrix to which scaled position Jacobian is to be addeds
- scaling factor for position Jacobianvoid addVelJacobian(SparseNumberedBlockMatrix M, double s)
M is guaranteed to be the same matrix supplied in the most recent call to
addSolveBlocks
, and so implementations may choose
to cache the relevant matrix blocks from that call, instead of retrieving
them directly from M.
M
- solve matrix to which scaled velocity Jacobian is to be addeds
- scaling factor for velocity Jacobianint getJacobianType()
Matrix.SYMMETRIC
or Matrix.POSITIVE_DEFINITE
. The former should be set if adding the Jacobian
terms preserves symmetry, and the latter should be set if positive
definiteness if preserved. Both should be set if there is no Jacobian for
this effector (i.e., the Jacobian methods are not implemented). Matrix
types from all the force effectors are logically and-ed together to
determine the type for the entire solve matrix.