Toast Engine
Loading...
Searching...
No Matches
frustum.hpp File Reference
#include <array>
#include <glm/glm.hpp>
#include <limits>
#include <utility>
Include dependency graph for frustum.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  renderer::Box

Typedefs

using renderer::FrustumPlanes = std::array<glm::vec4, 6>

Functions

auto renderer::extractFrustumPlanes (const glm::mat4 &view_projection, bool reversed_depth=false) -> FrustumPlanes
auto renderer::sphereInFrustum (const FrustumPlanes &planes, const glm::vec3 &center, float radius) -> bool
auto renderer::transformBox (const glm::mat4 &model, const glm::vec3 &min, const glm::vec3 &max) -> Box
 World axis aligned box around a box in the space model maps from.
auto renderer::boxTouchesLateralFrustum (const FrustumPlanes &planes, const Box &box) -> bool
 Skips the near plane so a box in front of it still counts.

Detailed Description

Author
dario
Date
21/09/2026

Function Documentation

◆ extractFrustumPlanes()

auto renderer::extractFrustumPlanes ( const glm::mat4 & view_projection,
bool reversed_depth = false ) -> FrustumPlanes
inlinenodiscard

Inward normalized planes ordered left right bottom top near far reversed_depth is depth::k_reversed_z for a scene camera and false for shadow views