Examples of subtractLocal()


Examples of com.jme3.math.Vector3f.subtractLocal()

        return pointc;
    }

    public Vector3f getNormal(){
        Vector3f normal = new Vector3f(pointb);
        normal.subtractLocal(pointa).crossLocal(pointc.x-pointa.x, pointc.y-pointa.y, pointc.z-pointa.z);
        normal.normalizeLocal();
        return normal;
    }

}
View Full Code Here

Examples of com.jme3.math.Vector3f.subtractLocal()

        //interpolating new position
        getSpline().interpolate(control.getCurrentValue(), control.getCurrentWayPoint(), temp);
        if (control.needsDirection()) {
            tmpVector.set(temp);
            control.setDirection(tmpVector.subtractLocal(control.getSpatial().getLocalTranslation()).normalizeLocal());
        }
        checkWayPoint(control, tpf);

        control.getSpatial().setLocalTranslation(temp);
        vars.release();
View Full Code Here

Examples of com.jme3.math.Vector3f.subtractLocal()

        boolean physicsLocationDirty = applyTransform(motionStateId, localLocation, localRotationQuat);
        if (!physicsLocationDirty) {
            return false;
        }
        if (!applyPhysicsLocal && spatial.getParent() != null) {
            localLocation.subtractLocal(spatial.getParent().getWorldTranslation());
            localLocation.divideLocal(spatial.getParent().getWorldScale());
            tmp_inverseWorldRotation.set(spatial.getParent().getWorldRotation()).inverseLocal().multLocal(localLocation);

//            localRotationQuat.set(worldRotationQuat);
            tmp_inverseWorldRotation.mult(localRotationQuat, localRotationQuat);
View Full Code Here

Examples of org.mt4j.util.math.Vector3D.subtractLocal()

   
    //Get the biggest mesh in the group to use as a reference for setting the position/scale
    final MTTriangleMesh biggestMesh = this.getBiggestMesh(meshes);
   
    Vector3D translationToScreenCenter = new Vector3D(destinationPosition);
    translationToScreenCenter.subtractLocal(biggestMesh.getCenterPointGlobal());
   
    Vector3D scalingPoint = new Vector3D(biggestMesh.getCenterPointGlobal());
    float biggestWidth = biggestMesh.getWidthXY(TransformSpace.GLOBAL)
    float scale = destinationScale/biggestWidth;
   
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.