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::Intersects

Syntax

bool Frustum::Intersects(const Ray &ray) const; [5 lines of code]
bool Frustum::Intersects(const Line &line) const; [5 lines of code]
bool Frustum::Intersects(const LineSegment &lineSegment) const; [4 lines of code]
bool Frustum::Intersects(const AABB &aabb) const; [4 lines of code]
bool Frustum::Intersects(const OBB &obb) const; [4 lines of code]
bool Frustum::Intersects(const Plane &plane) const; [4 lines of code]
bool Frustum::Intersects(const Triangle &triangle) const; [4 lines of code]
bool Frustum::Intersects(const Polygon &polygon) const; [4 lines of code]
bool Frustum::Intersects(const Sphere &sphere) const; [4 lines of code]
bool Frustum::Intersects(const Capsule &capsule) const; [4 lines of code]
bool Frustum::Intersects(const Frustum &frustum) const; [4 lines of code]
bool Frustum::Intersects(const Polyhedron &polyhedron) const; [4 lines of code]

Tests whether this Frustum and the given object intersect.

Both objects are treated as "solid", meaning that if one of the objects is fully contained inside another, this function still returns true. (e.g. in case a line segment is contained inside this Frustum, or this Frustum is contained inside a Sphere, etc.) The first parameter of this function specifies the other object to test against.

See Also

Contains(), Distance(), ClosestPoint().

Work in progress:

Todo: in bool Frustum::Intersects(const Ray &ray) const:
Add Intersects(Circle/Disc).
Todo: in bool Frustum::Intersects(const Ray &ray) const:
This is a naive test. Implement a faster version.
Todo: in bool Frustum::Intersects(const Line &line) const:
This is a naive test. Implement a faster version.