|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.java.dev.joode.util.AABBSet
public class AABBSet
Represents a collection of axis-aligned bounding boxes (AABBs).
The goal of this class is to find intersections between a set of AABBs and rays, another AABB, or another set of AABBs.
The class uses a few different techniques for finding intersections between sets of AABBs. For small sets, a brute-force technique -- testing all pairs of AABBs -- is used. Otherwise, the boxes of each set are first sorted according to their min and max X and Z coordinates.
This implementation is derived from
| Nested Class Summary | |
|---|---|
static class |
AABBSet.ElementPair
Indexes a pair of AABBs in the collection. |
| Constructor Summary | |
|---|---|
AABBSet(int length)
Constructs an AABBSet for a specified number of bounding
boxes. |
|
| Method Summary | |
|---|---|
java.util.Collection<AABBSet.ElementPair> |
findIntersections(AABBSet set2)
Finds all intersections between this elements of this AABBSet and those of another. |
AABB3f |
getGlobalBounds()
Gets an AABB bounding the entire collection. |
void |
setBounds(int i,
Point3f p0,
Point3f p1,
Point3f p2)
Sets an AABB to the bounds about 3 points. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AABBSet(int length)
AABBSet for a specified number of bounding
boxes.
| Method Detail |
|---|
public void setBounds(int i,
Point3f p0,
Point3f p1,
Point3f p2)
public AABB3f getGlobalBounds()
AABBSet; make a copy of it if you
wish to modify it.public java.util.Collection<AABBSet.ElementPair> findIntersections(AABBSet set2)
set2 - the other AABBSet
AABBSet#ElementPair objects, each containing the index
of a box in this AABBSet (AABBSet#ElementPair#index1) and an intersecting
box in the other AABBSet (AABBSet#ElementPair#index2).
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||