Back to class index
Frustum[Class Summary]
horizontalFov
orthographicWidth
verticalFov
orthographicHeight
ctor
SetKind(...)
SetViewPlaneDistances(...)
SetFrame(pos,front,up)
SetPos(pos)
SetFront(front)
SetUp(up)
SetPerspective(...)
SetOrthographic(...)
Handedness()[const]
Type()[const]
ProjectiveSpace()[const]
Pos()[const]
Front()[const]
Up()[const]
NearPlaneDistance()[const]
FarPlaneDistance()[const]
HorizontalFov()[const]
VerticalFov()[const]
OrthographicWidth()[const]
OrthographicHeight()[const]
NumEdges()[const]
AspectRatio()[const]
SetHorizontalFovAndAspectRatio(...)
SetVerticalFovAndAspectRatio(...)
WorldRight()[const]
NearPlane()[const]
NearPlaneWidth()[const]
NearPlaneHeight()[const]
FarPlane()[const]
Left/Right/Top/BottomPlane()[const]
GetPlane(faceIndex)[const]
GetPlanes(outArray)[const]
CenterPoint()[const]
Edge(edgeIndex)[const]
CornerPoint(cornerIndex)[const]
GetCornerPoints(outPointArray)[const]
AnyPointFast()[const]
ExtremePoint(direction)[const] (+1 overload)
ProjectToAxis(...)[const]
UniqueFaceNormals(out)[const]
UniqueEdgeDirections(out)[const]
SetWorldMatrix(worldTransform)
WorldMatrix()[const]
ComputeWorldMatrix()[const]
ViewMatrix()[const]
ComputeViewMatrix()[const]
ProjectionMatrix()[const]
ComputeProjectionMatrix()[const]
ViewProjMatrix()[const]
ComputeViewProjMatrix()[const]
UnProject(x,y)[const] (+1 overload)
UnProjectFromNearPlane(x,y)[const]
UnProjectLineSegment(x,y)[const]
PointInside(x,y,z)[const] (+1 overload)
Project(point)[const]
NearPlanePos(x,y)[const] (+1 overload)
FarPlanePos(x,y)[const] (+1 overload)
IsFinite()[const]
Volume()[const]
FastRandomPointInside(rng)[const]
UniformRandomPointInside(rng)[const]
Translate(offset)
Transform(transform) (+3 overloads)
MinimalEnclosingAABB()[const]
MinimalEnclosingOBB(expandGuardband)[const]
ToPolyhedron()[const]
ToPBVolume()[const]
Contains(point)[const] (+7 overloads)
ClosestPoint(point)[const]
Distance(point)[const]
Intersects(ray)[const] (+11 overloads)
ToString()[const]
SerializeToString()[const]
ViewportToScreenSpace(...)[static] (+1 overload)
ScreenToViewportSpace(...)[static] (+1 overload)

Frustum::Contains

Syntax

bool Frustum::Contains(const float4 &point) const; [41 lines of code]
bool Frustum::Contains(const LineSegment &lineSegment) const; [21 lines of code]
bool Frustum::Contains(const Triangle &triangle) const; [24 lines of code]
bool Frustum::Contains(const Polygon &polygon) const; [7 lines of code]
bool Frustum::Contains(const AABB &aabb) const; [8 lines of code]
bool Frustum::Contains(const OBB &obb) const; [8 lines of code]
bool Frustum::Contains(const Frustum &frustum) const; [8 lines of code]
bool Frustum::Contains(const Polyhedron &polyhedron) const; [9 lines of code]

Tests if the given object is fully contained inside this Frustum.

This function returns true if the given object lies inside this Frustum, and false otherwise.

Note
The comparison is performed using less-or-equal, so the faces of this Frustum count as being inside, but due to float inaccuracies, this cannot generally be relied upon.

See Also

Distance(), Intersects(), ClosestPoint().

Work in progress:

Todo: in bool Frustum::Contains(const float4 &point) const:
Add Contains(Circle/Disc/Sphere/Capsule).
Todo: in bool Frustum::Contains(const float4 &point) const:
Make Frustum::Contains agnostic of the projection settings.