Nameless Engine
Loading...
Searching...
No Matches
ne::Frustum Struct Reference

#include <Frustum.h>

Public Member Functions

bool isAabbInFrustum (const AABB &aabbInModelSpace, const glm::mat4x4 &worldMatrix) const
 
bool isSphereInFrustum (const Sphere &sphere) const
 
bool isConeInFrustum (const Cone &cone) const
 

Public Attributes

Plane topFace
 
Plane bottomFace
 
Plane rightFace
 
Plane leftFace
 
Plane nearFace
 
Plane farFace
 

Detailed Description

Frustum represented by 6 planes.

Member Function Documentation

◆ isAabbInFrustum()

bool ne::Frustum::isAabbInFrustum ( const AABB aabbInModelSpace,
const glm::mat4x4 &  worldMatrix 
) const

Tests if the specified axis-aligned bounding box is inside of the frustum or intersects it.

Remarks
Does frustum/AABB intersection in world space.
Parameters
aabbInModelSpaceAxis-aligned bounding box in model space.
worldMatrixMatrix that transforms the specified AABB from model space to world space.
Returns
true if the AABB is inside of the frustum or intersects it, false if the AABB is outside of the frustum.

◆ isConeInFrustum()

bool ne::Frustum::isConeInFrustum ( const Cone cone) const

Tests if the specified cone is inside of the frustum or intersects it.

Remarks
Expects that both frustum and cone are in the same coordinate space.
Parameters
coneCone to test.
Returns
true if the cone is inside of the frustum or intersects it, false if the cone is outside of the frustum.

◆ isSphereInFrustum()

bool ne::Frustum::isSphereInFrustum ( const Sphere sphere) const

Tests if the specified sphere is inside of the frustum or intersects it.

Remarks
Expects that both frustum and sphere are in the same coordinate space.
Parameters
sphereSphere to test.
Returns
true if the sphere is inside of the frustum or intersects it, false if the sphere is outside of the frustum.

Member Data Documentation

◆ bottomFace

Plane ne::Frustum::bottomFace

Bottom face of the frustum that points inside of the frustum volume.

◆ farFace

Plane ne::Frustum::farFace

Far face of the frustum that points inside of the frustum volume.

◆ leftFace

Plane ne::Frustum::leftFace

Left face of the frustum that points inside of the frustum volume.

◆ nearFace

Plane ne::Frustum::nearFace

Near face of the frustum that points inside of the frustum volume.

◆ rightFace

Plane ne::Frustum::rightFace

Right face of the frustum that points inside of the frustum volume.

◆ topFace

Plane ne::Frustum::topFace

Top face of the frustum that points inside of the frustum volume.


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