|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.device.api.math.Frustum
public class Frustum
Defines a 3-dimensional frustum.
| Constructor Summary | ||
|---|---|---|
Frustum()
Constructs the default frustum (corresponds to the identity matrix). |
||
Frustum(Frustum frustum)
Constructs a new frustum from the given frustum. |
||
Frustum(Matrix4f matrix)
Constructs a new frustum from the specified view projection matrix. |
||
| Method Summary | ||
|---|---|---|
boolean |
equals(Object obj)
Returns true if the specified object is equal to this frustum. |
|
boolean |
equals(Frustum frustum)
Returns true if all elements of the specified frustum are equal to the elements of this frustum. |
|
void |
getBottom(Plane bottom)
Gets the bottom plane of the frustum in the given plane. |
|
void |
getCorners(Vector3f[] corners,
int offset)
Gets the corners of the frustum in the specified array. |
|
void |
getFar(Plane far)
Gets the far plane of the frustum in the given plane. |
|
void |
getLeft(Plane left)
Gets the left plane of the frustum in the given plane. |
|
void |
getMatrix(Matrix4f matrix)
Gets the projection matrix corresponding to the frustum in the specified matrix. |
|
void |
getNear(Plane near)
Gets the near plane of the frustum in the given plane. |
|
void |
getRight(Plane right)
Gets the right plane of the frustum in the given plane. |
|
void |
getTop(Plane top)
Gets the top plane of the frustum in the given plane. |
|
int |
hashCode()
Returns a hash code based on the elements of this frustum. |
|
boolean |
intersects(Bounds bounds)
Tests whether this frustum intersects the specified bounding object. |
|
float |
intersects(Plane plane)
Tests whether this frustum intersects the specified plane. |
|
float |
intersects(Ray ray)
Tests whether this frustum intersects the specified ray. |
|
void |
set(Frustum frustum)
Sets this frustum to the specified frustum. |
|
void |
set(Matrix4f matrix)
Sets the frustum to the frustum corresponding to the specified view projection matrix. |
|
String |
toString()
Returns a String representation of this frustum. |
|
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Frustum()
public Frustum(Matrix4f matrix)
matrix - The view projection matrix to construct the frustum from.
NullPointerException - If matrix is null.public Frustum(Frustum frustum)
frustum - The frustum to copy.
NullPointerException - If frustum is null.| Method Detail |
|---|
public void getBottom(Plane bottom)
bottom - The plane to store the bottom plane in.
NullPointerException - If bottom is null.
public void getCorners(Vector3f[] corners,
int offset)
The corners are stored in the following order: (N-near, F-far, L-left, R-right, B-bottom, T-top) LTN, LBN, RBN, RTN, RTF, RBF, LBF, LTF.
corners - The array to store the corners in.offset - The offset into the array to start storing corners at.
IllegalArgumentException - If offset is negative or if
offset + 7 is greater than or equal to corners.length.
NullPointerException - If corners or corners[i] (for any integer 0 <= i < 8) is null.public void getFar(Plane far)
far - The plane to store the far plane in.
NullPointerException - If far is null.public void getLeft(Plane left)
left - The plane to store the left plane in.
NullPointerException - If left is null.public void getNear(Plane near)
near - The plane to store the near plane in.
NullPointerException - If near is null.public void getMatrix(Matrix4f matrix)
matrix - The matrix to store the projection matrix in.
NullPointerException - If matrix is null.public void getRight(Plane right)
right - The plane to store the right plane in.
NullPointerException - If right is null.public void getTop(Plane top)
top - The plane to store the top plane in.
NullPointerException - If top is null.public boolean intersects(Bounds bounds)
bounds - The bounding object to test intersection with.
true if the specified bounding object intersects this frustum;
false otherwise.
NullPointerException - If bounds is null.public float intersects(Plane plane)
plane - The plane to test intersection with.
INTERSECTS_BACK if this frustum is in the negative half-space of
the plane, INTERSECTS_FRONT if it is in the positive half-space of the plane;
and INTERSECTS_INTERSECTING if it intersects the plane.
NullPointerException - If plane is null.public float intersects(Ray ray)
ray - The ray to test intersection with.
INTERSECTS_NONE if the ray does not intersect this frustum.
NullPointerException - If ray is null.public void set(Frustum frustum)
frustum - The frustum to set to.
NullPointerException - If frustum is null.public void set(Matrix4f matrix)
matrix - The view projection matrix.
NullPointerException - If matrix is null.public boolean equals(Frustum frustum)
frustum - The frustum to compare.
true if this frustum is equal to frustum;
false otherwise.
NullPointerException - If frustum is null.public boolean equals(Object obj)
equals in class Objectobj - The object to compare.
true if this frustum is equal to obj; false otherwise.
NullPointerException - If obj is null.Boolean.hashCode(),
Hashtablepublic int hashCode()
hashCode in class ObjectObject.equals(java.lang.Object),
Hashtablepublic String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal