public class Frustum extends Object
Camera.frustum
Modifier and Type | Field and Description |
---|---|
Vector3[] |
planePoints
eight points making up the near and far clipping "rectangles".
|
Plane[] |
planes
the six clipping planes, near, far, left, right, top, bottom
|
Constructor and Description |
---|
Frustum() |
Modifier and Type | Method and Description |
---|---|
boolean |
boundsInFrustum(BoundingBox bounds)
Returns whether the given
BoundingBox is in the frustum. |
boolean |
boundsInFrustum(float x,
float y,
float z,
float halfWidth,
float halfHeight,
float halfDepth)
Returns whether the given bounding box is in the frustum.
|
boolean |
boundsInFrustum(Vector3 center,
Vector3 dimensions)
Returns whether the given bounding box is in the frustum.
|
boolean |
pointInFrustum(float x,
float y,
float z)
Returns whether the point is in the frustum.
|
boolean |
pointInFrustum(Vector3 point)
Returns whether the point is in the frustum.
|
boolean |
sphereInFrustum(float x,
float y,
float z,
float radius)
Returns whether the given sphere is in the frustum.
|
boolean |
sphereInFrustum(Vector3 center,
float radius)
Returns whether the given sphere is in the frustum.
|
boolean |
sphereInFrustumWithoutNearFar(float x,
float y,
float z,
float radius)
Returns whether the given sphere is in the frustum not checking whether it is behind the near and far clipping plane.
|
boolean |
sphereInFrustumWithoutNearFar(Vector3 center,
float radius)
Returns whether the given sphere is in the frustum not checking whether it is behind the near and far clipping plane.
|
void |
update(Matrix4 inverseProjectionView)
Updates the clipping plane's based on the given inverse combined projection and view matrix, e.g.
|
public final Plane[] planes
public final Vector3[] planePoints
public void update(Matrix4 inverseProjectionView)
OrthographicCamera
or PerspectiveCamera
.inverseProjectionView
- the combined projection and view matrices.public boolean pointInFrustum(Vector3 point)
point
- The pointpublic boolean pointInFrustum(float x, float y, float z)
x
- The X coordinate of the pointy
- The Y coordinate of the pointz
- The Z coordinate of the pointpublic boolean sphereInFrustum(Vector3 center, float radius)
center
- The center of the sphereradius
- The radius of the spherepublic boolean sphereInFrustum(float x, float y, float z, float radius)
x
- The X coordinate of the center of the spherey
- The Y coordinate of the center of the spherez
- The Z coordinate of the center of the sphereradius
- The radius of the spherepublic boolean sphereInFrustumWithoutNearFar(Vector3 center, float radius)
center
- The center of the sphereradius
- The radius of the spherepublic boolean sphereInFrustumWithoutNearFar(float x, float y, float z, float radius)
x
- The X coordinate of the center of the spherey
- The Y coordinate of the center of the spherez
- The Z coordinate of the center of the sphereradius
- The radius of the spherepublic boolean boundsInFrustum(BoundingBox bounds)
BoundingBox
is in the frustum.bounds
- The bounding boxpublic boolean boundsInFrustum(Vector3 center, Vector3 dimensions)
public boolean boundsInFrustum(float x, float y, float z, float halfWidth, float halfHeight, float halfDepth)
Copyright © 2015. All rights reserved.