Package com.ardor3d.math

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


                    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

                    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

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.