gizmoball.physics
Class BoxBoxIntersection

java.lang.Object
  extended by gizmoball.physics.BoxBoxIntersection

public final class BoxBoxIntersection
extends java.lang.Object

A non-instantiable class for computing whether or not two axes-aligned boxes intersect.


Method Summary
static boolean edgeFaceIntersect(Vect3Pair edge, gizmoball.physics.BoxBoxIntersection.Face face)
           
static boolean inside(Vect3 p, Vect3 corner1, Vect3 corner2)
           
static boolean intersect(Vect3Pair box1, Vect3Pair box2)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

intersect

public static boolean intersect(Vect3Pair box1,
                                Vect3Pair box2)
Parameters:
box1 - the first box
box2 - the second box
Returns:
true if box1 and box2 intersect, false otherwise

edgeFaceIntersect

public static boolean edgeFaceIntersect(Vect3Pair edge,
                                        gizmoball.physics.BoxBoxIntersection.Face face)
Parameters:
edge -
face -
Returns:
true if edge and face intersect, false otherwise

inside

public static boolean inside(Vect3 p,
                             Vect3 corner1,
                             Vect3 corner2)
Parameters:
p -
corner1 -
corner2 -
Returns:
true if p is inside the box formed by corner1 and corner2