use of maspack.matrix.MatrixBlock in project artisynth_core by artisynth.
the class ForceTarget method addForceJacobian.
public int addForceJacobian(SparseBlockMatrix J, int bi, int solve_index) {
MatrixBlock blk = null;
if (myConnector instanceof PlanarConnector) {
blk = new Matrix1x1Block();
blk.set(0, 0, 1d);
J.addBlock(bi, solve_index, blk);
} else if (myConnector instanceof SphericalJointBase) {
blk = new Matrix3x3DiagBlock(1d, 1d, 1d);
J.addBlock(bi, solve_index, blk);
} else {
System.err.println("ForceTarget.addForceJacobian: unsupported connector type: " + myConnector.getClass());
}
return bi++;
}
Aggregations