Math v0.2.0
Frustum Struct Reference

Camera view frustum planes container. More...

#include <frustum.hpp>

Public Member Functions

 Frustum (uint8 count=fullCount) noexcept
 Creates a new camera frustum plane container.
 Frustum (const f32x4x4 &viewProj) noexcept
 Extracts projection matrix frustum planes.
uint8 getPlaneCount () const noexcept
 Returns view frustum plane count.
void setPlaneCount (uint8 count)
 Sets view frustum plane count.
void normalize () noexcept
 Normalizes view frustum planes.

Public Attributes

Plane planes [fullCount]

Static Public Attributes

static constexpr uint8 fullCount = 6

Protected Attributes

uint8 count = fullCount

Detailed Description

Camera view frustum planes container.

Constructor & Destructor Documentation

◆ Frustum() [1/2]

Frustum ( uint8 count = fullCount)
inlinenoexcept

Creates a new camera frustum plane container.

Parameters
counttarget view frustum plane count

◆ Frustum() [2/2]

Frustum ( const f32x4x4 & viewProj)
inlineexplicitnoexcept

Extracts projection matrix frustum planes.

Warning
Extracted planes are unnormalized! Use normalize().
Parameters
[in]viewProjtarget view * projection matrix

Member Function Documentation

◆ setPlaneCount()

void setPlaneCount ( uint8 count)
inline

Sets view frustum plane count.

Parameters
counttarget view frustum plane count

Member Data Documentation

◆ fullCount

uint8 fullCount = 6
staticconstexpr

Full frustum plane count. (Cube side count)

◆ planes

Plane planes[fullCount]

Viewing frustum planes.