Search in sources :

Example 46 with RotationMatrix3d

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];
}
Also used : RotationMatrix3d(maspack.matrix.RotationMatrix3d)

Example 47 with RotationMatrix3d

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;
}
Also used : RotationMatrix3d(maspack.matrix.RotationMatrix3d)

Example 48 with RotationMatrix3d

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);
}
Also used : RotationMatrix3d(maspack.matrix.RotationMatrix3d)

Example 49 with RotationMatrix3d

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);
    }
}
Also used : AxisAlignedRotation(maspack.matrix.AxisAlignedRotation) GLViewer(maspack.render.GL.GLViewer) RotationMatrix3d(maspack.matrix.RotationMatrix3d)

Example 50 with RotationMatrix3d

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;
}
Also used : RotationMatrix3d(maspack.matrix.RotationMatrix3d)

Aggregations

RotationMatrix3d (maspack.matrix.RotationMatrix3d)66 Vector3d (maspack.matrix.Vector3d)27 RigidTransform3d (maspack.matrix.RigidTransform3d)15 Point3d (maspack.matrix.Point3d)14 Matrix3d (maspack.matrix.Matrix3d)13 SymmetricMatrix3d (maspack.matrix.SymmetricMatrix3d)9 AxisAngle (maspack.matrix.AxisAngle)7 Matrix6d (maspack.matrix.Matrix6d)6 Point (artisynth.core.mechmodels.Point)4 AffineTransform3d (maspack.matrix.AffineTransform3d)4 SVDecomposition3d (maspack.matrix.SVDecomposition3d)4 VectorNd (maspack.matrix.VectorNd)3 InternalErrorException (maspack.util.InternalErrorException)3 FrameMaterial (artisynth.core.materials.FrameMaterial)2 RotAxisFrameMaterial (artisynth.core.materials.RotAxisFrameMaterial)2 JFrame (javax.swing.JFrame)2 AxisAlignedRotation (maspack.matrix.AxisAlignedRotation)2 Matrix6dBlock (maspack.matrix.Matrix6dBlock)2 Matrix6x3Block (maspack.matrix.Matrix6x3Block)2 Plane (maspack.matrix.Plane)2