Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members
Public Member Functions | Protected Attributes
render::Frustum Class Reference

#include <Frustum.h>

List of all members.

Public Member Functions

void buildViewFrustum (const core::matrix4 &projMat, const core::matrix4 &viewMat, ProjectionType projType, f32 fov, f32 aspect, f32 near, f32 far)
 build the view frustum
 Frustum ()
const core::vector3dgetCorners ()
bool isVisible (const core::sphere3d &sphere)
 Tests whether the given sphere is visible in the Frustum.
bool isVisible (const core::aabox3d &box)
 Tests whether the given aabox is visible in the Frustum.
bool isVisible (const core::vector3d &point)
 Tests whether the given point is visible in the Frustum.
void transform (const core::matrix4 &mat)
 ~Frustum ()

Protected Attributes

core::vector3d mCorners [8]
core::plane3d mPlanes [6]

Detailed Description

A frustum represents a pyramid, capped at the near and far end which is used to represent either a visible area or a projection area. Can be used for a number of applications.


Constructor & Destructor Documentation

render::Frustum::Frustum ( )
render::Frustum::~Frustum ( )

Member Function Documentation

void render::Frustum::buildViewFrustum ( const core::matrix4 projMat,
const core::matrix4 viewMat,
ProjectionType  projType,
f32  fov,
f32  aspect,
f32  near,
f32  far 
) [inline]
const core::vector3d * render::Frustum::getCorners ( )

References mCorners.

Referenced by render::RenderManager::render().

bool render::Frustum::isVisible ( const core::sphere3d sphere)

Tests whether the given sphere is visible in the Frustum.

References core::sphere3d::Center, mPlanes, and core::sphere3d::Radius.

bool render::Frustum::isVisible ( const core::vector3d point)

Tests whether the given point is visible in the Frustum.

References mPlanes.

Referenced by render::RenderManager::findVisibleRenderables().

bool render::Frustum::isVisible ( const core::aabox3d box)

Tests whether the given aabox is visible in the Frustum.

References core::aabox3d::getEdges(), and mPlanes.

void render::Frustum::transform ( const core::matrix4 mat) [inline]

transforms the frustum by the matrix

Parameters:
mat,:Matrix by which the view frustum is transformed.

References mPlanes, and core::matrix4::transformPlane().


Member Data Documentation

Referenced by buildViewFrustum(), and getCorners().


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

The KG Game Engine
The KG Game Engine Documentation © 2006-2011 by Kat'Oun. Generated on Sat Jul 2 2011 00:50:08 by Doxygen (1.7.4)