Examples of multiplyLocal()


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

            _orient.setValue(2, 2, 1);
        }

        // The billboard must be oriented to face the camera before it is
        // transformed into the world.
        worldMatrix.multiplyLocal(_orient);
        _worldTransform.setRotation(worldMatrix);
        Matrix3.releaseTempInstance(worldMatrix);
    }

    /**
 
View Full Code Here

Examples of com.ardor3d.math.Matrix4.multiplyLocal()

            final double[] array = transform.getArray();
            final TransformElementType type = transform.getType();
            if (type == TransformElementType.Translation) {
                workingMat.setIdentity();
                workingMat.setColumn(3, new Vector4(array[0], array[1], array[2], 1.0));
                finalMat.multiplyLocal(workingMat);
            } else if (type == TransformElementType.Rotation) {
                if (array[3] != 0) {
                    workingMat.setIdentity();
                    final Matrix3 rotate = new Matrix3().fromAngleAxis(array[3] * MathUtils.DEG_TO_RAD, new Vector3(
                            array[0], array[1], array[2]));
View Full Code Here

Examples of com.ardor3d.math.Matrix4.multiplyLocal()

                if (array[3] != 0) {
                    workingMat.setIdentity();
                    final Matrix3 rotate = new Matrix3().fromAngleAxis(array[3] * MathUtils.DEG_TO_RAD, new Vector3(
                            array[0], array[1], array[2]));
                    workingMat.set(rotate);
                    finalMat.multiplyLocal(workingMat);
                }
            } else if (type == TransformElementType.Scale) {
                workingMat.setIdentity();
                workingMat.scale(new Vector4(array[0], array[1], array[2], 1), workingMat);
                finalMat.multiplyLocal(workingMat);
View Full Code Here

Examples of com.ardor3d.math.Matrix4.multiplyLocal()

                    finalMat.multiplyLocal(workingMat);
                }
            } else if (type == TransformElementType.Scale) {
                workingMat.setIdentity();
                workingMat.scale(new Vector4(array[0], array[1], array[2], 1), workingMat);
                finalMat.multiplyLocal(workingMat);
            } else if (type == TransformElementType.Matrix) {
                workingMat.fromArray(array);
                finalMat.multiplyLocal(workingMat);
            } else if (type == TransformElementType.Lookat) {
                final Vector3 pos = new Vector3(array[0], array[1], array[2]);
View Full Code Here

Examples of com.ardor3d.math.Matrix4.multiplyLocal()

                workingMat.setIdentity();
                workingMat.scale(new Vector4(array[0], array[1], array[2], 1), workingMat);
                finalMat.multiplyLocal(workingMat);
            } else if (type == TransformElementType.Matrix) {
                workingMat.fromArray(array);
                finalMat.multiplyLocal(workingMat);
            } else if (type == TransformElementType.Lookat) {
                final Vector3 pos = new Vector3(array[0], array[1], array[2]);
                final Vector3 target = new Vector3(array[3], array[4], array[5]);
                final Vector3 up = new Vector3(array[6], array[7], array[8]);
                final Matrix3 rot = new Matrix3();
View Full Code Here

Examples of com.ardor3d.math.Matrix4.multiplyLocal()

                final Vector3 up = new Vector3(array[6], array[7], array[8]);
                final Matrix3 rot = new Matrix3();
                rot.lookAt(target.subtractLocal(pos), up);
                workingMat.set(rot);
                workingMat.setColumn(3, new Vector4(array[0], array[1], array[2], 1.0));
                finalMat.multiplyLocal(workingMat);
            } else {
                if (logger.isLoggable(Level.WARNING)) {
                    logger.warning("transform not currently supported: " + transform.getClass().getCanonicalName());
                }
            }
View Full Code Here

Examples of com.ardor3d.math.Matrix4.multiplyLocal()

        for (final Element transform : transforms) {
            final double[] array = _colladaDOMUtil.parseDoubleArray(transform);
            if ("translate".equals(transform.getName())) {
                workingMat.setIdentity();
                workingMat.setColumn(3, new Vector4(array[0], array[1], array[2], 1.0));
                finalMat.multiplyLocal(workingMat);
            } else if ("rotate".equals(transform.getName())) {
                if (array[3] != 0) {
                    workingMat.setIdentity();
                    final Matrix3 rotate = new Matrix3().fromAngleAxis(array[3] * MathUtils.DEG_TO_RAD, new Vector3(
                            array[0], array[1], array[2]));
View Full Code Here

Examples of com.ardor3d.math.Matrix4.multiplyLocal()

                if (array[3] != 0) {
                    workingMat.setIdentity();
                    final Matrix3 rotate = new Matrix3().fromAngleAxis(array[3] * MathUtils.DEG_TO_RAD, new Vector3(
                            array[0], array[1], array[2]));
                    workingMat.set(rotate);
                    finalMat.multiplyLocal(workingMat);
                }
            } else if ("scale".equals(transform.getName())) {
                workingMat.setIdentity();
                workingMat.scale(new Vector4(array[0], array[1], array[2], 1), workingMat);
                finalMat.multiplyLocal(workingMat);
View Full Code Here

Examples of com.ardor3d.math.Matrix4.multiplyLocal()

                    finalMat.multiplyLocal(workingMat);
                }
            } else if ("scale".equals(transform.getName())) {
                workingMat.setIdentity();
                workingMat.scale(new Vector4(array[0], array[1], array[2], 1), workingMat);
                finalMat.multiplyLocal(workingMat);
            } else if ("matrix".equals(transform.getName())) {
                workingMat.fromArray(array);
                finalMat.multiplyLocal(workingMat);
            } else if ("lookat".equals(transform.getName())) {
                final Vector3 pos = new Vector3(array[0], array[1], array[2]);
View Full Code Here

Examples of com.ardor3d.math.Matrix4.multiplyLocal()

                workingMat.setIdentity();
                workingMat.scale(new Vector4(array[0], array[1], array[2], 1), workingMat);
                finalMat.multiplyLocal(workingMat);
            } else if ("matrix".equals(transform.getName())) {
                workingMat.fromArray(array);
                finalMat.multiplyLocal(workingMat);
            } else if ("lookat".equals(transform.getName())) {
                final Vector3 pos = new Vector3(array[0], array[1], array[2]);
                final Vector3 target = new Vector3(array[3], array[4], array[5]);
                final Vector3 up = new Vector3(array[6], array[7], array[8]);
                final Matrix3 rot = new Matrix3();
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.