Package net.phys2d.raw.shapes

Examples of net.phys2d.raw.shapes.Line.distanceSquared()


     
      Vector2f lineStartA = vertsA[collPairs[i][0]];
      Vector2f lineEndA = vertsA[(collPairs[i][0]+1) % vertsA.length ];
      Line line = new Line(lineStartA, lineEndA);
           
      float dis2 = line.distanceSquared(bodyB.getPosition());
      float r2 = circle.getRadius() * circle.getRadius();

      if ( dis2 < r2 ) {
        Vector2f pt = new Vector2f();
       
View Full Code Here


      if (i >= paramArrayOfContact.length)
        return paramArrayOfContact.length;
      Vector2f localVector2f2 = arrayOfVector2f[arrayOfInt[j][0]];
      Vector2f localVector2f3 = arrayOfVector2f[((arrayOfInt[j][0] + 1) % arrayOfVector2f.length)];
      Line localLine = new Line(localVector2f2, localVector2f3);
      float f1 = localLine.distanceSquared(paramBody2.getPosition());
      float f2 = localCircle.getRadius() * localCircle.getRadius();
      if (f1 < f2)
      {
        Vector2f localVector2f4 = new Vector2f();
        localLine.getClosestPoint(paramBody2.getPosition(), localVector2f4);
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.