Package com.ardor3d.math

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


            if (strafeLR == 1) {
                loc.addLocal(camera.getLeft());
            } else if (strafeLR == -1) {
                loc.subtractLocal(camera.getLeft());
            }
            loc.normalizeLocal().multiplyLocal(_moveSpeed * tpf).addLocal(camera.getLocation());
            camera.setLocation(loc);
        }

        // ROTATION
        int rotX = 0, rotY = 0;
View Full Code Here


        final Vector3 store = new Vector3();
        for (int x = 0; x < _vertexCount; x++) {
            BufferUtils.populateFromBuffer(store, _normalCoords.getBuffer(), x);
            transform.applyForwardVector(store, store);
            if (normalize) {
                store.normalizeLocal();
            }
            BufferUtils.setInBuffer(store, _normalCoords.getBuffer(), x);
        }
    }
View Full Code Here

        if (xzp.equals(Vector3.ZERO)) {
            return;
        }

        _look.normalizeLocal();
        xzp.normalizeLocal();
        final double cosp = _look.dot(xzp);

        // compute the local orientation matrix for the billboard
        _orient.setValue(0, 0, xzp.getZ());
        _orient.setValue(0, 1, xzp.getX() * -_look.getY());
 
View Full Code Here

        }

        final Vector3 wanderTarget = _wanderTargets.get(index);

        wanderTarget.addLocal(calcNewJitter(), calcNewJitter(), calcNewJitter());
        wanderTarget.normalizeLocal();
        wanderTarget.multiplyLocal(_wanderRadius);

        _workVect.set(particle.getVelocity()).normalizeLocal().multiplyLocal(_wanderDistance);
        _workVect.addLocal(wanderTarget).normalizeLocal();
        _workVect.multiplyLocal(particle.getVelocity().length());
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.