|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.math.Box
public final class Box
An axis-aligned box.
| Field Summary | |
|---|---|
static Box |
EMPTY
The empty box. |
static Box |
MAX_VALUE
A box that's as large as boxes can get. |
static Box |
UNIT
The unit box. |
static Box |
ZERO
The zero box. |
| Constructor Summary | |
|---|---|
Box()
Creates an empty box. |
|
Box(Box other)
Copy constructor. |
|
Box(Vector3f minExtent,
Vector3f maxExtent)
Creates a box with the values contained in the supplied minimum and maximum extents. |
|
| Method Summary | |
|---|---|
Box |
add(Box other)
Expands this box to include the bounds of another box. |
Box |
add(Box other,
Box result)
Expands this box to include the bounds of another box, placing the result in the object provided. |
Box |
add(Vector3f point)
Expands this box to include the specified point. |
Box |
add(Vector3f point,
Box result)
Expands this box to include the specified point, placing the result in the object provided. |
Box |
addLocal(Box other)
Expands this box to include the bounds of another box. |
Box |
addLocal(Vector3f point)
Expands this box in-place to include the specified point. |
boolean |
contains(Box other)
Determines whether this box completely contains the specified box. |
boolean |
contains(float x,
float y,
float z)
Determines whether this box contains the specified point. |
boolean |
contains(Vector3f point)
Determines whether this box contains the specified point. |
boolean |
equals(Object other)
|
Box |
expand(float x,
float y,
float z)
Expands the box by the specified amounts. |
Box |
expand(float x,
float y,
float z,
Box result)
Expands the box by the specified amounts, placing the result in the object provided. |
Box |
expandLocal(float x,
float y,
float z)
Expands the box in-place by the specified amounts. |
Box |
fromPoints(Vector3f... points)
Initializes this box with the extents of an array of points. |
Vector3f |
getCenter()
Returns the center of the box as a new vector. |
Vector3f |
getCenter(Vector3f result)
Places the location of the center of the box into the given result vector. |
float |
getDiagonalLength()
Returns the length of the box's diagonal (the distance from minimum to maximum extent). |
float |
getExtentDistance(Box other)
Returns the sum of the Manhattan distances between the extents of this box and the specified other box. |
boolean |
getIntersection(Ray3D ray,
Vector3f result)
Finds the location of the (first) intersection between the specified ray and this box. |
float |
getLongestEdge()
Returns the length of the box's longest edge. |
Vector3f |
getMaximumExtent()
Returns a reference to the box's maximum extent. |
Vector3f |
getMinimumExtent()
Returns a reference to the box's minimum extent. |
Vector3f |
getVertex(int code,
Vector3f result)
Retrieves one of the eight vertices of the box. |
int |
hashCode()
|
Box |
intersect(Box other)
Finds the intersection between this box and another box. |
Box |
intersect(Box other,
Box result)
Finds the intersection between this box and another box and places the result in the provided object. |
Box |
intersectLocal(Box other)
Finds the intersection between this box and another box and places the result in this box. |
boolean |
intersects(Box other)
Determines whether this box intersects the specified other box. |
boolean |
intersects(Ray3D ray)
Determines whether the specified ray intersects this box. |
boolean |
isEmpty()
Determines whether the box is empty (whether any of its minima are greater than their corresponding maxima). |
Box |
project(Matrix4f matrix)
Projects this box. |
Box |
project(Matrix4f matrix,
Box result)
Projects this box, placing the result in the object provided. |
Box |
projectLocal(Matrix4f matrix)
Projects this box in-place. |
Box |
set(Box other)
Copies the parameters of another box. |
Box |
set(Vector3f minExtent,
Vector3f maxExtent)
Sets the box parameters to the values contained in the supplied vectors. |
Box |
setToEmpty()
Sets the parameters of the box to the empty values ( Vector3f.MAX_VALUE and
Vector3f.MIN_VALUE for the minimum and maximum, respectively). |
String |
toString()
|
Box |
transform(Transform3D transform)
Transforms this box. |
Box |
transform(Transform3D transform,
Box result)
Transforms this box, placing the result in the provided object. |
Box |
transformLocal(Transform3D transform)
Transforms this box in-place. |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Box UNIT
public static final Box ZERO
public static final Box EMPTY
public static final Box MAX_VALUE
| Constructor Detail |
|---|
public Box(Vector3f minExtent,
Vector3f maxExtent)
public Box(Box other)
public Box()
| Method Detail |
|---|
public Vector3f getMinimumExtent()
public Vector3f getMaximumExtent()
public Vector3f getCenter()
public Vector3f getCenter(Vector3f result)
public float getDiagonalLength()
public float getLongestEdge()
public boolean isEmpty()
public Box fromPoints(Vector3f... points)
public Box addLocal(Vector3f point)
public Box add(Vector3f point)
public Box add(Vector3f point,
Box result)
public Box addLocal(Box other)
public Box add(Box other)
public Box add(Box other,
Box result)
public Box intersectLocal(Box other)
public Box intersect(Box other)
public Box intersect(Box other,
Box result)
public Box transformLocal(Transform3D transform)
public Box transform(Transform3D transform)
public Box transform(Transform3D transform,
Box result)
public Box projectLocal(Matrix4f matrix)
public Box project(Matrix4f matrix)
public Box project(Matrix4f matrix,
Box result)
public Box expandLocal(float x,
float y,
float z)
public Box expand(float x,
float y,
float z)
public Box expand(float x,
float y,
float z,
Box result)
public Box setToEmpty()
Vector3f.MAX_VALUE and
Vector3f.MIN_VALUE for the minimum and maximum, respectively).
public Box set(Box other)
public Box set(Vector3f minExtent,
Vector3f maxExtent)
public Vector3f getVertex(int code,
Vector3f result)
public boolean contains(Vector3f point)
public boolean contains(float x,
float y,
float z)
public float getExtentDistance(Box other)
public boolean contains(Box other)
public boolean intersects(Box other)
public boolean intersects(Ray3D ray)
public boolean getIntersection(Ray3D ray,
Vector3f result)
result - a vector to hold the location of the intersection.
public String toString()
toString in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object other)
equals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||