use of maspack.matrix.RotationMatrix3d in project artisynth_core by artisynth.
the class CustomSphericalCoupling method getRpy.
public void getRpy(Vector3d angs, RigidTransform3d TGD) {
// on entry, TGD is set to TCD. It is then projected to TGD
projectToConstraint(TGD, TGD);
double[] rpy = new double[3];
RotationMatrix3d RDC = new RotationMatrix3d();
RDC.transpose(TGD.R);
doGetRpy(rpy, RDC);
angs.x = rpy[2];
angs.y = rpy[1];
angs.z = rpy[0];
}
use of maspack.matrix.RotationMatrix3d in project artisynth_core by artisynth.
the class ParameterizedCoupling method setRoll.
public void setRoll(RigidTransform3d TGD, double roll) {
// decompose matrix, update roll matrix
RotationMatrix3d Rz = new RotationMatrix3d();
RotationMatrix3d RDC = new RotationMatrix3d(TGD.R);
RDC.transpose();
doRollDecomposition(RDC, RDC, Rz);
Rz.setRotZ(roll);
RDC.mul(Rz);
TGD.R.transpose(RDC);
checkConstraintStorage();
myConstraintInfo[5].coordinate = roll;
}
use of maspack.matrix.RotationMatrix3d in project artisynth_core by artisynth.
the class ParameterizedCoupling method getRoll.
public double getRoll(RigidTransform3d TGD) {
// On entry, TGD is set to TCD. It is then projected to TGD
projectToConstraint(TGD, TGD);
RotationMatrix3d RDC = new RotationMatrix3d();
RDC.transpose(TGD.R);
return doGetRoll(RDC);
}
use of maspack.matrix.RotationMatrix3d in project artisynth_core by artisynth.
the class ViewerManager method resetViewers.
public void resetViewers(AxisAngle frontView) {
AxisAlignedRotation view = AxisAlignedRotation.getNearest(new RotationMatrix3d(frontView));
for (GLViewer v : myViewers) {
v.setDefaultAxialView(view);
resetViewer(v);
}
}
use of maspack.matrix.RotationMatrix3d in project artisynth_core by artisynth.
the class MechSystemSolver method getRWB.
private RotationMatrix3d[] getRWB() {
RotationMatrix3d[] RWB = new RotationMatrix3d[2 * myNumActive];
MechSystemBase base = (MechSystemBase) mySys;
for (int i = 0; i < myNumActive; i++) {
DynamicComponent c = base.myDynamicComponents.get(i);
RotationMatrix3d R = new RotationMatrix3d(((RigidBody) c).getPose().R);
R.transpose();
RWB[i * 2 + 0] = R;
RWB[i * 2 + 1] = R;
}
return RWB;
}
Aggregations