|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.badlogic.gdx.math.Frustum
public class Frustum
A truncated rectangular pyramid. Used to define the viewable region and its projection onto the screen.
See Camera.frustum
.
Field Summary | |
---|---|
Vector3[] |
planePoints
eight points making up the near and far clipping "rectangles". |
Plane[] |
planes
the six clipping planes, near, far, left, right, top, bottm |
Constructor Summary | |
---|---|
Frustum()
|
Method Summary | |
---|---|
boolean |
boundsInFrustum(BoundingBox bounds)
Returns whether the given BoundingBox is in the frustum. |
boolean |
pointInFrustum(Vector3 point)
Returns whether the point is in the frustum. |
boolean |
sphereInFrustum(Vector3 center,
float radius)
Returns whether the given sphere is in the frustum. |
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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final Plane[] planes
public final Vector3[] planePoints
Constructor Detail |
---|
public Frustum()
Method Detail |
---|
public void update(Matrix4 inverseProjectionView)
OrthographicCamera
or PerspectiveCamera
.
inverseProjectionView
- the combined projection and view matrices.public boolean pointInFrustum(Vector3 point)
point
- The point
public boolean sphereInFrustum(Vector3 center, float radius)
center
- The center of the sphereradius
- The radius of the sphere
public boolean sphereInFrustumWithoutNearFar(Vector3 center, float radius)
center
- The center of the sphereradius
- The radius of the sphere
public boolean boundsInFrustum(BoundingBox bounds)
BoundingBox
is in the frustum.
bounds
- The bounding box
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |