\hypertarget{class_ogre_1_1_shadow_camera_setup}{}\doxysection{Ogre\+::Shadow\+Camera\+Setup Class Reference}
\label{class_ogre_1_1_shadow_camera_setup}\index{Ogre::ShadowCameraSetup@{Ogre::ShadowCameraSetup}}


This class allows you to plug in new ways to define the camera setup when rendering and projecting shadow textures.  




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



Inheritance diagram for Ogre\+::Shadow\+Camera\+Setup\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{class_ogre_1_1_shadow_camera_setup__inherit__graph}
\end{center}
\end{figure}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual \mbox{\hyperlink{class_ogre_1_1_shadow_camera_setup_a790a06721a8e3c6f48218aa659c334ef}{$\sim$\+Shadow\+Camera\+Setup}} ()
\begin{DoxyCompactList}\small\item\em Need virtual destructor in case subclasses use it. \end{DoxyCompactList}\item 
virtual void \mbox{\hyperlink{class_ogre_1_1_shadow_camera_setup_aef69374906ff048997e187101858f856}{get\+Shadow\+Camera}} (const \mbox{\hyperlink{class_ogre_1_1_scene_manager}{Scene\+Manager}} $\ast$sm, const \mbox{\hyperlink{class_ogre_1_1_camera}{Camera}} $\ast$cam, const \mbox{\hyperlink{class_ogre_1_1_viewport}{Viewport}} $\ast$vp, const \mbox{\hyperlink{class_ogre_1_1_light}{Light}} $\ast$light, \mbox{\hyperlink{class_ogre_1_1_camera}{Camera}} $\ast$tex\+Cam, size\+\_\+t iteration) const =0
\begin{DoxyCompactList}\small\item\em Function to implement -- must set the shadow camera properties. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
This class allows you to plug in new ways to define the camera setup when rendering and projecting shadow textures. 

\begin{DoxyRemark}{Remarks}
The default projection used when rendering shadow textures is a uniform frustum. This is pretty straight forward but doesn\textquotesingle{}t make the best use of the space in the shadow map since texels closer to the camera will be larger, resulting in \textquotesingle{}jaggies\textquotesingle{}. There are several ways to distribute the texels in the shadow texture differently, and this class allows you to override that. 
\end{DoxyRemark}
\begin{DoxyParagraph}{}
\mbox{\hyperlink{namespace_ogre}{Ogre}} is provided with several alternative shadow camera setups, including Li\+S\+P\+SM (\mbox{\hyperlink{class_ogre_1_1_li_s_p_s_m_shadow_camera_setup}{Li\+S\+P\+S\+M\+Shadow\+Camera\+Setup}}) and \mbox{\hyperlink{class_ogre_1_1_plane}{Plane}} Optimal (\mbox{\hyperlink{class_ogre_1_1_plane_optimal_shadow_camera_setup}{Plane\+Optimal\+Shadow\+Camera\+Setup}}). Others can of course be written to incorporate other algorithms. All you have to do is instantiate one of these classes and enable it using \mbox{\hyperlink{class_ogre_1_1_scene_manager_acd2de135b378c048c4c4a2dff4c73ac8}{Scene\+Manager\+::set\+Shadow\+Camera\+Setup}} (global) or \mbox{\hyperlink{class_ogre_1_1_light_a4a6f664fade2ac14d1ed5910b0d1a21a}{Light\+::set\+Custom\+Shadow\+Camera\+Setup}} (per light). In both cases the instance is wrapped in a \mbox{\hyperlink{class_ogre_1_1_shared_ptr}{Shared\+Ptr}} which means it will be deleted automatically when no more references to it exist. 
\end{DoxyParagraph}
\begin{DoxyNote}{Note}
Shadow map matrices, being projective matrices, have 15 degrees of freedom. 3 of these degrees of freedom are fixed by the light\textquotesingle{}s position. 4 are used to affinely affect z values. 6 affinely affect u,v sampling. 2 are projective degrees of freedom. This class is meant to allow custom methods for handling optimization. 
\end{DoxyNote}


\doxysubsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{class_ogre_1_1_shadow_camera_setup_a790a06721a8e3c6f48218aa659c334ef}\label{class_ogre_1_1_shadow_camera_setup_a790a06721a8e3c6f48218aa659c334ef}} 
\index{Ogre::ShadowCameraSetup@{Ogre::ShadowCameraSetup}!````~ShadowCameraSetup@{$\sim$ShadowCameraSetup}}
\index{````~ShadowCameraSetup@{$\sim$ShadowCameraSetup}!Ogre::ShadowCameraSetup@{Ogre::ShadowCameraSetup}}
\doxysubsubsection{\texorpdfstring{$\sim$ShadowCameraSetup()}{~ShadowCameraSetup()}}
{\footnotesize\ttfamily virtual Ogre\+::\+Shadow\+Camera\+Setup\+::$\sim$\+Shadow\+Camera\+Setup (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



Need virtual destructor in case subclasses use it. 



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



Function to implement -- must set the shadow camera properties. 



Implemented in \mbox{\hyperlink{class_ogre_1_1_focused_shadow_camera_setup_a0a935957315291c4dba7abf7eaa4f109}{Ogre\+::\+Focused\+Shadow\+Camera\+Setup}}, \mbox{\hyperlink{class_ogre_1_1_li_s_p_s_m_shadow_camera_setup_aa19c6563c41297f7e14e8918dd89b074}{Ogre\+::\+Li\+S\+P\+S\+M\+Shadow\+Camera\+Setup}}, \mbox{\hyperlink{class_ogre_1_1_default_shadow_camera_setup_a4745c9209940b75a564f0b6476bb7237}{Ogre\+::\+Default\+Shadow\+Camera\+Setup}}, \mbox{\hyperlink{class_ogre_1_1_plane_optimal_shadow_camera_setup_a31ef31471806bd9ddaf6d73696efc702}{Ogre\+::\+Plane\+Optimal\+Shadow\+Camera\+Setup}}, and \mbox{\hyperlink{class_ogre_1_1_p_s_s_m_shadow_camera_setup_a0503ea13df793d0f8d83a30211281321}{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}}.



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