Examples of fromAngleAxis()


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

                }
            } else {
                final Vector3 axis = workVect2.crossLocal(workVect);
                // if it is not, shift the velocity to bring it back in line
                if ((Double.doubleToLongBits(pVelocity.lengthSquared()) & 0x1d) != 0) {
                    workMat.fromAngleAxis(_turnSpeed * dt, axis);
                } else {
                    workMat.fromAngleAxis(-_turnSpeed * dt, axis);
                }
                workMat.applyPost(pVelocity, pVelocity);
            }
View Full Code Here

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

                final Vector3 axis = workVect2.crossLocal(workVect);
                // if it is not, shift the velocity to bring it back in line
                if ((Double.doubleToLongBits(pVelocity.lengthSquared()) & 0x1d) != 0) {
                    workMat.fromAngleAxis(_turnSpeed * dt, axis);
                } else {
                    workMat.fromAngleAxis(-_turnSpeed * dt, axis);
                }
                workMat.applyPost(pVelocity, pVelocity);
            }
        } else {
            final Vector3 axis = workVect2.crossLocal(workVect);
View Full Code Here

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

        } else {
            final Vector3 axis = workVect2.crossLocal(workVect);
            // IN THE INNER ZONE...
            // Alter the heading based on how fast we are going
            if ((index & 0x1f) != 0) {
                workMat.fromAngleAxis(_turnSpeed * dt, axis);
            } else {
                workMat.fromAngleAxis(-_turnSpeed * dt, axis);
            }
            workMat.applyPost(pVelocity, pVelocity);
        }
View Full Code Here

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

            // IN THE INNER ZONE...
            // Alter the heading based on how fast we are going
            if ((index & 0x1f) != 0) {
                workMat.fromAngleAxis(_turnSpeed * dt, axis);
            } else {
                workMat.fromAngleAxis(-_turnSpeed * dt, axis);
            }
            workMat.applyPost(pVelocity, pVelocity);
        }
        Vector3.releaseTempInstance(workVect);
        Vector3.releaseTempInstance(workVect2);
View Full Code Here

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

                    // range is now 0 to 90 degrees, reflected
                    angle = Math.abs(angle);
                    // range is now -45 to 45 degrees
                    angle -= MathUtils.HALF_PI / 2.0;

                    headRotation.fromAngleAxis(angle, Vector3.UNIT_X);
                    headSource.setJointRotation(headJoint, headRotation);
                }
            }
        });
View Full Code Here

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

            // Neck
            final Quaternion q = Quaternion.fetchTempInstance();
            final double vv = (time % (LOOP_TIME * 2d)) / LOOP_TIME - 1d;
            final double v = (vv > 0) ? vv : -vv;
            q.fromAngleAxis(v * 60 * MathUtils.DEG_TO_RAD - 30 * MathUtils.DEG_TO_RAD, Vector3.UNIT_Z);
            targetJoint(pose, 13, q);

            q.fromAngleAxis(v * 5 * MathUtils.DEG_TO_RAD - 35 * MathUtils.DEG_TO_RAD, Vector3.UNIT_X);
            q.fromAngleAxis(v * 75 * MathUtils.DEG_TO_RAD, Vector3.UNIT_X);

View Full Code Here

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

            final double vv = (time % (LOOP_TIME * 2d)) / LOOP_TIME - 1d;
            final double v = (vv > 0) ? vv : -vv;
            q.fromAngleAxis(v * 60 * MathUtils.DEG_TO_RAD - 30 * MathUtils.DEG_TO_RAD, Vector3.UNIT_Z);
            targetJoint(pose, 13, q);

            q.fromAngleAxis(v * 5 * MathUtils.DEG_TO_RAD - 35 * MathUtils.DEG_TO_RAD, Vector3.UNIT_X);
            q.fromAngleAxis(v * 75 * MathUtils.DEG_TO_RAD, Vector3.UNIT_X);

            Quaternion.releaseTempInstance(q);

            p.setLocation(Math.sin(time) * 5, Math.cos(time) * 5 + 10, 5);
View Full Code Here

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

            final double v = (vv > 0) ? vv : -vv;
            q.fromAngleAxis(v * 60 * MathUtils.DEG_TO_RAD - 30 * MathUtils.DEG_TO_RAD, Vector3.UNIT_Z);
            targetJoint(pose, 13, q);

            q.fromAngleAxis(v * 5 * MathUtils.DEG_TO_RAD - 35 * MathUtils.DEG_TO_RAD, Vector3.UNIT_X);
            q.fromAngleAxis(v * 75 * MathUtils.DEG_TO_RAD, Vector3.UNIT_X);

            Quaternion.releaseTempInstance(q);

            p.setLocation(Math.sin(time) * 5, Math.cos(time) * 5 + 10, 5);
            if (updateLight) {
View Full Code Here

Examples of com.jme.math.Matrix3f.fromAngleAxis()

    // This gimble locks, but good enough for now...
    public static Matrix3f calcRotationMatrix(float x, float y, float z) {
        Matrix3f m3f = new Matrix3f();
        m3f.loadIdentity();
        m3f.fromAngleAxis(x, new Vector3f(1f, 0f, 0f));
        Matrix3f rotY = new Matrix3f();
        rotY.loadIdentity();
        rotY.fromAngleAxis(y, new Vector3f(0f, 1f, 0f));
        Matrix3f rotZ = new Matrix3f();
        rotZ.loadIdentity();
View Full Code Here

Examples of com.jme.math.Matrix3f.fromAngleAxis()

        Matrix3f m3f = new Matrix3f();
        m3f.loadIdentity();
        m3f.fromAngleAxis(x, new Vector3f(1f, 0f, 0f));
        Matrix3f rotY = new Matrix3f();
        rotY.loadIdentity();
        rotY.fromAngleAxis(y, new Vector3f(0f, 1f, 0f));
        Matrix3f rotZ = new Matrix3f();
        rotZ.loadIdentity();
        rotZ.fromAngleAxis(z, new Vector3f(0f, 0f, 1f));

        m3f.multLocal(rotY);
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.