Examples of fromAxes()


Examples of com.ardor3d.math.Matrix3.fromAxes()

        final ReadOnlyVector3 camUp = _camera.getUp();
        final ReadOnlyVector3 camDir = _camera.getDirection();
        final ReadOnlyVector3 camLoc = _camera.getLocation();

        final Matrix3 rotation = Matrix3.fetchTempInstance();
        rotation.fromAxes(camLeft, camUp, camDir);

        setRotation(rotation);
        setTranslation(camLoc);

        Matrix3.releaseTempInstance(rotation);
View Full Code Here

Examples of com.ardor3d.math.Quaternion.fromAxes()

        // quaternion is computed, then normalized to unit length. The result is
        // the slerp of the two input quaternions with t-value of 1/2. The
        // result is converted back to a rotation matrix and its columns are
        // selected as the merged box axes.
        final Quaternion kQ0 = Quaternion.fetchTempInstance(), kQ1 = Quaternion.fetchTempInstance();
        kQ0.fromAxes(rkBox0._xAxis, rkBox0._yAxis, rkBox0._zAxis);
        kQ1.fromAxes(rkBox1._xAxis, rkBox1._yAxis, rkBox1._zAxis);

        if (kQ0.dot(kQ1) < 0.0) {
            kQ1.multiplyLocal(-1.0);
        }
View Full Code Here

Examples of com.ardor3d.math.Quaternion.fromAxes()

            final double texelSizeW = (2 * radius) / _shadowMapRenderer.getWidth();
            final double texelSizeH = (2 * radius) / _shadowMapRenderer.getHeight();

            // build a Quaternion from camera axes to move
            final Quaternion q = Quaternion.fetchTempInstance();
            q.fromAxes(shadowCam.getLeft(), shadowCam.getUp(), shadowCam.getDirection());

            // invert to calculate in light space
            final Vector3 lightSpace = q.invert(null).apply(tmpVec, Vector3.fetchTempInstance());

            // snap to nearest texel
View Full Code Here

Examples of com.jme3.math.Quaternion.fromAxes()

        if (firstPersonConstraint && up.getY() < 0) {
            return;
        }

        Quaternion q = new Quaternion();
        q.fromAxes(left, up, dir);
        q.normalizeLocal();

        cam.setAxes(q);
    }
View Full Code Here

Examples of com.jme3.math.Quaternion.fromAxes()

        mat.mult(up, up);
        mat.mult(left, left);
        mat.mult(dir, dir);

        Quaternion q = new Quaternion();
        q.fromAxes(left, up, dir);
        q.normalizeLocal();

        cam.setAxes(q);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.