#include <OgreShadowCameraSetupLiSPSM.h>
Inheritance diagram for Ogre::LiSPSMShadowCameraSetup:
Public Member Functions | |
LiSPSMShadowCameraSetup (void) | |
Default constructor. | |
virtual | ~LiSPSMShadowCameraSetup (void) |
Default destructor. | |
virtual void | getShadowCamera (const SceneManager *sm, const Camera *cam, const Viewport *vp, const Light *light, Camera *texCam) const |
Returns a LiSPSM shadow camera. | |
virtual void | setOptimalAdjustFactor (Real n) |
Adjusts the parameter n to produce optimal shadows. | |
virtual Real | getOptimalAdjustFactor () const |
Get the parameter n used to produce optimal shadows. | |
virtual void | setUseSimpleOptimalAdjust (bool s) |
Sets whether or not to use a slightly simpler version of the camera near point derivation (default is true). | |
virtual bool | getUseSimpleOptimalAdjust () const |
Gets whether or not to use a slightly simpler version of the camera near point derivation (default is true). | |
void | setUseAggressiveFocusRegion (bool aggressive) |
Sets whether or not to use the more agressive approach to deciding on the focus region or not. | |
bool | getUseAggressiveFocusRegion () const |
Protected Member Functions | |
Matrix4 | calculateLiSPSM (const Matrix4 &lightSpace, const PointListBody &bodyB, const PointListBody &bodyLVS, const SceneManager &sm, const Camera &cam, const Light &light) const |
Calculates the LiSPSM projection matrix P. | |
Real | calculateNOpt (const Matrix4 &lightSpace, const AxisAlignedBox &bodyBABB_ls, const PointListBody &bodyLVS, const Camera &cam) const |
Calculates the distance between camera position and near clipping plane. | |
Real | calculateNOptSimple (const PointListBody &bodyLVS, const Camera &cam) const |
Calculates a simpler version than the one above. | |
Vector3 | calculateZ0_ls (const Matrix4 &lightSpace, const Vector3 &e, Real bodyB_zMax_ls, const Camera &cam) const |
Calculates the visible point on the near plane for the n_opt calculation. | |
Matrix4 | buildFrustumProjection (Real left, Real right, Real bottom, Real top, Real near, Real far) const |
Builds a frustum matrix. | |
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, 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 | |
Real | mOptAdjustFactor |
Warp factor adjustment. | |
bool | mUseSimpleNOpt |
Use simple nopt derivation? | |
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 |
More information can be found on the webpage of the TU Wien: http://www.cg.tuwien.ac.at/research/vr/lispsm/
Original implementation by Matthias Fink <matthias.fink@web.de>, 2006.
Definition at line 93 of file OgreShadowCameraSetupLiSPSM.h.
|
Default constructor.
|
|
Default destructor.
|
|
Builds a frustum matrix.
|
|
Builds a view matrix.
|
|
Calculates the intersection bodyB.
|
|
Calculates the LiSPSM projection matrix P.
|
|
Calculates the bodyLVS.
|
|
Calculates the distance between camera position and near clipping plane.
Parameters: d: distance between the near and the far clipping plane z0: located on the near clipping plane of the intersection body b z1: located on the far clipping plane with the same x/y values as z0
|
|
Calculates a simpler version than the one above.
|
|
Calculates the standard shadow mapping matrix.
|
|
Calculates the visible point on the near plane for the n_opt calculation.
|
|
Returns the projection view direction.
|
|
Returns a valid near-point seen by the camera.
|
|
Get the parameter n used to produce optimal shadows.
Definition at line 211 of file OgreShadowCameraSetupLiSPSM.h. |
|
Returns a LiSPSM shadow camera.
Reimplemented from Ogre::FocusedShadowCameraSetup. |
|
Definition at line 274 of file OgreShadowCameraSetupFocused.h. |
|
Gets whether or not to use a slightly simpler version of the camera near point derivation (default is true).
Definition at line 219 of file OgreShadowCameraSetupLiSPSM.h. |
|
Adjusts the parameter n to produce optimal shadows.
Definition at line 207 of file OgreShadowCameraSetupLiSPSM.h. |
|
Sets whether or not to use the more agressive approach to deciding on the focus region or not.
Definition at line 272 of file OgreShadowCameraSetupFocused.h. |
|
Sets whether or not to use a slightly simpler version of the camera near point derivation (default is true).
Definition at line 215 of file OgreShadowCameraSetupLiSPSM.h. |
|
Transforms a given body to the unit cube (-1,-1,-1) / (+1,+1,+1) with a specific shadow matrix enabled.
|
|
Definition at line 139 of file OgreShadowCameraSetupFocused.h. |
|
Temporary preallocated camera to set up a light frustum for clipping in ::calculateB.
Definition at line 72 of file OgreShadowCameraSetupFocused.h. |
|
Definition at line 73 of file OgreShadowCameraSetupFocused.h. |
|
Warp factor adjustment.
Definition at line 97 of file OgreShadowCameraSetupLiSPSM.h. |
|
Definition at line 140 of file OgreShadowCameraSetupFocused.h. |
|
Definition at line 141 of file OgreShadowCameraSetupFocused.h. |
|
Definition at line 63 of file OgreShadowCameraSetupFocused.h. |
|
Transform to or from light space as defined by Wimmer et al.
Definition at line 62 of file OgreShadowCameraSetupFocused.h. |
|
Temporary preallocated frustum to set up a projection matrix in ::calculateShadowMappingMatrix().
Definition at line 68 of file OgreShadowCameraSetupFocused.h. |
|
Use tighter focus region?
Definition at line 76 of file OgreShadowCameraSetupFocused.h. |
|
Use simple nopt derivation?
Definition at line 99 of file OgreShadowCameraSetupLiSPSM.h. |
Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun May 6 10:58:27 2007