Implements the uniform shadow mapping algorithm in focused mode. More...
#include <OgreShadowCameraSetupFocused.h>

Classes | |
| class | PointListBody |
| Internal class holding a point list representation of a convex body. More... | |
Public Member Functions | |
| FocusedShadowCameraSetup (void) | |
| Default constructor. | |
| virtual | ~FocusedShadowCameraSetup (void) |
| Default destructor. | |
| virtual void | getShadowCamera (const SceneManager *sm, const Camera *cam, const Viewport *vp, const Light *light, Camera *texCam, size_t iteration) const |
| Returns a uniform shadow camera with a focused view. | |
| void | setUseAggressiveFocusRegion (bool aggressive) |
| Sets whether or not to use the more aggressive approach to deciding on the focus region or not. | |
| bool | getUseAggressiveFocusRegion () const |
| void * | operator new (size_t sz, const char *file, int line, const char *func) |
| operator new, with debug line info | |
| void * | operator new (size_t sz) |
| void * | operator new (size_t sz, void *ptr) |
| placement operator new | |
| void * | operator new[] (size_t sz, const char *file, int line, const char *func) |
| array operator new, with debug line info | |
| void * | operator new[] (size_t sz) |
| void | operator delete (void *ptr) |
| void | operator delete (void *ptr, void *) |
| void | operator delete (void *ptr, const char *, int, const char *) |
| void | operator delete[] (void *ptr) |
| void | operator delete[] (void *ptr, const char *, int, const char *) |
Protected Member Functions | |
| void | calculateShadowMappingMatrix (const SceneManager &sm, const Camera &cam, const Light &light, Matrix4 *out_view, Matrix4 *out_proj, Camera *out_cam) const |
| Calculates the standard shadow mapping matrix. | |
| void | calculateB (const SceneManager &sm, const Camera &cam, const Light &light, const AxisAlignedBox &sceneBB, const AxisAlignedBox &receiverBB, PointListBody *out_bodyB) const |
| Calculates the intersection bodyB. | |
| void | calculateLVS (const SceneManager &sm, const Camera &cam, const Light &light, const AxisAlignedBox &sceneBB, PointListBody *out_LVS) const |
| Calculates the bodyLVS. | |
| Vector3 | getLSProjViewDir (const Matrix4 &lightSpace, const Camera &cam, const PointListBody &bodyLVS) const |
| Returns the projection view direction. | |
| Vector3 | getNearCameraPoint_ws (const Matrix4 &viewMatrix, const PointListBody &bodyLVS) const |
| Returns a valid near-point seen by the camera. | |
| Matrix4 | transformToUnitCube (const Matrix4 &m, const PointListBody &body) const |
| Transforms a given body to the unit cube (-1,-1,-1) / (+1,+1,+1) with a specific shadow matrix enabled. | |
| Matrix4 | buildViewMatrix (const Vector3 &pos, const Vector3 &dir, const Vector3 &up) const |
| Builds a view matrix. | |
Protected Attributes | |
| Frustum * | mTempFrustum |
| Temporary preallocated frustum to set up a projection matrix in ::calculateShadowMappingMatrix() | |
| Camera * | mLightFrustumCamera |
| Temporary preallocated camera to set up a light frustum for clipping in ::calculateB. | |
| bool | mLightFrustumCameraCalculated |
| bool | mUseAggressiveRegion |
| Use tighter focus region? | |
| ConvexBody | mBodyB |
| PointListBody | mPointListBodyB |
| PointListBody | mPointListBodyLVS |
Static Protected Attributes | |
| static const Matrix4 | msNormalToLightSpace |
| Transform to or from light space as defined by Wimmer et al. | |
| static const Matrix4 | msLightSpaceToNormal |
Implements the uniform shadow mapping algorithm in focused mode.
Definition at line 57 of file OgreShadowCameraSetupFocused.h.
Default constructor.
| virtual Ogre::FocusedShadowCameraSetup::~FocusedShadowCameraSetup | ( | void | ) | [virtual] |
Default destructor.
| Matrix4 Ogre::FocusedShadowCameraSetup::buildViewMatrix | ( | const Vector3 & | pos, |
| const Vector3 & | dir, | ||
| const Vector3 & | up | ||
| ) | const [protected] |
Builds a view matrix.
| void Ogre::FocusedShadowCameraSetup::calculateB | ( | const SceneManager & | sm, |
| const Camera & | cam, | ||
| const Light & | light, | ||
| const AxisAlignedBox & | sceneBB, | ||
| const AxisAlignedBox & | receiverBB, | ||
| PointListBody * | out_bodyB | ||
| ) | const [protected] |
Calculates the intersection bodyB.
| sm,: | scene manager |
| cam,: | currently active camera |
| light,: | currently active light |
| sceneBB,: | scene bounding box for clipping operations |
| receiverAABB,: | bounding information for just the receivers |
| out_bodyB,: | final intersection bodyB point list |
| void Ogre::FocusedShadowCameraSetup::calculateLVS | ( | const SceneManager & | sm, |
| const Camera & | cam, | ||
| const Light & | light, | ||
| const AxisAlignedBox & | sceneBB, | ||
| PointListBody * | out_LVS | ||
| ) | const [protected] |
Calculates the bodyLVS.
| scene,: | holds all potential occluders / receivers as one single bounding box of the currently active scene node |
| cam,: | current viewer camera |
| light,: | current light |
| out_LVS,: | intersection body LVS (world coordinates) |
| void Ogre::FocusedShadowCameraSetup::calculateShadowMappingMatrix | ( | const SceneManager & | sm, |
| const Camera & | cam, | ||
| const Light & | light, | ||
| Matrix4 * | out_view, | ||
| Matrix4 * | out_proj, | ||
| Camera * | out_cam | ||
| ) | const [protected] |
Calculates the standard shadow mapping matrix.
| sm,: | scene manager |
| cam,: | currently active camera |
| light,: | currently active light |
| out_view,: | calculated uniform view shadow mapping matrix (may be NULL) |
| out_proj,: | calculated uniform projection shadow mapping matrix (may be NULL) |
| out_cam,: | calculated uniform shadow camera (may be NULL) |
| Vector3 Ogre::FocusedShadowCameraSetup::getLSProjViewDir | ( | const Matrix4 & | lightSpace, |
| const Camera & | cam, | ||
| const PointListBody & | bodyLVS | ||
| ) | const [protected] |
Returns the projection view direction.
| lightSpace,: | matrix of the light space transformation |
| cam,: | current viewer camera |
| bodyLVS,: | intersection body LVS (relevant space in front of the camera) |
| Vector3 Ogre::FocusedShadowCameraSetup::getNearCameraPoint_ws | ( | const Matrix4 & | viewMatrix, |
| const PointListBody & | bodyLVS | ||
| ) | const [protected] |
Returns a valid near-point seen by the camera.
| viewMatrix,: | view matrix of the current camera |
| bodyLVS,: | intersection body LVS (relevant space in front of the camera) |
| virtual void Ogre::FocusedShadowCameraSetup::getShadowCamera | ( | const SceneManager * | sm, |
| const Camera * | cam, | ||
| const Viewport * | vp, | ||
| const Light * | light, | ||
| Camera * | texCam, | ||
| size_t | iteration | ||
| ) | const [virtual] |
Returns a uniform shadow camera with a focused view.
Implements Ogre::ShadowCameraSetup.
Reimplemented in Ogre::LiSPSMShadowCameraSetup, and Ogre::PSSMShadowCameraSetup.
| bool Ogre::FocusedShadowCameraSetup::getUseAggressiveFocusRegion | ( | ) | const |
Definition at line 280 of file OgreShadowCameraSetupFocused.h.
| void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr | ) | [inherited] |
Definition at line 95 of file OgreMemoryAllocatedObject.h.
| void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr, |
| void * | |||
| ) | [inherited] |
Definition at line 101 of file OgreMemoryAllocatedObject.h.
| void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr, |
| const char * | , | ||
| int | , | ||
| const char * | |||
| ) | [inherited] |
Definition at line 107 of file OgreMemoryAllocatedObject.h.
| void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr | ) | [inherited] |
Definition at line 112 of file OgreMemoryAllocatedObject.h.
| void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr, |
| const char * | , | ||
| int | , | ||
| const char * | |||
| ) | [inherited] |
Definition at line 118 of file OgreMemoryAllocatedObject.h.
| void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz, |
| const char * | file, | ||
| int | line, | ||
| const char * | func | ||
| ) | [inherited] |
operator new, with debug line info
Definition at line 67 of file OgreMemoryAllocatedObject.h.
| void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz | ) | [inherited] |
Definition at line 72 of file OgreMemoryAllocatedObject.h.
| void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz, |
| void * | ptr | ||
| ) | [inherited] |
placement operator new
Definition at line 78 of file OgreMemoryAllocatedObject.h.
| void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz, |
| const char * | file, | ||
| int | line, | ||
| const char * | func | ||
| ) | [inherited] |
array operator new, with debug line info
Definition at line 85 of file OgreMemoryAllocatedObject.h.
| void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz | ) | [inherited] |
Definition at line 90 of file OgreMemoryAllocatedObject.h.
| void Ogre::FocusedShadowCameraSetup::setUseAggressiveFocusRegion | ( | bool | aggressive | ) |
Sets whether or not to use the more aggressive approach to deciding on the focus region or not.
| aggressive | True to use the more aggressive approach, false otherwise. |
Definition at line 278 of file OgreShadowCameraSetupFocused.h.
| Matrix4 Ogre::FocusedShadowCameraSetup::transformToUnitCube | ( | const Matrix4 & | m, |
| const PointListBody & | body | ||
| ) | const [protected] |
Transforms a given body to the unit cube (-1,-1,-1) / (+1,+1,+1) with a specific shadow matrix enabled.
| m,: | transformation matrix applied on the point list body |
| body,: | contains the points of the extends of all valid scene elements which are mapped to the unit cube |
ConvexBody Ogre::FocusedShadowCameraSetup::mBodyB [mutable, protected] |
Definition at line 144 of file OgreShadowCameraSetupFocused.h.
Temporary preallocated camera to set up a light frustum for clipping in ::calculateB.
Definition at line 77 of file OgreShadowCameraSetupFocused.h.
bool Ogre::FocusedShadowCameraSetup::mLightFrustumCameraCalculated [mutable, protected] |
Definition at line 78 of file OgreShadowCameraSetupFocused.h.
PointListBody Ogre::FocusedShadowCameraSetup::mPointListBodyB [mutable, protected] |
Definition at line 145 of file OgreShadowCameraSetupFocused.h.
PointListBody Ogre::FocusedShadowCameraSetup::mPointListBodyLVS [mutable, protected] |
Definition at line 146 of file OgreShadowCameraSetupFocused.h.
const Matrix4 Ogre::FocusedShadowCameraSetup::msLightSpaceToNormal [static, protected] |
Definition at line 68 of file OgreShadowCameraSetupFocused.h.
const Matrix4 Ogre::FocusedShadowCameraSetup::msNormalToLightSpace [static, protected] |
Transform to or from light space as defined by Wimmer et al.
Definition at line 67 of file OgreShadowCameraSetupFocused.h.
Frustum* Ogre::FocusedShadowCameraSetup::mTempFrustum [protected] |
Temporary preallocated frustum to set up a projection matrix in ::calculateShadowMappingMatrix()
Definition at line 73 of file OgreShadowCameraSetupFocused.h.
bool Ogre::FocusedShadowCameraSetup::mUseAggressiveRegion [protected] |
Use tighter focus region?
Definition at line 81 of file OgreShadowCameraSetupFocused.h.
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Sun Sep 2 2012 07:27:39