Package com.jme.math

Examples of com.jme.math.Vector3f.normalize()


        Matrix4f mat = new Matrix4f();
        Vector3f axisX = new Vector3f();
        Vector3f axisY = new Vector3f();
        Vector3f axisZ = new Vector3f(direction);
        axisZ.negate();
        axisZ.normalize();

        axisX.cross(up, axisZ);
        axisX.normalize();

        axisY.cross(axisZ, axisX);
View Full Code Here


        public void zoomCamera(float percentagedistance) {
            if (react) {
                Vector3f cpos = cameranode.getLocalTranslation();
                distance = distance * percentagedistance;
                cpos = cpos.normalize().mult(distance);
                cameranode.setLocalTranslation(cpos);
                cameraOrbit.update();
            }
        }

View Full Code Here

    public void Count(float dt,GravityObject other)
    {
        float distance = (other.getPosition().distanceSquared(position));
        Vector3f vect =other.getPosition().subtract(position);
        vect.normalize();

        //Count forces
        float maxForce=GravityObject.G * weight * other.weight /(radius+other.getRadius());

        float scalarForce=GravityObject.G * weight * other.weight / (distance);
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.