public class Frustum extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Frustum.IntersectionType
Intersection types indicating that the frustum does not intersect, intersects, or fully
contains, respectively, the parameter.
|
Constructor and Description |
---|
Frustum()
Creates an empty (invalid) frustum.
|
Modifier and Type | Method and Description |
---|---|
Box |
bounds()
Returns a reference to the bounds of this frustum.
|
Box |
boundsUnderRotation(Matrix3 matrix,
Box result)
Computes the bounds of the frustum under the supplied rotation and places the results in
the box provided.
|
float |
distance(Vector3 point)
Determines the maximum signed distance of the point from the planes of the frustum.
|
Frustum.IntersectionType |
intersectionType(Box box)
Checks whether the frustum intersects the specified box.
|
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,
IVector3 nearFarNormal,
boolean ortho,
boolean mirrored)
Sets this frustum to a perspective or orthographic projection with the specified parameters
determining its size and shape.
|
IVector3[] |
vertices()
Returns a reference to the frustum's array of vertices.
|
public IVector3[] vertices()
public Box bounds()
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, IVector3 nearFarNormal, boolean ortho, boolean mirrored)
public float distance(Vector3 point)
public Frustum.IntersectionType intersectionType(Box box)
Copyright © 2017. All rights reserved.