Package com.jme.math

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


  logger.finer("Set targetPosition " + targetPosition
      + " rotation " + rotation);

        Vector3f positionError  = new Vector3f(targetPosition);
            positionError.subtractLocal(currentPosition);
 
  float length = positionError.length();

  logger.fine("current " + currentPosition + "target "
      + targetPosition + " error " + length);
View Full Code Here


        continue;
            }
       
            //Difference between where we are and where we want to be.
            Vector3f positionError = new Vector3f(targetPosition);
            positionError.subtractLocal(currentPosition);
   
            if (positionError.length() < EPSILON) {
    logger.fine("Orb reached target position.");

    if (listener != null) {
View Full Code Here

        // Then substitute t into the Ray Equation to get the intersection point.
        //
        // Source: Various: Lars Bishop book, Geometry Toolbox, Doug T.

        Vector3f pointDiffVec = new Vector3f(planePoint);
        pointDiffVec.subtractLocal(ray.getOrigin());
        float numerator = planeNormal.dot(pointDiffVec);
        float denominator = planeNormal.dot(ray.getDirection());
        if (denominator == 0f) {
            // No intersection
            return null;
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.