Hymn to Beauty
C++ 3D Engine
Video::Frustum Class Reference

A viewing frustum. More...

#include <Frustum.hpp>

Public Member Functions

 Frustum (const glm::mat4 &matrix)
 Create new frustum. More...
 
bool Intersects (const AxisAlignedBoundingBox &aabb) const
 Check intersection between frustum and an axis-aligned bounding box. More...
 
bool Intersects (const Sphere &sphere) const
 Check intersection between frustum and a sphere. More...
 

Detailed Description

A viewing frustum.

Used for frustum culling.

Constructor & Destructor Documentation

◆ Frustum()

Frustum::Frustum ( const glm::mat4 &  matrix)
explicit

Create new frustum.

Parameters
matrixView-projection matrix to create frustum planes from.

Member Function Documentation

◆ Intersects() [1/2]

bool Frustum::Intersects ( const AxisAlignedBoundingBox aabb) const

Check intersection between frustum and an axis-aligned bounding box.

Parameters
aabbThe axis-aligned bounding box to check intersection against.
Returns
Whether the bounding volumes intersect.

◆ Intersects() [2/2]

bool Frustum::Intersects ( const Sphere sphere) const

Check intersection between frustum and a sphere.

Parameters
sphereThe sphere to check intersection against.
Returns
Whether the bounding volumes intersect.

The documentation for this class was generated from the following files: