org.jbox2d.collision
Class AABB

java.lang.Object
  extended by org.jbox2d.collision.AABB

public class AABB
extends java.lang.Object

An axis-aligned bounding box.


Field Summary
 Vec2 lowerBound
          Vertex of bounding box.
 Vec2 upperBound
          Vertex of bounding box.
 
Constructor Summary
AABB()
           
AABB(AABB copy)
           
AABB(Vec2 minVertex, Vec2 maxVertex)
           
 
Method Summary
 boolean isValid()
          Verify that the bounds are sorted.
 boolean testOverlap(AABB box)
          Check if AABBs overlap.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

lowerBound

public Vec2 lowerBound
Vertex of bounding box.


upperBound

public Vec2 upperBound
Vertex of bounding box.

Constructor Detail

AABB

public AABB(Vec2 minVertex,
            Vec2 maxVertex)

AABB

public AABB(AABB copy)

AABB

public AABB()
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

isValid

public boolean isValid()
Verify that the bounds are sorted.


testOverlap

public boolean testOverlap(AABB box)
Check if AABBs overlap.