|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.java.dev.joode.util.AABB3f
public class AABB3f
An 3-D axis-aligned bounding box represented using single-precision coordinates. This represents a bounding volume about an object or group of objects as a box aligned with the coordinate system axes.
An empty volume is represented by any of minX, minY or
minZ being greater than the corresponding maxX, maxY
or maxZ.
| Field Summary | |
|---|---|
float |
maxX
The maximum X coordinate of the bounding volume. |
float |
maxY
The maximum Y coordinate of the bounding volume. |
float |
maxZ
The maximum Z coordinate of the bounding volume. |
float |
minX
The minimum X coordinate of the bounding volume. |
float |
minY
The minimum Y coordinate of the bounding volume. |
float |
minZ
The minimum Z coordinate of the bounding volume. |
| Constructor Summary | |
|---|---|
AABB3f()
Constructs an empty AABB. |
|
AABB3f(float minX,
float maxX,
float minY,
float maxY,
float minZ,
float maxZ)
Constructs an AABB with specified bounds. |
|
| Method Summary | |
|---|---|
void |
empty()
Sets this bounding volume to empty. |
AABB3f |
intersection(AABB3f box2)
Finds the intersection of this AABB with another. |
boolean |
intersects(AABB3f box2)
Tests whether this AABB intersects another. |
boolean |
isEmpty()
Tests whether this bounding volume is empty. |
void |
merge(AABB3f box2)
Sets this AABB to the union of it and another AABB. |
void |
setBounds(AABB3f src)
Copies the bounds from another AABB. |
void |
setBounds(Point3f p0,
Point3f p1,
Point3f p2)
Sets the bounds to the bounding volume of three points. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public float minX
public float maxX
public float minY
public float maxY
public float minZ
public float maxZ
| Constructor Detail |
|---|
public AABB3f()
public AABB3f(float minX,
float maxX,
float minY,
float maxY,
float minZ,
float maxZ)
minX - the minimum X coordinate of the new bounding volumemaxX - the maximum X coordinate of the new bounding volumeminY - the minimum Y coordinate of the new bounding volumemaxY - the maximum Y coordinate of the new bounding volumeminZ - the minimum Z coordinate of the new bounding volumemaxZ - the maximum Z coordinate of the new bounding volume| Method Detail |
|---|
public void empty()
public boolean isEmpty()
true if the extent of the volume is negative
along all three dimensions.public AABB3f intersection(AABB3f box2)
box2 - the other AABB
public boolean intersects(AABB3f box2)
box2 - the other AABB
true if the two AABBs intersectpublic void merge(AABB3f box2)
box2 - the other AABB
Invoking this method on an empty bounding volume is equivalent to invoking {#link setBounds(AABB3f)}. Invoking it with an empty bounding volume has no effect.
public void setBounds(AABB3f src)
src - the AABB to be copied
public void setBounds(Point3f p0,
Point3f p1,
Point3f p2)
p0 - a point that is to lie within the new bounding volumep1 - a point that is to lie within the new bounding volumep2 - a point that is to lie within the new bounding volume
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||