OGRE: Ogre::PlaneOptimalShadowCameraSetup Class Reference

| OGRE 14.5 Object-Oriented Graphics Rendering Engine

Loading...
Searching...
No Matches
Ogre::PlaneOptimalShadowCameraSetup Class Reference
Core » Scene

Implements the plane optimal shadow camera algorithm. More...

`#include <OgreShadowCameraSetupPlaneOptimal.h>`

Inheritance diagram for Ogre::PlaneOptimalShadowCameraSetup:
[legend]

## Public Member Functions
| PlaneOptimalShadowCameraSetup (const MovablePlane *plane)
virtual | ~PlaneOptimalShadowCameraSetup ()
void | getShadowCamera (const SceneManager *sm, const Camera *cam, const Viewport *vp, const Light *light, Camera *texCam, size_t iteration) const override
| Returns shadow camera configured to get 1-1 homography between screen and shadow map when restricted to plane.
Public Member Functions inherited from Ogre::ShadowCameraSetup
virtual | ~ShadowCameraSetup ()
| Need virtual destructor in case subclasses use it.

## Static Public Member Functions
static ShadowCameraSetupPtr | create (const MovablePlane *plane)
| Constructor – requires a plane of interest.

## Detailed Description

Implements the plane optimal shadow camera algorithm.

Given a plane of interest, it is possible to set up the shadow camera matrix such that the mapping between screen and shadow map is the identity (when restricted to pixels that view the plane of interest). Therefore, if the shadow map resolution matches the screen space resolution (of the seen planar receiver), we can get pixel perfect shadowing on the plane. Off the plane, the shadowing is not guaranteed to be perfect and will likely exhibit the usual sampling artifacts associated with shadow mapping.

Attention
  this routine requires double-precision calculations. When you are running under Direct3D, you must ensure that you set the floating point mode to 'Consistent' rather than 'Fastest' to ensure this precision. This does allegedly come with some performance cost but when measuring it appears to be negligible in modern systems for normal usage.

Note
  this projection also only works for lights with a finite position. Therefore you cannot use it for directional lights at this time.

## Constructor & Destructor Documentation

## ◆ PlaneOptimalShadowCameraSetup()

Ogre::PlaneOptimalShadowCameraSetup::PlaneOptimalShadowCameraSetup | ( | const MovablePlane * | plane | ) |

Deprecated
  use create()

## ◆ ~PlaneOptimalShadowCameraSetup()

virtual Ogre::PlaneOptimalShadowCameraSetup::~PlaneOptimalShadowCameraSetup | ( |  | ) |
| virtual

## Member Function Documentation

## ◆ create()

ShadowCameraSetupPtr Ogre::PlaneOptimalShadowCameraSetup::create | ( | const MovablePlane * | plane | ) |
| inlinestatic

Constructor – requires a plane of interest.

## ◆ getShadowCamera()

void Ogre::PlaneOptimalShadowCameraSetup::getShadowCamera | ( | const SceneManager * | sm,
|  | const Camera * | cam,
|  | const Viewport * | vp,
|  | const Light * | light,
|  | Camera * | texCam,
|  | size_t | iteration ) const
| overridevirtual

Returns shadow camera configured to get 1-1 homography between screen and shadow map when restricted to plane.

Implements Ogre::ShadowCameraSetup.

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

- OgreShadowCameraSetupPlaneOptimal.h