Implements the uniform shadow mapping algorithm in focused mode.
More...
#include <OgreShadowCameraSetupFocused.h>
|
| FocusedShadowCameraSetup (void) |
| Default constructor. More...
|
|
virtual | ~FocusedShadowCameraSetup (void) |
| Default destructor. More...
|
|
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. More...
|
|
bool | getUseAggressiveFocusRegion () const |
|
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 *) |
|
void * | operator new (size_t sz, const char *file, int line, const char *func) |
| operator new, with debug line info More...
|
|
void * | operator new (size_t sz) |
|
void * | operator new (size_t sz, void *ptr) |
| placement operator new More...
|
|
void * | operator new[] (size_t sz, const char *file, int line, const char *func) |
| array operator new, with debug line info More...
|
|
void * | operator new[] (size_t sz) |
|
void | setUseAggressiveFocusRegion (bool aggressive) |
| Sets whether or not to use the more aggressive approach to deciding on the focus region or not. More...
|
|
|
Matrix4 | buildViewMatrix (const Vector3 &pos, const Vector3 &dir, const Vector3 &up) const |
| Builds a view matrix. More...
|
|
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. More...
|
|
void | calculateLVS (const SceneManager &sm, const Camera &cam, const Light &light, const AxisAlignedBox &sceneBB, PointListBody *out_LVS) const |
| Calculates the bodyLVS. More...
|
|
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. More...
|
|
Vector3 | getLSProjViewDir (const Matrix4 &lightSpace, const Camera &cam, const PointListBody &bodyLVS) const |
| Returns the projection view direction. More...
|
|
Vector3 | getNearCameraPoint_ws (const Matrix4 &viewMatrix, const PointListBody &bodyLVS) const |
| Returns a valid near-point seen by the camera. More...
|
|
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. More...
|
|
Implements the uniform shadow mapping algorithm in focused mode.
- Note
- Original implementation by Matthias Fink matth.nosp@m.ias..nosp@m.fink@.nosp@m.web..nosp@m.de, 2006.
Definition at line 58 of file OgreShadowCameraSetupFocused.h.
Ogre::FocusedShadowCameraSetup::FocusedShadowCameraSetup |
( |
void |
| ) |
|
virtual Ogre::FocusedShadowCameraSetup::~FocusedShadowCameraSetup |
( |
void |
| ) |
|
|
virtual |
Calculates the intersection bodyB.
- Parameters
-
sm | Scene manager. |
cam | Currently active camera. |
light | Currently active light. |
sceneBB | Scene bounding box for clipping operations. |
receiverBB | Bounding information for just the receivers. |
out_bodyB | Final intersection bodyB point list. |
Calculates the bodyLVS.
- Parameters
-
cam | Current viewer camera. |
light | Current light. |
sceneBB | Holds all potential occluders / receivers as one single bounding box of the currently active scene node. |
out_LVS | Intersection body LVS (world coordinates). |
Calculates the standard shadow mapping matrix.
- Note
- You can choose which things you want to have: view matrix and/or projection matrix and/or shadow camera. Passing a NULL value as parameter ignores the generation of this specific value.
- Parameters
-
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 ). |
Returns the projection view direction.
- Parameters
-
lightSpace | Matrix of the light space transformation. |
cam | Current viewer camera. |
bodyLVS | Intersection body LVS (relevant space in front of the camera). |
Returns a valid near-point seen by the camera.
- Parameters
-
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 |
bool Ogre::FocusedShadowCameraSetup::getUseAggressiveFocusRegion |
( |
| ) |
const |
|
inline |
template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new |
( |
size_t |
sz, |
|
|
const char * |
file, |
|
|
int |
line, |
|
|
const char * |
func |
|
) |
| |
|
inlineinherited |
template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new[] |
( |
size_t |
sz, |
|
|
const char * |
file, |
|
|
int |
line, |
|
|
const char * |
func |
|
) |
| |
|
inlineinherited |
void Ogre::FocusedShadowCameraSetup::setUseAggressiveFocusRegion |
( |
bool |
aggressive | ) |
|
|
inline |
Sets whether or not to use the more aggressive approach to deciding on the focus region or not.
- Note
- There are 2 approaches that can be used to define the focus region, the more aggressive way introduced by Wimmer et al, or the original way as described in Stamminger et al. Wimmer et al's way tends to come up with a tighter focus region but in rare cases (mostly highly glancing angles) can cause some shadow casters to be clipped incorrectly. By default the more aggressive approach is used since it leads to significantly better results in most cases, but if you experience clipping issues, you can use the less aggressive version.
- Parameters
-
aggressive | True to use the more aggressive approach, false otherwise. |
Definition at line 303 of file OgreShadowCameraSetupFocused.h.
Transforms a given body to the unit cube (-1,-1,-1) / (+1,+1,+1) with a specific shadow matrix enabled.
- Parameters
-
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. |
Camera* Ogre::FocusedShadowCameraSetup::mLightFrustumCamera |
|
protected |
bool Ogre::FocusedShadowCameraSetup::mLightFrustumCameraCalculated |
|
mutableprotected |
const Matrix4 Ogre::FocusedShadowCameraSetup::msLightSpaceToNormal |
|
staticprotected |
const Matrix4 Ogre::FocusedShadowCameraSetup::msNormalToLightSpace |
|
staticprotected |
Frustum* Ogre::FocusedShadowCameraSetup::mTempFrustum |
|
protected |
bool Ogre::FocusedShadowCameraSetup::mUseAggressiveRegion |
|
protected |
The documentation for this class was generated from the following file: