Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members |
#include <Frustum.h>
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::vector3d * | getCorners () |
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] |
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.
render::Frustum::Frustum | ( | ) |
render::Frustum::~Frustum | ( | ) |
void render::Frustum::buildViewFrustum | ( | const core::matrix4 & | projMat, |
const core::matrix4 & | viewMat, | ||
ProjectionType | projType, | ||
f32 | fov, | ||
f32 | aspect, | ||
f32 | near, | ||
f32 | far | ||
) | [inline] |
build the view frustum
References core::plane3d::D, render::FRUSTUM_PLANE_BOTTOM, render::FRUSTUM_PLANE_FAR, render::FRUSTUM_PLANE_LEFT, render::FRUSTUM_PLANE_NEAR, render::FRUSTUM_PLANE_RIGHT, render::FRUSTUM_PLANE_TOP, core::plane3d::getIntersectionWithPlanes(), mCorners, mPlanes, and core::plane3d::Normal.
Referenced by render::Camera::updateFrustum().
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
mat,: | Matrix by which the view frustum is transformed. |
References mPlanes, and core::matrix4::transformPlane().
core::vector3d render::Frustum::mCorners[8] [protected] |
Referenced by buildViewFrustum(), and getCorners().
core::plane3d render::Frustum::mPlanes[6] [protected] |
Referenced by buildViewFrustum(), isVisible(), and transform().
The KG Game Engine
Documentation © 2006-2011 by Kat'Oun. Generated on Sat Jul 2 2011 00:50:08 by
Doxygen
(1.7.4)
|