|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openmali.spatial.bodies.Box
org.openmali.spatial.bounds.BoundingBox
public class BoundingBox
Axis aligned bounding box volumes
| Field Summary |
|---|
| Fields inherited from class org.openmali.spatial.bodies.Box |
|---|
lower, upper |
| Constructor Summary | |
|---|---|
BoundingBox()
Create a new empty bounding box |
|
BoundingBox(Bounds bo)
Create a new bounding box enclosing bounds bo |
|
BoundingBox(Bounds[] bos)
Create a new bounding box enclosing bounds bos |
|
BoundingBox(Tuple3f lower,
Tuple3f upper)
Create a new bounding box with lower and upper corners specified |
|
| Method Summary | |
|---|---|
Bounds |
closestIntersection(Bounds[] boundsObjects)
Finds closest bounding object that intersects this bounding object. |
void |
compute(java.util.List<Tuple3f> coords)
Computes the AABB of a set of coordinates. |
void |
compute(Tuple3f[] coords)
Computes the AABB of a set of coordinates. |
void |
compute(VertexContainer source)
Computes the AABB of a set of coordinates. |
BoundsType |
getType()
|
boolean |
intersects(Bounds bo)
Tests for intersection with another Bounds object. |
boolean |
intersects(Bounds[] bos)
Tests for intersection with an array of Bounds objects. |
boolean |
intersects(Point3f rayOrigin,
Vector3f rayDirection)
Tests for intersection with a ray. |
boolean |
intersects(Point3f rayOrigin,
Vector3f rayDirection,
Tuple3f intersection)
Tests for intersection with a ray. |
boolean |
intersects(Ray3f ray)
Tests for intersection with a ray. |
boolean |
intersects(Ray3f ray,
Tuple3f intersection)
Tests for intersection with a ray. |
static BoundingBox |
newAABB(java.util.List<Tuple3f> coords)
Computes the AABB of a set of coordinates. |
static BoundingBox |
newAABB(Tuple3f[] coords)
Computes the AABB of a set of coordinates. |
static BoundingBox |
newAABB(VertexContainer source)
Computes the AABB of a set of coordinates. |
void |
set(Bounds bo)
Sets the the value of this Bounds object to enclode the specified bounding object |
void |
set(Bounds[] bos)
Sets this bounds to the comnination of all the specified bounds. |
java.lang.String |
toString()
|
void |
transform(Bounds bounds,
Matrix4f trans)
Transforms a Bounds object so that it bounds a volume that is the result of transforming the given bounding object by the given transform. |
void |
transform(Matrix4f trans)
Transforms the Bounds object by the given transform. |
| Methods inherited from class org.openmali.spatial.bodies.Box |
|---|
calcCenter, combine_, combine_, combine, combine, combine, combine, combine, contains, contains, getCenter, getCenter, getCenterX, getCenterY, getCenterZ, getLower, getLower, getLowerX, getLowerY, getLowerZ, getMaxDistance, getMaxSquaredDistance, getSize, getSize, getUpper, getUpper, getUpperX, getUpperY, getUpperZ, getXSpan, getYSpan, getZSpan, set, set, setCenter, setCenter, setLower, setLower, setLowerX, setLowerY, setLowerZ, setMaxSquaredDistance, setSize, setSize, setUpper, setUpper, setUpperX, setUpperY, setUpperZ |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.openmali.spatial.bounds.Bounds |
|---|
combine, combine, combine, contains, contains, getCenter, getMaxDistance, getMaxSquaredDistance |
| Methods inherited from interface org.openmali.spatial.bodies.Body |
|---|
combine, combine |
| Constructor Detail |
|---|
public BoundingBox()
public BoundingBox(Tuple3f lower,
Tuple3f upper)
public BoundingBox(Bounds bo)
public BoundingBox(Bounds[] bos)
| Method Detail |
|---|
public final BoundsType getType()
getType in interface Bounds
public boolean intersects(Point3f rayOrigin,
Vector3f rayDirection,
Tuple3f intersection)
intersects in interface Bounds
public boolean intersects(Ray3f ray,
Tuple3f intersection)
intersects in interface Bounds
public boolean intersects(Point3f rayOrigin,
Vector3f rayDirection)
intersects in interface Boundspublic boolean intersects(Ray3f ray)
intersects in interface Boundspublic boolean intersects(Bounds bo)
intersects in interface Boundspublic boolean intersects(Bounds[] bos)
intersects in interface Boundspublic Bounds closestIntersection(Bounds[] boundsObjects)
closestIntersection in interface Boundspublic void transform(Matrix4f trans)
transform in interface Bounds
public void transform(Bounds bounds,
Matrix4f trans)
transform in interface Boundspublic void set(Bounds bo)
set in interface Boundspublic void set(Bounds[] bos)
set in interface Boundspublic void compute(VertexContainer source)
compute in interface Boundssource - the vectex-sourcepublic void compute(java.util.List<Tuple3f> coords)
compute in interface Boundscoords - a List of coordinatespublic void compute(Tuple3f[] coords)
compute in interface Boundscoords - a List of coordinatespublic java.lang.String toString()
toString in class Boxpublic static BoundingBox newAABB(VertexContainer source)
source - the vertex source
public static BoundingBox newAABB(java.util.List<Tuple3f> coords)
coords - a List of coordinates (Vector3fs)
public static BoundingBox newAABB(Tuple3f[] coords)
coords - a List of coordinates (Vector3fs)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||