public final class AABB extends Object
| Modifier and Type | Field and Description |
|---|---|
Vec2 |
lowerBound
Bottom left vertex of bounding box.
|
Vec2 |
upperBound
Top right vertex of bounding box.
|
| Constructor and Description |
|---|
AABB()
Creates the default object, with vertices at 0,0 and 0,0.
|
AABB(AABB copy)
Copies from the given object.
|
AABB(Vec2 lowerVertex,
Vec2 upperVertex)
Creates an AABB object using the given bounding vertices.
|
| Modifier and Type | Method and Description |
|---|---|
void |
combine(AABB aabb)
Combines another aabb with this one.
|
void |
combine(AABB aabb1,
AABB aabb2)
Combine two AABBs into this one.
|
boolean |
contains(AABB aabb) |
Vec2 |
getCenter() |
Vec2 |
getExtents() |
float |
getPerimeter() |
boolean |
isValid() |
boolean |
raycast(RayCastOutput output,
RayCastInput input,
IWorldPool argPool)
From Real-time Collision Detection, p179.
|
void |
set(AABB aabb)
Sets this object from the given object.
|
static boolean |
testOverlap(AABB a,
AABB b) |
String |
toString() |
public final Vec2 lowerBound
public final Vec2 upperBound
public AABB()
public AABB(AABB copy)
copy - the object to copy frompublic void set(AABB aabb)
aabb - the object to copy frompublic boolean isValid()
public Vec2 getCenter()
public Vec2 getExtents()
public float getPerimeter()
public void combine(AABB aabb)
public boolean contains(AABB aabb)
public boolean raycast(RayCastOutput output, RayCastInput input, IWorldPool argPool)
Copyright © 2018. All rights reserved.