public

Inheritance Graph

graph BT
	Frustum
	click Frustum "classGeometry_1_1Frustum"

Description

Three-dimensional frustum.

[ Frustum ]

Main

   
   
  Frustum()
   
  Frustum(const Angle & angle, float ratio, float nearD, float farD)

Information

   
   
enum intersection_t {INSIDE, INTERSECT, OUTSIDE}
   
const Vec3 & getPos() const
   
Vec3 getDir() const
   
Vec3 getUp() const
   
float getNear() const
   
float getFar() const
   
float getLeft() const
   
float getRight() const
   
float getBottom() const
   
float getTop() const
   
bool isOrthogonal() const
   
const Matrix4x4 & getProjectionMatrix() const
   
intersection_t isBoxInFrustum(const Box & b) const
   
bool pointInFrustum(const Vec3 & p) const
   
Vec3 operator[]( corner_t nr) const
   
bool operator==(const Frustum & other) const
   
const Plane & getPlane( side_t side) const

Modification

   
   
void setPerspective(const Angle & angle, float ratio, float near, float far)
   
void setFrustum(float left, float right, float bottom, float top, float near, float far, bool orthogonal)
   
void setFrustumFromAngles(const Angle & fovLeft, const Angle & fovRight, const Angle & fovBottom, const Angle & fovTop, float near, float far)
   
void setOrthogonal(float l, float r, float b, float t, float n, float f)
   
void setPosition(const Vec3 & pos, const Vec3 & dir, const Vec3 & up)
   
void recalculateCornersAndPlanes()

Documentation

function
Geometry::Frustum::Frustum

public
   
   
Frustum( )

Defined in Geometry/Frustum.h:37


function
Geometry::Frustum::Frustum

public
     
     
Frustum( const Angle & angle,
  float ratio,
  float nearD,
  float farD
)    

Defined in Geometry/Frustum.h:38


enum
Geometry::Frustum::intersection_t

public
 
 
enum intersection_t
Enumerator   Description
Enumerator   Description
INSIDE = 0  
INTERSECT = 1  
OUTSIDE = 2  

Defined in Geometry/Frustum.h:45


function
Geometry::Frustum::getPos

public const inline
   
   
const Vec3 & getPos( ) const

Defined in Geometry/Frustum.h:47


function
Geometry::Frustum::getDir

public const inline
   
   
Vec3 getDir( ) const

Defined in Geometry/Frustum.h:50


function
Geometry::Frustum::getUp

public const inline
   
   
Vec3 getUp( ) const

Defined in Geometry/Frustum.h:53


function
Geometry::Frustum::getNear

public const inline
   
   
float getNear( ) const

Defined in Geometry/Frustum.h:56


function
Geometry::Frustum::getFar

public const inline
   
   
float getFar( ) const

Defined in Geometry/Frustum.h:59


function
Geometry::Frustum::getLeft

public const inline
   
   
float getLeft( ) const

Defined in Geometry/Frustum.h:62


function
Geometry::Frustum::getRight

public const inline
   
   
float getRight( ) const

Defined in Geometry/Frustum.h:65


function
Geometry::Frustum::getBottom

public const inline
   
   
float getBottom( ) const

Defined in Geometry/Frustum.h:68


function
Geometry::Frustum::getTop

public const inline
   
   
float getTop( ) const

Defined in Geometry/Frustum.h:71


function
Geometry::Frustum::isOrthogonal

public const inline
   
   
bool isOrthogonal( ) const

Defined in Geometry/Frustum.h:74


function
Geometry::Frustum::getProjectionMatrix

public const inline
   
   
const Matrix4x4 & getProjectionMatrix( ) const

Defined in Geometry/Frustum.h:78


function
Geometry::Frustum::isBoxInFrustum

public const
     
     
intersection_t isBoxInFrustum( const Box & b ) const

Defined in Geometry/Frustum.h:82


function
Geometry::Frustum::pointInFrustum

public const inline
     
     
bool pointInFrustum( const Vec3 & p ) const

Defined in Geometry/Frustum.h:83


function
Geometry::Frustum::operator[]

public const inline
     
     
Vec3 operator[]( corner_t nr ) const

Defined in Geometry/Frustum.h:84


function
Geometry::Frustum::operator==

public const
     
     
bool operator==( const Frustum & other ) const

Defined in Geometry/Frustum.h:85


function
Geometry::Frustum::getPlane

public const inline
     
     
const Plane & getPlane( side_t side ) const

Defined in Geometry/Frustum.h:87


function
Geometry::Frustum::setPerspective

public
     
     
void setPerspective( const Angle & angle,
  float ratio,
  float near,
  float far
)    

Defined in Geometry/Frustum.h:96


function
Geometry::Frustum::setFrustum

public
     
     
void setFrustum( float left,
  float right,
  float bottom,
  float top,
  float near,
  float far,
  bool orthogonal
)    

Defined in Geometry/Frustum.h:97


function
Geometry::Frustum::setFrustumFromAngles

public
     
     
void setFrustumFromAngles( const Angle & fovLeft,
  const Angle & fovRight,
  const Angle & fovBottom,
  const Angle & fovTop,
  float near,
  float far
)    

Defined in Geometry/Frustum.h:98


function
Geometry::Frustum::setOrthogonal

public inline
     
     
void setOrthogonal( float l,
  float r,
  float b,
  float t,
  float n,
  float f
)    

Defined in Geometry/Frustum.h:100


function
Geometry::Frustum::setPosition

public
     
     
void setPosition( const Vec3 & pos,
  const Vec3 & dir,
  const Vec3 & up
)    

Defined in Geometry/Frustum.h:103


function
Geometry::Frustum::recalculateCornersAndPlanes

protected
   
   
void recalculateCornersAndPlanes( )

Defined in Geometry/Frustum.h:106