Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
esengine::Frustum Struct Reference

#include <Frustum.hpp>

Public Member Functions

void extractFromMatrix (const glm::mat4 &vp)
bool intersectsAABB (const glm::vec3 &center, const glm::vec3 &halfExtents) const
bool intersectsSweptSphere (const glm::vec3 &a, const glm::vec3 &b, f32 radius) const

Public Attributes

Plane planes [6]

Detailed Description

Definition at line 27 of file Frustum.hpp.

Member Function Documentation

◆ extractFromMatrix()

void esengine::Frustum::extractFromMatrix ( const glm::mat4 & vp)

Definition at line 95 of file RenderFrame.cpp.

References planes.

◆ intersectsAABB()

bool esengine::Frustum::intersectsAABB ( const glm::vec3 & center,
const glm::vec3 & halfExtents ) const

Definition at line 125 of file RenderFrame.cpp.

References planes.

Referenced by esengine::MeshPlugin::collect().

◆ intersectsSweptSphere()

bool esengine::Frustum::intersectsSweptSphere ( const glm::vec3 & a,
const glm::vec3 & b,
f32 radius ) const

Whether the sphere of radius swept from a to b can touch the volume: false only when both ends stand outside the same plane by more than the radius, so a capsule that clips a corner is kept.

Definition at line 140 of file RenderFrame.cpp.

References planes.

Member Data Documentation

◆ planes

Plane esengine::Frustum::planes[6]

Definition at line 28 of file Frustum.hpp.

Referenced by extractFromMatrix(), intersectsAABB(), and intersectsSweptSphere().


The documentation for this struct was generated from the following files:
  • /home/runner/work/estella/estella/src/esengine/renderer/frame/Frustum.hpp
  • /home/runner/work/estella/estella/src/esengine/renderer/frame/RenderFrame.cpp