Package com.ardor3d.math

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


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

    /**
 
View Full Code Here


        final Vector4 position = Vector4.fetchTempInstance();
        position.set((screenPosition.getX() / getWidth() - _viewPortLeft) / (_viewPortRight - _viewPortLeft) * 2 - 1,
                (screenPosition.getY() / getHeight() - _viewPortBottom) / (_viewPortTop - _viewPortBottom) * 2 - 1,
                zDepth * 2 - 1, 1);
        _modelViewProjectionInverse.applyPre(position, position);
        position.multiplyLocal(1.0 / position.getW());
        store.setX(position.getX());
        store.setY(position.getY());
        store.setZ(position.getZ());

        Vector4.releaseTempInstance(position);
View Full Code Here

        }
        checkModelViewProjection();
        final Vector4 position = Vector4.fetchTempInstance();
        position.set(worldPosition.getX(), worldPosition.getY(), worldPosition.getZ(), 1);
        _modelViewProjection.applyPre(position, position);
        position.multiplyLocal(1.0 / position.getW());
        store.setX(position.getX());
        store.setY(position.getY());
        store.setZ(position.getZ());
        Vector4.releaseTempInstance(position);
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.