Examples of quadLength()


Examples of jray.common.Vect3.quadLength()

   
    public static boolean isRayOriginatingInSphere(Vect3 rayOrigin, Vect3 rayDirection, Vect3 sphereCenter, double sphereRadius){
      Vect3 tmp = new Vect3();
      Vect.subtract(sphereCenter, rayOrigin, tmp);
     
      return tmp.quadLength()<sphereRadius*sphereRadius;
    }
}
View Full Code Here

Examples of jray.common.Vect3.quadLength()

      if(s!=null){
        Vect.subtract(center, s.getPosition(), dist);
        qdist = s.getRadius();
        if(Double.isInfinite(qdist)||Double.isNaN(qdist))
          throw new RuntimeException("Invalid BoundingSphere: "+s+" from "+o);
        qdist = qdist*qdist + dist.quadLength();
        if(maxQuadDist < qdist)
          maxQuadDist = qdist;
      }
    }
   
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.