Package javax.vecmath

Examples of javax.vecmath.Quat4d


    @Override
    public void resetToNominalAngleOfView() {
        Transform3D viewingTransform = new Transform3D();
        viewTransform.getTransform(viewingTransform);
        // set viewer angle of view
        Quat4d rotationQuat = new Quat4d();
        viewingTransform.get(rotationQuat);
        rotationQuat.x = 0;
        rotationQuat.z = 0;
        viewingTransform.setRotation(rotationQuat);
        // set viewer position
View Full Code Here


    @Override
    public void resetToNominalAngleOfView() {
        Transform3D viewingTransform = new Transform3D();
        viewTransform.getTransform(viewingTransform);
        // set viewer angle of view
        Quat4d rotationQuat = new Quat4d();
        viewingTransform.get(rotationQuat);
        rotationQuat.x = 0;
        rotationQuat.z = 0;
        viewingTransform.setRotation(rotationQuat);
        // set viewer position
View Full Code Here

     * @param transform3D is supposed to be normalized
     * @param axis
     * @return
     */
    public static double getRotationFromTransform(Transform3D transform3D, Axis axis) {
        Quat4d rotationQuat = new Quat4d();
        transform3D.get(rotationQuat);
        double angle = 2 * Math.acos(rotationQuat.w);
        switch (axis) {
        case X:
            if (rotationQuat.x < 0) {
View Full Code Here

TOP

Related Classes of javax.vecmath.Quat4d

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.