Back to class index

Class Frustum

Summary

Represents either an orthographic or a perspective viewing frustum.

Member Reference

FrustumRepresents either an orthographic or a perspective viewing frustum.
horizontalFovHorizontal field-of-view, in radians. This field is only valid if type == PerspectiveFrustum.
orthographicWidthThe width of the orthographic frustum. This field is only valid if type == OrthographicFrustum.
verticalFovVertical field-of-view, in radians. This field is only valid if type == PerspectiveFrustum.
orthographicHeightThe height of the orthographic frustum. This field is only valid if type == OrthographicFrustum.
ctorThe default constructor creates an uninitialized Frustum object.
SetKind(...)Sets the type of this Frustum.
SetViewPlaneDistances(...)Sets the depth clip distances of this Frustum.
SetFrame(pos,front,up)Specifies the full coordinate space of this Frustum in one call.
SetPos(pos)Sets the world-space position of this Frustum.
SetFront(front)Sets the world-space direction the Frustum eye is looking towards.
SetUp(up)Sets the world-space camera up direction vector of this Frustum.
SetPerspective(...)Makes this Frustum use a perspective projection formula with the given FOV parameters.
SetOrthographic(...)Makes this Frustum use an orthographic projection formula with the given FOV parameters.
Handedness()[const]Returns the handedness of the projection formula used by this Frustum.
Type()[const]Returns the type of the projection formula used by this Frustum.
ProjectiveSpace()[const]Returns the convention of the post-projective space used by this Frustum.
Pos()[const]Returns the world-space position of this Frustum.
Front()[const]Returns the world-space camera look-at direction of this Frustum.
Up()[const]Returns the world-space camera up direction of this Frustum.
NearPlaneDistance()[const]Returns the distance from the Frustum eye to the near clip plane.
FarPlaneDistance()[const]Returns the distance from the Frustum eye to the far clip plane.
HorizontalFov()[const]Returns the horizontal field-of-view used by this Frustum, in radians.
VerticalFov()[const]Returns the vertical field-of-view used by this Frustum, in radians.
OrthographicWidth()[const]Returns the world-space width of this Frustum.
OrthographicHeight()[const]Returns the world-space height of this Frustum.
NumEdges()[const]Returns the number of line segment edges that this Frustum is made up of, which is always 12.
AspectRatio()[const]Returns the aspect ratio of the view rectangle on the near plane.
SetHorizontalFovAndAspectRatio(...)Makes this Frustum use a perspective projection formula with the given horizontal FOV parameter and aspect ratio.
SetVerticalFovAndAspectRatio(...)Makes this Frustum use a perspective projection formula with the given vertical FOV parameter and aspect ratio.
WorldRight()[const]Computes the direction vector that points logically to the right-hand side of the Frustum.
NearPlane()[const]Computes the plane equation of the near plane of this Frustum.
NearPlaneWidth()[const]Computes the width of the near plane quad in world space units.
NearPlaneHeight()[const]Computes the height of the near plane quad in world space units.
FarPlane()[const]Computes the plane equation of the far plane of this Frustum.
Left/Right/Top/BottomPlane()[const]Returns the plane equation of the specified side of this Frustum.
GetPlane(faceIndex)[const]Returns the specified plane of this frustum.
GetPlanes(outArray)[const]Returns all six planes of this Frustum.
CenterPoint()[const]
Edge(edgeIndex)[const]Returns an edge of this Frustum.
CornerPoint(cornerIndex)[const]Generates one of the eight corner points of this Frustum.
GetCornerPoints(outPointArray)[const]Returns all eight corner points of this array.
AnyPointFast()[const]Quickly returns an arbitrary point inside this Frustum. Used in GJK intersection test.
ExtremePoint(direction)[const] (+1 overload)Computes an extreme point of this Frustum in the given direction.
ProjectToAxis(...)[const]Projects this Frustum onto the given 1D axis direction vector.
UniqueFaceNormals(out)[const]
UniqueEdgeDirections(out)[const]
SetWorldMatrix(worldTransform)Sets the pos, front and up members of this frustum from the given world transform.
WorldMatrix()[const]Computes the matrix that transforms from the view space to the world (global) space of this Frustum.
ComputeWorldMatrix()[const]
ViewMatrix()[const]Computes the matrix that transforms from the world (global) space to the view space of this Frustum.
ComputeViewMatrix()[const]
ProjectionMatrix()[const]Computes the matrix that projects from the view space to the projection space of this Frustum.
ComputeProjectionMatrix()[const]
ViewProjMatrix()[const]Computes the matrix that transforms from the world (global) space to the projection space of this Frustum.
ComputeViewProjMatrix()[const]
UnProject(x,y)[const] (+1 overload)Finds a ray in world space that originates at the eye point and looks in the given direction inside the frustum.
UnProjectFromNearPlane(x,y)[const]Like UnProject, but if the frustum type is PerspectiveFrustum, the ray originates at the near plane, and not at the camera eye point.
UnProjectLineSegment(x,y)[const]Returns the world-space line segment of the points that project to the given normalized viewport coordinate (x,y).
PointInside(x,y,z)[const] (+1 overload)Returns a point inside this frustum parameterized by three scalar coordinates.
Project(point)[const]Projects the given point onto the near plane of this frustum.
NearPlanePos(x,y)[const] (+1 overload)Returns a point on the near plane.
FarPlanePos(x,y)[const] (+1 overload)Returns a point on the far plane.
IsFinite()[const]Tests if this Frustum is finite.
Volume()[const]Computes the volume of this Frustum.
FastRandomPointInside(rng)[const]Quickly generates a random point inside this Frustum.
UniformRandomPointInside(rng)[const]Generates a uniformly random point inside this Frustum.
Translate(offset)Moves this Frustum by the given offset vector.
Transform(transform) (+3 overloads)Applies a transformation to this Frustum.
MinimalEnclosingAABB()[const]Returns the tightest AABB that contains this Frustum.
MinimalEnclosingOBB(expandGuardband)[const]Returns the tightest OBB that encloses this Frustum.
ToPolyhedron()[const]Converts this Frustum to a Polyhedron.
ToPBVolume()[const]Converts this Frustum to a PBVolume.
Contains(point)[const] (+7 overloads)Tests if the given object is fully contained inside this Frustum.
ClosestPoint(point)[const]Computes the closest point inside this Frustum to the given point.
Distance(point)[const]Computes the distance between this Frustum and the given object.
Intersects(ray)[const] (+11 overloads)Tests whether this Frustum and the given object intersect.
ToString()[const]Returns a human-readable representation of this Frustum. Most useful for debugging purposes.
SerializeToString()[const]
ViewportToScreenSpace(...)[static] (+1 overload)Maps a point from the normalized viewport space to the screen space.
ScreenToViewportSpace(...)[static] (+1 overload)Maps a point from screen space to normalized viewport space.
Back to class index