OpenGothic
Open source reimplementation of Gothic I and II
Loading...
Searching...
No Matches
Frustrum Class Reference

#include <frustrum.h>

Public Types

enum  Ret : uint8_t { T_Invisible , T_Partial , T_Full }
 

Public Member Functions

void make (const Tempest::Matrix4x4 &m, int32_t w, int32_t h)
 
void clear ()
 
bool testPoint (float x, float y, float z) const
 
bool testPoint (float x, float y, float z, float R) const
 
bool testPoint (const Tempest::Vec3 &p, float R) const
 
bool testPoint (const Tempest::Vec3 &p, float R, float &dist) const
 
Ret testBbox (const Tempest::Vec3 &min, const Tempest::Vec3 &max) const
 

Public Attributes

float f [6][4] = {}
 
Tempest::Matrix4x4 mat
 
uint32_t width = 0
 
uint32_t height = 0
 

Detailed Description

Definition at line 5 of file frustrum.h.

Member Enumeration Documentation

◆ Ret

enum Frustrum::Ret : uint8_t
Enumerator
T_Invisible 
T_Partial 
T_Full 

Definition at line 15 of file frustrum.h.

Member Function Documentation

◆ clear()

void Frustrum::clear ( )

Definition at line 98 of file frustrum.cpp.

◆ make()

void Frustrum::make ( const Tempest::Matrix4x4 &  m,
int32_t  w,
int32_t  h 
)

Definition at line 5 of file frustrum.cpp.

◆ testBbox()

Frustrum::Ret Frustrum::testBbox ( const Tempest::Vec3 &  min,
const Tempest::Vec3 &  max 
) const

Definition at line 136 of file frustrum.cpp.

◆ testPoint() [1/4]

bool Frustrum::testPoint ( const Tempest::Vec3 &  p,
float  R 
) const

Definition at line 119 of file frustrum.cpp.

◆ testPoint() [2/4]

bool Frustrum::testPoint ( const Tempest::Vec3 &  p,
float  R,
float &  dist 
) const

◆ testPoint() [3/4]

bool Frustrum::testPoint ( float  x,
float  y,
float  z 
) const

Definition at line 104 of file frustrum.cpp.

◆ testPoint() [4/4]

bool Frustrum::testPoint ( float  x,
float  y,
float  z,
float  R 
) const

Definition at line 108 of file frustrum.cpp.

Member Data Documentation

◆ f

float Frustrum::f[6][4] = {}

Definition at line 22 of file frustrum.h.

◆ height

uint32_t Frustrum::height = 0

Definition at line 25 of file frustrum.h.

◆ mat

Tempest::Matrix4x4 Frustrum::mat

Definition at line 23 of file frustrum.h.

◆ width

uint32_t Frustrum::width = 0

Definition at line 24 of file frustrum.h.


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