Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
Divide::Frustum Class Reference

#include <Frustum.h>

Public Member Functions

void set (const Frustum &other) noexcept
 
FrustumCollision ContainsPoint (const vec3< F32 > &point, I8 &lastPlaneCache) const noexcept
 
FrustumCollision ContainsBoundingBox (const BoundingBox &bbox, I8 &lastPlaneCache) const noexcept
 
FrustumCollision ContainsSphere (const BoundingSphere &bSphere, I8 &lastPlaneCache) const noexcept
 
FrustumCollision ContainsSphere (const vec3< F32 > &center, F32 radius, I8 &lastPlaneCache) const noexcept
 
FrustumCollision ContainsPoint (const vec3< F32 > &point) const noexcept
 
FrustumCollision ContainsBoundingBox (const BoundingBox &bbox) const noexcept
 
FrustumCollision ContainsSphere (const vec3< F32 > &center, const F32 radius) const noexcept
 
void getCornersWorldSpace (std::array< vec3< F32 >, to_base(FrustumPoints::COUNT)> &cornersWS) const noexcept
 
const std::array< Plane< F32 >, to_base(FrustumPlane::COUNT)> & computePlanes (const mat4< F32 > &viewProjMatrix)
 
FrustumCollision PlaneBoundingBoxIntersect (FrustumPlane frustumPlane, const BoundingBox &bbox) const noexcept
 
FrustumCollision PlaneBoundingSphereIntersect (FrustumPlane frustumPlane, const BoundingSphere &bsphere) const noexcept
 
FrustumCollision PlanePointIntersect (FrustumPlane frustumPlane, const vec3< F32 > &point) const noexcept
 
FrustumCollision PlaneSphereIntersect (FrustumPlane frustumPlane, const vec3< F32 > &center, F32 radius) const noexcept
 
FrustumCollision PlaneBoundingBoxIntersect (const FrustumPlane *frustumPlanes, U8 count, const BoundingBox &bbox) const noexcept
 
FrustumCollision PlaneBoundingSphereIntersect (const FrustumPlane *frustumPlanes, U8 count, const BoundingSphere &bsphere) const noexcept
 
FrustumCollision PlanePointIntersect (const FrustumPlane *frustumPlanes, U8 count, const vec3< F32 > &point) const noexcept
 
FrustumCollision PlaneSphereIntersect (const FrustumPlane *frustumPlanes, U8 count, const vec3< F32 > &center, F32 radius) const noexcept
 
const std::array< Plane< F32 >, to_base(FrustumPlane::COUNT)> & planes () const noexcept
 
bool operator== (const Frustum &other) const =default
 

Private Attributes

std::array< Plane< F32 >, to_base(FrustumPlane::COUNT)> _frustumPlanes = create_array<to_base(FrustumPlane::COUNT)>(Plane<F32>{ WORLD_Y_AXIS, 0.0f })
 

Detailed Description

Definition at line 42 of file Frustum.h.

Member Function Documentation

◆ computePlanes()

const std::array< Plane< F32 >, to_base(FrustumPlane::COUNT)> & Divide::Frustum::computePlanes ( const mat4< F32 > &  viewProjMatrix)

Definition at line 226 of file Frustum.cpp.

◆ ContainsBoundingBox() [1/2]

FrustumCollision Divide::Frustum::ContainsBoundingBox ( const BoundingBox bbox) const
inlinenoexcept

Definition at line 57 of file Frustum.h.

◆ ContainsBoundingBox() [2/2]

FrustumCollision Divide::Frustum::ContainsBoundingBox ( const BoundingBox bbox,
I8 lastPlaneCache 
) const
noexcept

Definition at line 174 of file Frustum.cpp.

◆ ContainsPoint() [1/2]

FrustumCollision Divide::Frustum::ContainsPoint ( const vec3< F32 > &  point) const
inlinenoexcept

Definition at line 52 of file Frustum.h.

◆ ContainsPoint() [2/2]

FrustumCollision Divide::Frustum::ContainsPoint ( const vec3< F32 > &  point,
I8 lastPlaneCache 
) const
noexcept

Definition at line 21 of file Frustum.cpp.

◆ ContainsSphere() [1/3]

FrustumCollision Divide::Frustum::ContainsSphere ( const BoundingSphere bSphere,
I8 lastPlaneCache 
) const
noexcept

Definition at line 170 of file Frustum.cpp.

◆ ContainsSphere() [2/3]

FrustumCollision Divide::Frustum::ContainsSphere ( const vec3< F32 > &  center,
const F32  radius 
) const
inlinenoexcept

Definition at line 62 of file Frustum.h.

◆ ContainsSphere() [3/3]

FrustumCollision Divide::Frustum::ContainsSphere ( const vec3< F32 > &  center,
F32  radius,
I8 lastPlaneCache 
) const
noexcept

Definition at line 66 of file Frustum.cpp.

◆ getCornersWorldSpace()

void Divide::Frustum::getCornersWorldSpace ( std::array< vec3< F32 >, to_base(FrustumPoints::COUNT)> &  cornersWS) const
noexcept

Definition at line 208 of file Frustum.cpp.

◆ operator==()

bool Divide::Frustum::operator== ( const Frustum other) const
default

◆ PlaneBoundingBoxIntersect() [1/2]

FrustumCollision Divide::Frustum::PlaneBoundingBoxIntersect ( const FrustumPlane frustumPlanes,
U8  count,
const BoundingBox bbox 
) const
noexcept

Definition at line 110 of file Frustum.cpp.

◆ PlaneBoundingBoxIntersect() [2/2]

FrustumCollision Divide::Frustum::PlaneBoundingBoxIntersect ( FrustumPlane  frustumPlane,
const BoundingBox bbox 
) const
noexcept

Definition at line 94 of file Frustum.cpp.

◆ PlaneBoundingSphereIntersect() [1/2]

FrustumCollision Divide::Frustum::PlaneBoundingSphereIntersect ( const FrustumPlane frustumPlanes,
U8  count,
const BoundingSphere bsphere 
) const
noexcept

Definition at line 122 of file Frustum.cpp.

◆ PlaneBoundingSphereIntersect() [2/2]

FrustumCollision Divide::Frustum::PlaneBoundingSphereIntersect ( FrustumPlane  frustumPlane,
const BoundingSphere bsphere 
) const
noexcept

Definition at line 98 of file Frustum.cpp.

◆ PlanePointIntersect() [1/2]

FrustumCollision Divide::Frustum::PlanePointIntersect ( const FrustumPlane frustumPlanes,
U8  count,
const vec3< F32 > &  point 
) const
noexcept

Definition at line 134 of file Frustum.cpp.

◆ PlanePointIntersect() [2/2]

FrustumCollision Divide::Frustum::PlanePointIntersect ( FrustumPlane  frustumPlane,
const vec3< F32 > &  point 
) const
noexcept

Definition at line 102 of file Frustum.cpp.

◆ planes()

const std::array< Plane< F32 >, to_base(FrustumPlane::COUNT)> & Divide::Frustum::planes ( ) const
inlinenoexcept

Definition at line 82 of file Frustum.h.

◆ PlaneSphereIntersect() [1/2]

FrustumCollision Divide::Frustum::PlaneSphereIntersect ( const FrustumPlane frustumPlanes,
U8  count,
const vec3< F32 > &  center,
F32  radius 
) const
noexcept

Definition at line 146 of file Frustum.cpp.

◆ PlaneSphereIntersect() [2/2]

FrustumCollision Divide::Frustum::PlaneSphereIntersect ( FrustumPlane  frustumPlane,
const vec3< F32 > &  center,
F32  radius 
) const
noexcept

Definition at line 106 of file Frustum.cpp.

◆ set()

void Divide::Frustum::set ( const Frustum other)
noexcept

Definition at line 202 of file Frustum.cpp.

Member Data Documentation

◆ _frustumPlanes

std::array<Plane<F32>, to_base(FrustumPlane::COUNT)> Divide::Frustum::_frustumPlanes = create_array<to_base(FrustumPlane::COUNT)>(Plane<F32>{ WORLD_Y_AXIS, 0.0f })
private

Definition at line 87 of file Frustum.h.


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