|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.math.Frustum
public class Frustum
A pyramidal frustum.
| Nested Class Summary | |
|---|---|
static class |
Frustum.IntersectionType
Intersection types indicating that the frustum does not intersect, intersects, or fully contains, respectively, the parameter. |
| Field Summary | |
|---|---|
protected Box |
_bounds
The frustum's bounding box (as derived from the vertices). |
protected Plane[] |
_planes
The planes of the frustum (as derived from the vertices). |
protected static Vector3f |
_vertex
A working vertex. |
protected Vector3f[] |
_vertices
The vertices of the frustum. |
| Constructor Summary | |
|---|---|
Frustum()
Creates an empty (invalid) frustum. |
|
| Method Summary | |
|---|---|
Box |
getBounds()
Returns a reference to the bounds of this frustum. |
Box |
getBoundsUnderRotation(Matrix3f matrix,
Box result)
Computes the bounds of the frustum under the supplied rotation and places the results in the box provided. |
float |
getDistance(Vector3f point)
Determines the maximum signed distance of the point from the planes of the frustum. |
Frustum.IntersectionType |
getIntersectionType(Box box)
Checks whether the frustum intersects the specified box. |
Vector3f[] |
getVertices()
Returns a reference to the frustum's array of vertices. |
Frustum |
setToFrustum(float left,
float right,
float bottom,
float top,
float near,
float far)
Sets this frustum to one pointing in the Z- direction with the specified parameters determining its size and shape (see the OpenGL documentation for glFrustum). |
Frustum |
setToOrtho(float left,
float right,
float bottom,
float top,
float near,
float far)
Sets this frustum to an orthographic one pointing in the Z- direction with the specified parameters determining its size (see the OpenGL documentation for glOrtho). |
Frustum |
setToPerspective(float fovy,
float aspect,
float znear,
float zfar)
Sets this frustum to one pointing in the Z- direction with the specified parameters determining its size and shape (see the OpenGL documentation for gluPerspective). |
Frustum |
setToProjection(float left,
float right,
float bottom,
float top,
float near,
float far,
Vector3f nearFarNormal,
boolean ortho,
boolean mirrored)
Sets this frustum to a perspective or orthographic projection with the specified parameters determining its size and shape. |
Frustum |
transform(Transform3D transform)
Transforms this frustum by the specified transformation. |
Frustum |
transform(Transform3D transform,
Frustum result)
Transforms this frustum by the specified transformation, placing the result in the object provided. |
Frustum |
transformLocal(Transform3D transform)
Transforms this frustum in-place by the specified transformation. |
protected void |
updateDerivedState()
Sets the planes and bounding box of the frustum based on its vertices. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Vector3f[] _vertices
protected Plane[] _planes
protected Box _bounds
protected static Vector3f _vertex
| Constructor Detail |
|---|
public Frustum()
| Method Detail |
|---|
public Vector3f[] getVertices()
public Box getBounds()
public Frustum setToPerspective(float fovy,
float aspect,
float znear,
float zfar)
gluPerspective).
fovy - the vertical field of view, in radians.aspect - the aspect ratio (width over height).znear - the distance to the near clip plane.zfar - the distance to the far clip plane.
public Frustum setToFrustum(float left,
float right,
float bottom,
float top,
float near,
float far)
glFrustum).
public Frustum setToOrtho(float left,
float right,
float bottom,
float top,
float near,
float far)
glOrtho).
public Frustum setToProjection(float left,
float right,
float bottom,
float top,
float near,
float far,
Vector3f nearFarNormal,
boolean ortho,
boolean mirrored)
public Frustum transformLocal(Transform3D transform)
public Frustum transform(Transform3D transform)
public Frustum transform(Transform3D transform,
Frustum result)
public float getDistance(Vector3f point)
public Frustum.IntersectionType getIntersectionType(Box box)
public Box getBoundsUnderRotation(Matrix3f matrix,
Box result)
protected void updateDerivedState()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||