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


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}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual \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 \hyperlink{class_ogre_1_1_shadow_camera_setup_aef69374906ff048997e187101858f856}{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 =0
\begin{DoxyCompactList}\small\item\em Function to implement -- must set the shadow camera properties. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{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}{}
\hyperlink{namespace_ogre}{Ogre} is provided with several alternative shadow camera setups, including Li\+S\+P\+SM (\hyperlink{class_ogre_1_1_li_s_p_s_m_shadow_camera_setup}{Li\+S\+P\+S\+M\+Shadow\+Camera\+Setup}) and \hyperlink{class_ogre_1_1_plane}{Plane} Optimal (\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 \hyperlink{class_ogre_1_1_scene_manager_acd2de135b378c048c4c4a2dff4c73ac8}{Scene\+Manager\+::set\+Shadow\+Camera\+Setup} (global) or \hyperlink{class_ogre_1_1_light_a4a6f664fade2ac14d1ed5910b0d1a21a}{Light\+::set\+Custom\+Shadow\+Camera\+Setup} (per light). In both cases the instance is wrapped in a \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}


\subsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{class_ogre_1_1_shadow_camera_setup_a790a06721a8e3c6f48218aa659c334ef}\label{class_ogre_1_1_shadow_camera_setup_a790a06721a8e3c6f48218aa659c334ef}} 
\index{Ogre\+::\+Shadow\+Camera\+Setup@{Ogre\+::\+Shadow\+Camera\+Setup}!````~Shadow\+Camera\+Setup@{$\sim$\+Shadow\+Camera\+Setup}}
\index{````~Shadow\+Camera\+Setup@{$\sim$\+Shadow\+Camera\+Setup}!Ogre\+::\+Shadow\+Camera\+Setup@{Ogre\+::\+Shadow\+Camera\+Setup}}
\subsubsection{\texorpdfstring{$\sim$\+Shadow\+Camera\+Setup()}{~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. 



\subsection{Member Function Documentation}
\mbox{\Hypertarget{class_ogre_1_1_shadow_camera_setup_aef69374906ff048997e187101858f856}\label{class_ogre_1_1_shadow_camera_setup_aef69374906ff048997e187101858f856}} 
\index{Ogre\+::\+Shadow\+Camera\+Setup@{Ogre\+::\+Shadow\+Camera\+Setup}!get\+Shadow\+Camera@{get\+Shadow\+Camera}}
\index{get\+Shadow\+Camera@{get\+Shadow\+Camera}!Ogre\+::\+Shadow\+Camera\+Setup@{Ogre\+::\+Shadow\+Camera\+Setup}}
\subsubsection{\texorpdfstring{get\+Shadow\+Camera()}{getShadowCamera()}}
{\footnotesize\ttfamily virtual void Ogre\+::\+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 [pure virtual]}}



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



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



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