Examples of multiplyLocal()


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));
                finalMat.multiplyLocal(workingMat);
            } else {
                logger.warning("transform not currently supported: " + transform.getClass().getCanonicalName());
            }
        }
        return new Transform().fromHomogeneousMatrix(finalMat);
View Full Code Here

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

                .normalizeLocal();
        final Quaternion targetOrient = new Quaternion().fromVectorToVector(Vector3.NEG_UNIT_Z, dirTowardsMouse);

        // get a scale representing choice between direction of old and new quats
        final double scale = currentOrient.dot(targetOrient) * tpf * ROCKET_TURN_SPEED;
        currentOrient.addLocal(targetOrient.multiplyLocal(scale)).normalizeLocal();

        rocketEntityNode.setRotation(currentOrient);

        // propel forward
        rocketEntityNode.addTranslation(currentOrient.apply(Vector3.NEG_UNIT_Z, null).multiplyLocal(
View Full Code Here

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

     *            the position (in terms of vectors, not floats) of the vector to multiply
     */
    public static void multInBuffer(final ReadOnlyVector2 toMult, final FloatBuffer buf, final int index) {
        final Vector2 temp = Vector2.fetchTempInstance();
        populateFromBuffer(temp, buf, index);
        temp.multiplyLocal(toMult);
        setInBuffer(temp, buf, index);
        Vector2.releaseTempInstance(temp);
    }

    /**
 
View Full Code Here

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

                    public void perform(final Canvas source, final TwoInputStates inputState, final double tpf) {
                        // zoom in
                        final MouseState mouse = inputState.getCurrent().getMouseState();
                        final Vector2 add = new Vector2(mouse.getX() - .5 * display.getWidth(), mouse.getY() - .5
                                * display.getHeight());
                        add.multiplyLocal(scale).multiplyLocal(
                                new Vector2(2.0 / display.getWidth(), 2.0 / display.getHeight()));
                        trans.addLocal(add.getX(), add.getY());
                        scale.multiplyLocal(0.5);
                        updateTexture();
                        iterations *= 1.1f;
View Full Code Here

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

                    public void perform(final Canvas source, final TwoInputStates inputState, final double tpf) {
                        // zoom out
                        final MouseState mouse = inputState.getCurrent().getMouseState();
                        final Vector2 add = new Vector2(mouse.getX() - .5 * display.getWidth(), mouse.getY() - .5
                                * display.getHeight());
                        add.multiplyLocal(scale).multiplyLocal(
                                new Vector2(2.0 / display.getWidth(), 2.0 / display.getHeight()));
                        trans.addLocal(add.getX(), add.getY());
                        scale.multiplyLocal(1 / .5);
                        updateTexture();
                        iterations /= 1.1f;
View Full Code Here

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

        scaleVec.set(tracer.getGridSpacing());

        // First triangle (h1, h3, h2)
        tracer.get3DPoint(gridX, gridY, h1, workVec);
        workVec.multiplyLocal(scaleVec).addLocal(tracer.getGridOrigin());
        _gridTriA.setA(workVec);

        tracer.get3DPoint(gridX, gridY + 1, h3, workVec);
        workVec.multiplyLocal(scaleVec).addLocal(tracer.getGridOrigin());
        _gridTriA.setB(workVec);
View Full Code Here

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

        tracer.get3DPoint(gridX, gridY, h1, workVec);
        workVec.multiplyLocal(scaleVec).addLocal(tracer.getGridOrigin());
        _gridTriA.setA(workVec);

        tracer.get3DPoint(gridX, gridY + 1, h3, workVec);
        workVec.multiplyLocal(scaleVec).addLocal(tracer.getGridOrigin());
        _gridTriA.setB(workVec);

        tracer.get3DPoint(gridX + 1, gridY, h2, workVec);
        workVec.multiplyLocal(scaleVec).addLocal(tracer.getGridOrigin());
        _gridTriA.setC(workVec);
View Full Code Here

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

        tracer.get3DPoint(gridX, gridY + 1, h3, workVec);
        workVec.multiplyLocal(scaleVec).addLocal(tracer.getGridOrigin());
        _gridTriA.setB(workVec);

        tracer.get3DPoint(gridX + 1, gridY, h2, workVec);
        workVec.multiplyLocal(scaleVec).addLocal(tracer.getGridOrigin());
        _gridTriA.setC(workVec);

        // Second triangle (h2, h3, h4)
        _gridTriB.setA(_gridTriA.getC());
        _gridTriB.setB(_gridTriA.getB());
View Full Code Here

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

        // Second triangle (h2, h3, h4)
        _gridTriB.setA(_gridTriA.getC());
        _gridTriB.setB(_gridTriA.getB());

        tracer.get3DPoint(gridX + 1, gridY + 1, h4, workVec);
        workVec.multiplyLocal(scaleVec).addLocal(tracer.getGridOrigin());
        _gridTriB.setC(workVec);

        Vector3.releaseTempInstance(scaleVec);
        Vector3.releaseTempInstance(workVec);
View Full Code Here

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

                } else {
                    _meshData.getNormalBuffer().put((float) -tempNormal.getX()).put((float) -tempNormal.getY())
                            .put((float) -tempNormal.getZ());
                }

                tempNormal.multiplyLocal(_tubeRadius).addLocal(torusMiddle);
                _meshData.getVertexBuffer().put((float) tempNormal.getX()).put((float) tempNormal.getY())
                        .put((float) tempNormal.getZ());

                _meshData.getTextureCoords(0).getBuffer().put((float) radialFraction).put((float) circleFraction);
                i++;
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.