API Documentation
Public Member Functions | List of all members
nkGraphics::Frustum Class Referencefinal

Defines a frustum. More...

Public Member Functions

 Frustum () noexcept
 
 Frustum (const Frustum &other) noexcept
 
 ~Frustum ()
 
const nkMaths::VectorgetPlane (unsigned int index) const
 
void setPlane (const nkMaths::Vector &plane, unsigned int index)
 
void buildFrustum (const nkMaths::Matrix &viewMat, const nkMaths::Matrix &projMat)
 

Detailed Description

Defines a frustum.

A Frustum is a primitive that can for instance describe a camera's view range. Within Nilkins, the planes are in this order : left, right, bottom, top, near, far. Directions should be normalized and pointing inside the frustum's volume.

Constructor & Destructor Documentation

◆ Frustum() [1/2]

nkGraphics::Frustum::Frustum ( )
noexcept

Default constructor.

◆ Frustum() [2/2]

nkGraphics::Frustum::Frustum ( const Frustum other)
noexcept

Copy constructor.

Parameters
otherThe frustum to copy.

◆ ~Frustum()

nkGraphics::Frustum::~Frustum ( )

Destructor.

Member Function Documentation

◆ getPlane()

const nkMaths::Vector& nkGraphics::Frustum::getPlane ( unsigned int  index) const

Gives access to the planes forming the frustum.

Parameters
indexThe index of the plane to retrieve. Will be clamped to [0, 8].
Returns
The normal describing the plane requested.

◆ setPlane()

void nkGraphics::Frustum::setPlane ( const nkMaths::Vector plane,
unsigned int  index 
)

Sets a plane.

Parameters
planeThe new plane to set.
indexThe index of the plane to set.

◆ buildFrustum()

void nkGraphics::Frustum::buildFrustum ( const nkMaths::Matrix viewMat,
const nkMaths::Matrix projMat 
)

Builds the frustum for a given view and projection matrix.


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