\hypertarget{class_ogre_1_1_plane_optimal_shadow_camera_setup}{}\section{Ogre\+:\+:Plane\+Optimal\+Shadow\+Camera\+Setup Class Reference}
\label{class_ogre_1_1_plane_optimal_shadow_camera_setup}\index{Ogre\+::\+Plane\+Optimal\+Shadow\+Camera\+Setup@{Ogre\+::\+Plane\+Optimal\+Shadow\+Camera\+Setup}}


Implements the plane optimal shadow camera algorithm.  




{\ttfamily \#include $<$Ogre\+Shadow\+Camera\+Setup\+Plane\+Optimal.\+h$>$}



Inheritance diagram for Ogre\+:\+:Plane\+Optimal\+Shadow\+Camera\+Setup\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=230pt]{class_ogre_1_1_plane_optimal_shadow_camera_setup__inherit__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_ogre_1_1_plane_optimal_shadow_camera_setup_a84aeb5d693cf9235080fc84031ec881f}{Plane\+Optimal\+Shadow\+Camera\+Setup} (\hyperlink{class_ogre_1_1_movable_plane}{Movable\+Plane} $\ast$plane)
\begin{DoxyCompactList}\small\item\em Constructor -- requires a plane of interest. \end{DoxyCompactList}\item 
virtual \hyperlink{class_ogre_1_1_plane_optimal_shadow_camera_setup_a0fdd507e53ed2fecb42080c9c9fe85ec}{$\sim$\+Plane\+Optimal\+Shadow\+Camera\+Setup} ()
\begin{DoxyCompactList}\small\item\em Destructor. \end{DoxyCompactList}\item 
virtual void \hyperlink{class_ogre_1_1_plane_optimal_shadow_camera_setup_a31ef31471806bd9ddaf6d73696efc702}{get\+Shadow\+Camera} (const \hyperlink{class_ogre_1_1_scene_manager}{Scene\+Manager} $\ast$sm, const \hyperlink{class_ogre_1_1_camera}{Camera} $\ast$cam, const \hyperlink{class_ogre_1_1_viewport}{Viewport} $\ast$vp, const \hyperlink{class_ogre_1_1_light}{Light} $\ast$light, \hyperlink{class_ogre_1_1_camera}{Camera} $\ast$tex\+Cam, size\+\_\+t iteration) const
\begin{DoxyCompactList}\small\item\em Returns shadow camera configured to get 1-\/1 homography between screen and shadow map when restricted to plane. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Implements the plane optimal shadow camera algorithm. 

\begin{DoxyRemark}{Remarks}
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. 
\end{DoxyRemark}
\begin{DoxyNote}{Note}
Important\+: this routine requires double-\/precision calculations. When you are running under Direct3D, you must ensure that you set the floating point mode to \textquotesingle{}Consistent\textquotesingle{} rather than \textquotesingle{}Fastest\textquotesingle{} 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. 

Second important note\+: this projection also only works for lights with a finite position. Therefore you cannot use it for directional lights at this time. 
\end{DoxyNote}


\subsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{class_ogre_1_1_plane_optimal_shadow_camera_setup_a84aeb5d693cf9235080fc84031ec881f}\label{class_ogre_1_1_plane_optimal_shadow_camera_setup_a84aeb5d693cf9235080fc84031ec881f}} 
\index{Ogre\+::\+Plane\+Optimal\+Shadow\+Camera\+Setup@{Ogre\+::\+Plane\+Optimal\+Shadow\+Camera\+Setup}!Plane\+Optimal\+Shadow\+Camera\+Setup@{Plane\+Optimal\+Shadow\+Camera\+Setup}}
\index{Plane\+Optimal\+Shadow\+Camera\+Setup@{Plane\+Optimal\+Shadow\+Camera\+Setup}!Ogre\+::\+Plane\+Optimal\+Shadow\+Camera\+Setup@{Ogre\+::\+Plane\+Optimal\+Shadow\+Camera\+Setup}}
\subsubsection{\texorpdfstring{Plane\+Optimal\+Shadow\+Camera\+Setup()}{PlaneOptimalShadowCameraSetup()}}
{\footnotesize\ttfamily Ogre\+::\+Plane\+Optimal\+Shadow\+Camera\+Setup\+::\+Plane\+Optimal\+Shadow\+Camera\+Setup (\begin{DoxyParamCaption}\item[{\hyperlink{class_ogre_1_1_movable_plane}{Movable\+Plane} $\ast$}]{plane }\end{DoxyParamCaption})}



Constructor -- requires a plane of interest. 

\mbox{\Hypertarget{class_ogre_1_1_plane_optimal_shadow_camera_setup_a0fdd507e53ed2fecb42080c9c9fe85ec}\label{class_ogre_1_1_plane_optimal_shadow_camera_setup_a0fdd507e53ed2fecb42080c9c9fe85ec}} 
\index{Ogre\+::\+Plane\+Optimal\+Shadow\+Camera\+Setup@{Ogre\+::\+Plane\+Optimal\+Shadow\+Camera\+Setup}!````~Plane\+Optimal\+Shadow\+Camera\+Setup@{$\sim$\+Plane\+Optimal\+Shadow\+Camera\+Setup}}
\index{````~Plane\+Optimal\+Shadow\+Camera\+Setup@{$\sim$\+Plane\+Optimal\+Shadow\+Camera\+Setup}!Ogre\+::\+Plane\+Optimal\+Shadow\+Camera\+Setup@{Ogre\+::\+Plane\+Optimal\+Shadow\+Camera\+Setup}}
\subsubsection{\texorpdfstring{$\sim$\+Plane\+Optimal\+Shadow\+Camera\+Setup()}{~PlaneOptimalShadowCameraSetup()}}
{\footnotesize\ttfamily virtual Ogre\+::\+Plane\+Optimal\+Shadow\+Camera\+Setup\+::$\sim$\+Plane\+Optimal\+Shadow\+Camera\+Setup (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Destructor. 



\subsection{Member Function Documentation}
\mbox{\Hypertarget{class_ogre_1_1_plane_optimal_shadow_camera_setup_a31ef31471806bd9ddaf6d73696efc702}\label{class_ogre_1_1_plane_optimal_shadow_camera_setup_a31ef31471806bd9ddaf6d73696efc702}} 
\index{Ogre\+::\+Plane\+Optimal\+Shadow\+Camera\+Setup@{Ogre\+::\+Plane\+Optimal\+Shadow\+Camera\+Setup}!get\+Shadow\+Camera@{get\+Shadow\+Camera}}
\index{get\+Shadow\+Camera@{get\+Shadow\+Camera}!Ogre\+::\+Plane\+Optimal\+Shadow\+Camera\+Setup@{Ogre\+::\+Plane\+Optimal\+Shadow\+Camera\+Setup}}
\subsubsection{\texorpdfstring{get\+Shadow\+Camera()}{getShadowCamera()}}
{\footnotesize\ttfamily virtual void Ogre\+::\+Plane\+Optimal\+Shadow\+Camera\+Setup\+::get\+Shadow\+Camera (\begin{DoxyParamCaption}\item[{const \hyperlink{class_ogre_1_1_scene_manager}{Scene\+Manager} $\ast$}]{sm,  }\item[{const \hyperlink{class_ogre_1_1_camera}{Camera} $\ast$}]{cam,  }\item[{const \hyperlink{class_ogre_1_1_viewport}{Viewport} $\ast$}]{vp,  }\item[{const \hyperlink{class_ogre_1_1_light}{Light} $\ast$}]{light,  }\item[{\hyperlink{class_ogre_1_1_camera}{Camera} $\ast$}]{tex\+Cam,  }\item[{size\+\_\+t}]{iteration }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [virtual]}}



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



Implements \hyperlink{class_ogre_1_1_shadow_camera_setup_aef69374906ff048997e187101858f856}{Ogre\+::\+Shadow\+Camera\+Setup}.



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
\hyperlink{_ogre_shadow_camera_setup_plane_optimal_8h}{Ogre\+Shadow\+Camera\+Setup\+Plane\+Optimal.\+h}\end{DoxyCompactItemize}
