Kochol Game Engine  0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
kge::math::Frustum Class Reference

#include <Frustum.h>

Public Member Functions

 Frustum ()
 Constructor.
 ~Frustum ()
 Destructor.
CollisionType Collision (const Sphere *pSphere) const
 Checks the frustum collision with sphere and returns ECT_In or ECT_Out.
bool TestSphere (const Sphere *pSphere) const
 Checks the frustum collision with sphere.
CollisionType Collision (const AABB *pBox) const
 Checks the frustum collision with AABB and returns ECT_In or ECT_Out.
virtual void Init (const Matrix *pMatrixView, const Matrix *pMatrixProjection)
Vector GetFarLeftUpPoint ()
 Returns the point which is on the far left upper corner inside the the view frustum.
Vector GetFarLeftDownPoint ()
 Returns the point which is on the far left bottom corner inside the the view frustum.
Vector GetFarRightUpPoint ()
 Returns the point which is on the far Right upper corner inside the the view frustum.
Vector GetFarRightDownPoint ()
 Returns the point which is on the far Right bottom corner inside the the view frustum.
AABBGetBoundingBox ()
 Returns the bounding box.
VectorGetCenter ()
 Returns the center of the frustum.
VectorGetCorners ()
 Returns the 8 frustum corners.
bool TestSweptSphere (Sphere &sphere, Vector &sweepDir) const
 TestSweptSphere.

Public Attributes

Vectorm_pCameraPosition

Protected Attributes

Planem_pSides
AABBm_pAABB
bool m_bCalcAABB
Matrix m_mViewProj
Vector m_vCorners [8]
Vector m_vCenter

Detailed Description

Definition at line 33 of file Frustum.h.

Constructor & Destructor Documentation

kge::math::Frustum::Frustum ( )

Constructor.

kge::math::Frustum::~Frustum ( )

Destructor.

Member Function Documentation

CollisionType kge::math::Frustum::Collision ( const Sphere pSphere) const

Checks the frustum collision with sphere and returns ECT_In or ECT_Out.

CollisionType kge::math::Frustum::Collision ( const AABB pBox) const

Checks the frustum collision with AABB and returns ECT_In or ECT_Out.

AABB* kge::math::Frustum::GetBoundingBox ( )

Returns the bounding box.

Vector* kge::math::Frustum::GetCenter ( )

Returns the center of the frustum.

Vector* kge::math::Frustum::GetCorners ( )

Returns the 8 frustum corners.

Vector kge::math::Frustum::GetFarLeftDownPoint ( )

Returns the point which is on the far left bottom corner inside the the view frustum.

Vector kge::math::Frustum::GetFarLeftUpPoint ( )

Returns the point which is on the far left upper corner inside the the view frustum.

Vector kge::math::Frustum::GetFarRightDownPoint ( )

Returns the point which is on the far Right bottom corner inside the the view frustum.

Vector kge::math::Frustum::GetFarRightUpPoint ( )

Returns the point which is on the far Right upper corner inside the the view frustum.

virtual void kge::math::Frustum::Init ( const Matrix pMatrixView,
const Matrix pMatrixProjection 
)
virtual

Create the frustum culling with camera matrices.

Parameters
pMatrixViewThe camera's view matrix.
pMatrixProjectionThe camera's projection matrix.
bool kge::math::Frustum::TestSphere ( const Sphere pSphere) const

Checks the frustum collision with sphere.

bool kge::math::Frustum::TestSweptSphere ( Sphere sphere,
Vector sweepDir 
) const

TestSweptSphere.

Member Data Documentation

bool kge::math::Frustum::m_bCalcAABB
protected

Definition at line 90 of file Frustum.h.

Matrix kge::math::Frustum::m_mViewProj
protected

Definition at line 92 of file Frustum.h.

AABB* kge::math::Frustum::m_pAABB
protected

Definition at line 88 of file Frustum.h.

Vector* kge::math::Frustum::m_pCameraPosition

Definition at line 82 of file Frustum.h.

Plane* kge::math::Frustum::m_pSides
protected

Definition at line 86 of file Frustum.h.

Vector kge::math::Frustum::m_vCenter
protected

Definition at line 94 of file Frustum.h.

Vector kge::math::Frustum::m_vCorners[8]
protected

Definition at line 94 of file Frustum.h.


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