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.
|
double |
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(double left,
double right,
double bottom,
double top,
double near,
double 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(double left,
double right,
double bottom,
double top,
double near,
double 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(double fovy,
double aspect,
double znear,
double 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(double left,
double right,
double bottom,
double top,
double near,
double 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(double fovy, double aspect, double znear, double 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(double left, double right, double bottom, double top, double near, double far)
glFrustum
).public Frustum setToOrtho(double left, double right, double bottom, double top, double near, double far)
glOrtho
).public Frustum setToProjection(double left, double right, double bottom, double top, double near, double far, IVector3 nearFarNormal, boolean ortho, boolean mirrored)
public double distance(Vector3 point)
public Frustum.IntersectionType intersectionType(Box box)
Copyright © 2017. All rights reserved.