/** * C code ported from <a href="http://www.cs.lth.se/home/Tomas_Akenine_Moller/code/tribox3.txt"> * http://www.cs.lth.se/home/Tomas_Akenine_Moller/code/tribox3.txt</a> * * @param v1 The first point in the triangle * @param v2 The second point in the triangle * @param v3 The third point in the triangle * @return True if the bounding box intersects the triangle, false * otherwise. */ public boolean intersects(Vector3f v1, Vector3f v2, Vector3f v3) { return Intersection.intersect(this, v1, v2, v3); }
@Override public boolean intersectsBox(BoundingBox box, TempVars vars) { return Intersection.intersect(box, center, radius); }
@Override public boolean intersectsSphere(BoundingSphere sphere, TempVars vars) { if (this.radius == 0) { return true; } else { // Sphere v. sphere collision return Intersection.intersect(sphere, position, radius); } }
@Override public boolean intersectsBox(BoundingBox box, TempVars vars) { if (this.radius == 0) { return true; } else { // Sphere v. box collision return Intersection.intersect(box, position, radius); } }
@Override public boolean intersectsFrustum(Camera camera, TempVars vars) { if (this.radius == 0) { return true; } else { return Intersection.intersect(camera, position, radius); } }
@Override public boolean intersectsSphere(BoundingSphere sphere, TempVars vars) { return Intersection.intersect(sphere, center, radius); }
@Override public boolean intersectsFrustum(Camera camera, TempVars vars) { return Intersection.intersect(camera, center, radius); }
public boolean intersectsSphere(BoundingSphere bs) { return Intersection.intersect(bs, center, radius); }
public boolean intersectsBoundingBox(BoundingBox bb) { return Intersection.intersect(bb, center, radius); }
if (!Intersection.intersect(sphere, position, spotRange)) { return false;
if (!Intersection.intersect(box, position, spotRange)) { return false;
/** * C code ported from <a href="http://www.cs.lth.se/home/Tomas_Akenine_Moller/code/tribox3.txt"> * http://www.cs.lth.se/home/Tomas_Akenine_Moller/code/tribox3.txt</a> * * @param v1 The first point in the triangle * @param v2 The second point in the triangle * @param v3 The third point in the triangle * @return True if the bounding box intersects the triangle, false * otherwise. */ public boolean intersects(Vector3f v1, Vector3f v2, Vector3f v3) { return Intersection.intersect(this, v1, v2, v3); }
@Override public boolean intersectsBox(BoundingBox box, TempVars vars) { if (this.radius == 0) { return true; } else { // Sphere v. box collision return Intersection.intersect(box, position, radius); } }
@Override public boolean intersectsSphere(BoundingSphere sphere, TempVars vars) { if (this.radius == 0) { return true; } else { // Sphere v. sphere collision return Intersection.intersect(sphere, position, radius); } }
/** * C code ported from <a href="http://www.cs.lth.se/home/Tomas_Akenine_Moller/code/tribox3.txt"> * http://www.cs.lth.se/home/Tomas_Akenine_Moller/code/tribox3.txt</a> * * @param v1 The first point in the triangle * @param v2 The second point in the triangle * @param v3 The third point in the triangle * @return True if the bounding box intersects the triangle, false * otherwise. */ public boolean intersects(Vector3f v1, Vector3f v2, Vector3f v3) { return Intersection.intersect(this, v1, v2, v3); }
public boolean intersectsSphere(BoundingSphere bs) { return Intersection.intersect(bs, center, radius); }
public boolean intersectsBoundingBox(BoundingBox bb) { return Intersection.intersect(bb, center, radius); }
if (!Intersection.intersect(sphere, position, spotRange)) { return false;
if (!Intersection.intersect(box, position, spotRange)) { return false;