示例#1
0
 @Override
 public boolean contains(Point3 p) {
   return t1.contains(p) || t2.contains(p);
 }
示例#2
0
 /**
  * Constructs a square armature from 4 points. This 4 points must be contained for the same plane.
  * If not, weird behavior will happen
  *
  * @param topLeft
  * @param bottomLeft
  * @param bottomRight
  * @param topRight
  */
 public SquareMeshCollider(
     Point3 topLeft, Point3 bottomLeft, Point3 bottomRight, Point3 topRight) {
   t1 = new Triangle(topLeft, bottomLeft, bottomRight);
   t2 = new Triangle(topLeft, topRight, bottomRight);
   p = t1.getPlane();
 }