\hypertarget{class_ogre_1_1_p_s_s_m_shadow_camera_setup}{}\section{Ogre\+:\+:P\+S\+S\+M\+Shadow\+Camera\+Setup Class Reference}
\label{class_ogre_1_1_p_s_s_m_shadow_camera_setup}\index{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup@{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}}


Parallel Split Shadow Map (P\+S\+SM) shadow camera setup.  




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



Inheritance diagram for Ogre\+:\+:P\+S\+S\+M\+Shadow\+Camera\+Setup\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=256pt]{class_ogre_1_1_p_s_s_m_shadow_camera_setup__inherit__graph}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
typedef std\+::vector$<$ \hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} $>$ \hyperlink{class_ogre_1_1_p_s_s_m_shadow_camera_setup_aa419507f8dc7e7824ad9cf7c691f01ae}{Optimal\+Adjust\+Factor\+List}
\item 
typedef std\+::vector$<$ \hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} $>$ \hyperlink{class_ogre_1_1_p_s_s_m_shadow_camera_setup_a8883a70f9fd1d0ed31bab5ce82f62b02}{Split\+Point\+List}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_ogre_1_1_p_s_s_m_shadow_camera_setup_ad19943dab4695c37674eedcd574a4844}{P\+S\+S\+M\+Shadow\+Camera\+Setup} ()
\begin{DoxyCompactList}\small\item\em Constructor, defaults to 3 splits. \end{DoxyCompactList}\item 
virtual \hyperlink{class_ogre_1_1_p_s_s_m_shadow_camera_setup_aea92d3872f6f0f8bbab04eb8f0474fa2}{$\sim$\+P\+S\+S\+M\+Shadow\+Camera\+Setup} ()
\item 
void \hyperlink{class_ogre_1_1_p_s_s_m_shadow_camera_setup_a3ad4827d62664b3aebcd4880c1dc2965}{calculate\+Split\+Points} (\hyperlink{namespace_ogre_ab6e842a18caf062ed73a5d3badd0dd4c}{uint} split\+Count, \hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} near\+Dist, \hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} far\+Dist, \hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} lambda=0.\+95)
\begin{DoxyCompactList}\small\item\em Calculate a new splitting scheme. \end{DoxyCompactList}\item 
virtual \hyperlink{class_ogre_1_1_degree}{Degree} \hyperlink{class_ogre_1_1_li_s_p_s_m_shadow_camera_setup_abddaf4baa243cbda0e8a2bd43f3058f0}{get\+Camera\+Light\+Direction\+Threshold} () const
\begin{DoxyCompactList}\small\item\em Sets the threshold between the camera and the light direction below which the Li\+S\+P\+SM projection is \textquotesingle{}flattened\textquotesingle{}, since coincident light and camera projections cause problems with the perspective skew. \end{DoxyCompactList}\item 
\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} \hyperlink{class_ogre_1_1_p_s_s_m_shadow_camera_setup_a877af39ed94e377764bd4080e3c1a356}{get\+Optimal\+Adjust\+Factor} (size\+\_\+t split\+Index) const
\begin{DoxyCompactList}\small\item\em Returns the optimal adjust factor for a given split. \end{DoxyCompactList}\item 
\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} \hyperlink{class_ogre_1_1_p_s_s_m_shadow_camera_setup_a6daefce1b9f1d6e0d03b777545ea6e0a}{get\+Optimal\+Adjust\+Factor} () const
\begin{DoxyCompactList}\small\item\em Overridden, recommended internal use only since depends on current iteration. \end{DoxyCompactList}\item 
virtual void \hyperlink{class_ogre_1_1_p_s_s_m_shadow_camera_setup_a0503ea13df793d0f8d83a30211281321}{get\+Shadow\+Camera} (const \hyperlink{class_ogre_1_1_scene_manager}{Ogre\+::\+Scene\+Manager} $\ast$sm, const \hyperlink{class_ogre_1_1_camera}{Ogre\+::\+Camera} $\ast$cam, const \hyperlink{class_ogre_1_1_viewport}{Ogre\+::\+Viewport} $\ast$vp, const \hyperlink{class_ogre_1_1_light}{Ogre\+::\+Light} $\ast$light, \hyperlink{class_ogre_1_1_camera}{Ogre\+::\+Camera} $\ast$tex\+Cam, size\+\_\+t iteration) const
\begin{DoxyCompactList}\small\item\em Returns a Li\+S\+P\+SM shadow camera with P\+S\+SM splits base on iteration. \end{DoxyCompactList}\item 
\hyperlink{namespace_ogre_ab6e842a18caf062ed73a5d3badd0dd4c}{uint} \hyperlink{class_ogre_1_1_p_s_s_m_shadow_camera_setup_adb420010a1fb38c2effabc47ff37b3f5}{get\+Split\+Count} () const
\begin{DoxyCompactList}\small\item\em Get the number of splits. \end{DoxyCompactList}\item 
\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} \hyperlink{class_ogre_1_1_p_s_s_m_shadow_camera_setup_ab7ad77ca1e745f28838c52078ed61300}{get\+Split\+Padding} () const
\begin{DoxyCompactList}\small\item\em Get the padding factor to apply to the near \& far distances when matching up splits to one another, to avoid \textquotesingle{}cracks\textquotesingle{}. \end{DoxyCompactList}\item 
const \hyperlink{class_ogre_1_1_p_s_s_m_shadow_camera_setup_a8883a70f9fd1d0ed31bab5ce82f62b02}{Split\+Point\+List} \& \hyperlink{class_ogre_1_1_p_s_s_m_shadow_camera_setup_a0c7b1857797ded8fd25277b3570004aa}{get\+Split\+Points} () const
\begin{DoxyCompactList}\small\item\em Returns the calculated split points. \end{DoxyCompactList}\item 
bool \hyperlink{class_ogre_1_1_focused_shadow_camera_setup_ad28464a9e78991c046b70f2d6c95a753}{get\+Use\+Aggressive\+Focus\+Region} () const
\item 
virtual bool \hyperlink{class_ogre_1_1_li_s_p_s_m_shadow_camera_setup_ad836bab9853f49b42a2fe9f2aab786b1}{get\+Use\+Simple\+Optimal\+Adjust} () const
\begin{DoxyCompactList}\small\item\em Gets whether or not to use a slightly simpler version of the camera near point derivation (default is true) \end{DoxyCompactList}\item 
virtual void \hyperlink{class_ogre_1_1_li_s_p_s_m_shadow_camera_setup_a2a6fb5e0335458e5c626740bfcbfc56c}{set\+Camera\+Light\+Direction\+Threshold} (\hyperlink{class_ogre_1_1_degree}{Degree} angle)
\begin{DoxyCompactList}\small\item\em Sets the threshold between the camera and the light direction below which the Li\+S\+P\+SM projection is \textquotesingle{}flattened\textquotesingle{}, since coincident light and camera projections cause problems with the perspective skew. \end{DoxyCompactList}\item 
void \hyperlink{class_ogre_1_1_p_s_s_m_shadow_camera_setup_a4f16797f8c4fcee30141e5dd0690e647}{set\+Optimal\+Adjust\+Factor} (size\+\_\+t split\+Index, \hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} factor)
\begin{DoxyCompactList}\small\item\em Set the Li\+S\+P\+SM optimal adjust factor for a given split (call after configuring splits). \end{DoxyCompactList}\item 
virtual void \hyperlink{class_ogre_1_1_li_s_p_s_m_shadow_camera_setup_aa4f0c58ca0ea89aa7e4b11def4976ea6}{set\+Optimal\+Adjust\+Factor} (\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} n)
\begin{DoxyCompactList}\small\item\em Adjusts the parameter n to produce optimal shadows. \end{DoxyCompactList}\item 
void \hyperlink{class_ogre_1_1_p_s_s_m_shadow_camera_setup_a5000b20f43bea556bcdd994550f1f0ab}{set\+Split\+Padding} (\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} pad)
\begin{DoxyCompactList}\small\item\em Set the padding factor to apply to the near \& far distances when matching up splits to one another, to avoid \textquotesingle{}cracks\textquotesingle{}. \end{DoxyCompactList}\item 
void \hyperlink{class_ogre_1_1_p_s_s_m_shadow_camera_setup_ab136d90731500be66640d339c04a2218}{set\+Split\+Points} (const \hyperlink{class_ogre_1_1_p_s_s_m_shadow_camera_setup_a8883a70f9fd1d0ed31bab5ce82f62b02}{Split\+Point\+List} \&new\+Split\+Points)
\begin{DoxyCompactList}\small\item\em Manually configure a new splitting scheme. \end{DoxyCompactList}\item 
void \hyperlink{class_ogre_1_1_focused_shadow_camera_setup_af57854c45cd48033da1cb28e316901dc}{set\+Use\+Aggressive\+Focus\+Region} (bool aggressive)
\begin{DoxyCompactList}\small\item\em Sets whether or not to use the more aggressive approach to deciding on the focus region or not. \end{DoxyCompactList}\item 
virtual void \hyperlink{class_ogre_1_1_li_s_p_s_m_shadow_camera_setup_ae09cafbe81832dd23c70f85d9435b213}{set\+Use\+Simple\+Optimal\+Adjust} (bool s)
\begin{DoxyCompactList}\small\item\em Sets whether or not to use a slightly simpler version of the camera near point derivation (default is true) \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Parallel Split Shadow Map (P\+S\+SM) shadow camera setup. 

\begin{DoxyRemark}{Remarks}
A P\+S\+SM shadow system uses multiple shadow maps per light and maps each texture into a region of space, progressing away from the camera. As such it is most appropriate for directional light setups. This particular version also uses Li\+S\+P\+SM projection for each split to maximise the quality. 
\end{DoxyRemark}
\begin{DoxyNote}{Note}
Because P\+S\+SM uses multiple shadow maps per light, you will need to increase the number of shadow textures available (via \hyperlink{class_ogre_1_1_scene_manager}{Scene\+Manager}) to match the number of shadow maps required (default is 3 per light). 
\end{DoxyNote}


\subsection{Member Typedef Documentation}
\mbox{\Hypertarget{class_ogre_1_1_p_s_s_m_shadow_camera_setup_a8883a70f9fd1d0ed31bab5ce82f62b02}\label{class_ogre_1_1_p_s_s_m_shadow_camera_setup_a8883a70f9fd1d0ed31bab5ce82f62b02}} 
\index{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup@{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}!Split\+Point\+List@{Split\+Point\+List}}
\index{Split\+Point\+List@{Split\+Point\+List}!Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup@{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}}
\subsubsection{\texorpdfstring{Split\+Point\+List}{SplitPointList}}
{\footnotesize\ttfamily typedef std\+::vector$<$\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}$>$ \hyperlink{class_ogre_1_1_p_s_s_m_shadow_camera_setup_a8883a70f9fd1d0ed31bab5ce82f62b02}{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup\+::\+Split\+Point\+List}}

\mbox{\Hypertarget{class_ogre_1_1_p_s_s_m_shadow_camera_setup_aa419507f8dc7e7824ad9cf7c691f01ae}\label{class_ogre_1_1_p_s_s_m_shadow_camera_setup_aa419507f8dc7e7824ad9cf7c691f01ae}} 
\index{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup@{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}!Optimal\+Adjust\+Factor\+List@{Optimal\+Adjust\+Factor\+List}}
\index{Optimal\+Adjust\+Factor\+List@{Optimal\+Adjust\+Factor\+List}!Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup@{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}}
\subsubsection{\texorpdfstring{Optimal\+Adjust\+Factor\+List}{OptimalAdjustFactorList}}
{\footnotesize\ttfamily typedef std\+::vector$<$\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}$>$ \hyperlink{class_ogre_1_1_p_s_s_m_shadow_camera_setup_aa419507f8dc7e7824ad9cf7c691f01ae}{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup\+::\+Optimal\+Adjust\+Factor\+List}}



\subsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{class_ogre_1_1_p_s_s_m_shadow_camera_setup_ad19943dab4695c37674eedcd574a4844}\label{class_ogre_1_1_p_s_s_m_shadow_camera_setup_ad19943dab4695c37674eedcd574a4844}} 
\index{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup@{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}!P\+S\+S\+M\+Shadow\+Camera\+Setup@{P\+S\+S\+M\+Shadow\+Camera\+Setup}}
\index{P\+S\+S\+M\+Shadow\+Camera\+Setup@{P\+S\+S\+M\+Shadow\+Camera\+Setup}!Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup@{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}}
\subsubsection{\texorpdfstring{P\+S\+S\+M\+Shadow\+Camera\+Setup()}{PSSMShadowCameraSetup()}}
{\footnotesize\ttfamily Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Constructor, defaults to 3 splits. 

\mbox{\Hypertarget{class_ogre_1_1_p_s_s_m_shadow_camera_setup_aea92d3872f6f0f8bbab04eb8f0474fa2}\label{class_ogre_1_1_p_s_s_m_shadow_camera_setup_aea92d3872f6f0f8bbab04eb8f0474fa2}} 
\index{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup@{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}!````~P\+S\+S\+M\+Shadow\+Camera\+Setup@{$\sim$\+P\+S\+S\+M\+Shadow\+Camera\+Setup}}
\index{````~P\+S\+S\+M\+Shadow\+Camera\+Setup@{$\sim$\+P\+S\+S\+M\+Shadow\+Camera\+Setup}!Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup@{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}}
\subsubsection{\texorpdfstring{$\sim$\+P\+S\+S\+M\+Shadow\+Camera\+Setup()}{~PSSMShadowCameraSetup()}}
{\footnotesize\ttfamily virtual Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup\+::$\sim$\+P\+S\+S\+M\+Shadow\+Camera\+Setup (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



\subsection{Member Function Documentation}
\mbox{\Hypertarget{class_ogre_1_1_p_s_s_m_shadow_camera_setup_a3ad4827d62664b3aebcd4880c1dc2965}\label{class_ogre_1_1_p_s_s_m_shadow_camera_setup_a3ad4827d62664b3aebcd4880c1dc2965}} 
\index{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup@{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}!calculate\+Split\+Points@{calculate\+Split\+Points}}
\index{calculate\+Split\+Points@{calculate\+Split\+Points}!Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup@{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}}
\subsubsection{\texorpdfstring{calculate\+Split\+Points()}{calculateSplitPoints()}}
{\footnotesize\ttfamily void Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup\+::calculate\+Split\+Points (\begin{DoxyParamCaption}\item[{\hyperlink{namespace_ogre_ab6e842a18caf062ed73a5d3badd0dd4c}{uint}}]{split\+Count,  }\item[{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}]{near\+Dist,  }\item[{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}]{far\+Dist,  }\item[{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}]{lambda = {\ttfamily 0.95} }\end{DoxyParamCaption})}



Calculate a new splitting scheme. 


\begin{DoxyParams}{Parameters}
{\em split\+Count} & The number of splits to use \\
\hline
{\em near\+Dist} & The near plane to use for the first split \\
\hline
{\em far\+Dist} & The far plane to use for the last split \\
\hline
{\em lambda} & Factor to use to reduce the split size \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_ogre_1_1_p_s_s_m_shadow_camera_setup_ab136d90731500be66640d339c04a2218}\label{class_ogre_1_1_p_s_s_m_shadow_camera_setup_ab136d90731500be66640d339c04a2218}} 
\index{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup@{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}!set\+Split\+Points@{set\+Split\+Points}}
\index{set\+Split\+Points@{set\+Split\+Points}!Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup@{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}}
\subsubsection{\texorpdfstring{set\+Split\+Points()}{setSplitPoints()}}
{\footnotesize\ttfamily void Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup\+::set\+Split\+Points (\begin{DoxyParamCaption}\item[{const \hyperlink{class_ogre_1_1_p_s_s_m_shadow_camera_setup_a8883a70f9fd1d0ed31bab5ce82f62b02}{Split\+Point\+List} \&}]{new\+Split\+Points }\end{DoxyParamCaption})}



Manually configure a new splitting scheme. 


\begin{DoxyParams}{Parameters}
{\em new\+Split\+Points} & A list which is split\+Count + 1 entries long, containing the split points. The first value is the near point, the last value is the far point, and each value in between is both a far point of the previous split, and a near point for the next one. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_ogre_1_1_p_s_s_m_shadow_camera_setup_a4f16797f8c4fcee30141e5dd0690e647}\label{class_ogre_1_1_p_s_s_m_shadow_camera_setup_a4f16797f8c4fcee30141e5dd0690e647}} 
\index{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup@{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}!set\+Optimal\+Adjust\+Factor@{set\+Optimal\+Adjust\+Factor}}
\index{set\+Optimal\+Adjust\+Factor@{set\+Optimal\+Adjust\+Factor}!Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup@{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}}
\subsubsection{\texorpdfstring{set\+Optimal\+Adjust\+Factor()}{setOptimalAdjustFactor()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily void Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup\+::set\+Optimal\+Adjust\+Factor (\begin{DoxyParamCaption}\item[{size\+\_\+t}]{split\+Index,  }\item[{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}]{factor }\end{DoxyParamCaption})}



Set the Li\+S\+P\+SM optimal adjust factor for a given split (call after configuring splits). 

\mbox{\Hypertarget{class_ogre_1_1_p_s_s_m_shadow_camera_setup_a5000b20f43bea556bcdd994550f1f0ab}\label{class_ogre_1_1_p_s_s_m_shadow_camera_setup_a5000b20f43bea556bcdd994550f1f0ab}} 
\index{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup@{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}!set\+Split\+Padding@{set\+Split\+Padding}}
\index{set\+Split\+Padding@{set\+Split\+Padding}!Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup@{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}}
\subsubsection{\texorpdfstring{set\+Split\+Padding()}{setSplitPadding()}}
{\footnotesize\ttfamily void Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup\+::set\+Split\+Padding (\begin{DoxyParamCaption}\item[{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}]{pad }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Set the padding factor to apply to the near \& far distances when matching up splits to one another, to avoid \textquotesingle{}cracks\textquotesingle{}. 

\mbox{\Hypertarget{class_ogre_1_1_p_s_s_m_shadow_camera_setup_ab7ad77ca1e745f28838c52078ed61300}\label{class_ogre_1_1_p_s_s_m_shadow_camera_setup_ab7ad77ca1e745f28838c52078ed61300}} 
\index{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup@{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}!get\+Split\+Padding@{get\+Split\+Padding}}
\index{get\+Split\+Padding@{get\+Split\+Padding}!Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup@{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}}
\subsubsection{\texorpdfstring{get\+Split\+Padding()}{getSplitPadding()}}
{\footnotesize\ttfamily \hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup\+::get\+Split\+Padding (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the padding factor to apply to the near \& far distances when matching up splits to one another, to avoid \textquotesingle{}cracks\textquotesingle{}. 

\mbox{\Hypertarget{class_ogre_1_1_p_s_s_m_shadow_camera_setup_adb420010a1fb38c2effabc47ff37b3f5}\label{class_ogre_1_1_p_s_s_m_shadow_camera_setup_adb420010a1fb38c2effabc47ff37b3f5}} 
\index{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup@{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}!get\+Split\+Count@{get\+Split\+Count}}
\index{get\+Split\+Count@{get\+Split\+Count}!Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup@{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}}
\subsubsection{\texorpdfstring{get\+Split\+Count()}{getSplitCount()}}
{\footnotesize\ttfamily \hyperlink{namespace_ogre_ab6e842a18caf062ed73a5d3badd0dd4c}{uint} Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup\+::get\+Split\+Count (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the number of splits. 

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



Returns a Li\+S\+P\+SM shadow camera with P\+S\+SM splits base on iteration. 



Reimplemented from \hyperlink{class_ogre_1_1_li_s_p_s_m_shadow_camera_setup_aa19c6563c41297f7e14e8918dd89b074}{Ogre\+::\+Li\+S\+P\+S\+M\+Shadow\+Camera\+Setup}.

\mbox{\Hypertarget{class_ogre_1_1_p_s_s_m_shadow_camera_setup_a0c7b1857797ded8fd25277b3570004aa}\label{class_ogre_1_1_p_s_s_m_shadow_camera_setup_a0c7b1857797ded8fd25277b3570004aa}} 
\index{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup@{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}!get\+Split\+Points@{get\+Split\+Points}}
\index{get\+Split\+Points@{get\+Split\+Points}!Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup@{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}}
\subsubsection{\texorpdfstring{get\+Split\+Points()}{getSplitPoints()}}
{\footnotesize\ttfamily const \hyperlink{class_ogre_1_1_p_s_s_m_shadow_camera_setup_a8883a70f9fd1d0ed31bab5ce82f62b02}{Split\+Point\+List}\& Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup\+::get\+Split\+Points (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Returns the calculated split points. 

\mbox{\Hypertarget{class_ogre_1_1_p_s_s_m_shadow_camera_setup_a877af39ed94e377764bd4080e3c1a356}\label{class_ogre_1_1_p_s_s_m_shadow_camera_setup_a877af39ed94e377764bd4080e3c1a356}} 
\index{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup@{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}!get\+Optimal\+Adjust\+Factor@{get\+Optimal\+Adjust\+Factor}}
\index{get\+Optimal\+Adjust\+Factor@{get\+Optimal\+Adjust\+Factor}!Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup@{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}}
\subsubsection{\texorpdfstring{get\+Optimal\+Adjust\+Factor()}{getOptimalAdjustFactor()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup\+::get\+Optimal\+Adjust\+Factor (\begin{DoxyParamCaption}\item[{size\+\_\+t}]{split\+Index }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Returns the optimal adjust factor for a given split. 

\mbox{\Hypertarget{class_ogre_1_1_p_s_s_m_shadow_camera_setup_a6daefce1b9f1d6e0d03b777545ea6e0a}\label{class_ogre_1_1_p_s_s_m_shadow_camera_setup_a6daefce1b9f1d6e0d03b777545ea6e0a}} 
\index{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup@{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}!get\+Optimal\+Adjust\+Factor@{get\+Optimal\+Adjust\+Factor}}
\index{get\+Optimal\+Adjust\+Factor@{get\+Optimal\+Adjust\+Factor}!Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup@{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}}
\subsubsection{\texorpdfstring{get\+Optimal\+Adjust\+Factor()}{getOptimalAdjustFactor()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup\+::get\+Optimal\+Adjust\+Factor (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [virtual]}}



Overridden, recommended internal use only since depends on current iteration. 



Reimplemented from \hyperlink{class_ogre_1_1_li_s_p_s_m_shadow_camera_setup_a9b5d6e5ff9339e7a010c2dfbcb051490}{Ogre\+::\+Li\+S\+P\+S\+M\+Shadow\+Camera\+Setup}.

\mbox{\Hypertarget{class_ogre_1_1_li_s_p_s_m_shadow_camera_setup_aa4f0c58ca0ea89aa7e4b11def4976ea6}\label{class_ogre_1_1_li_s_p_s_m_shadow_camera_setup_aa4f0c58ca0ea89aa7e4b11def4976ea6}} 
\index{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup@{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}!set\+Optimal\+Adjust\+Factor@{set\+Optimal\+Adjust\+Factor}}
\index{set\+Optimal\+Adjust\+Factor@{set\+Optimal\+Adjust\+Factor}!Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup@{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}}
\subsubsection{\texorpdfstring{set\+Optimal\+Adjust\+Factor()}{setOptimalAdjustFactor()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily virtual void Ogre\+::\+Li\+S\+P\+S\+M\+Shadow\+Camera\+Setup\+::set\+Optimal\+Adjust\+Factor (\begin{DoxyParamCaption}\item[{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}]{n }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}, {\ttfamily [inherited]}}



Adjusts the parameter n to produce optimal shadows. 

\begin{DoxyRemark}{Remarks}
The smaller the parameter n, the stronger the perspective warping effect. The consequence of a stronger warping is that the near shadows will gain quality while the far ones will lose it. Depending on your scene and light types you may want to tweak this value -\/ for example directional lights tend to benefit from higher values of n than other types of light, especially if you expect to see more distant shadows (say if the viewpoint is higher above the ground plane). Remember that you can supply separate \hyperlink{class_ogre_1_1_shadow_camera_setup}{Shadow\+Camera\+Setup} instances configured differently per light if you wish. 
\end{DoxyRemark}

\begin{DoxyParams}{Parameters}
{\em n} & The adjustment factor -\/ default is 0.\+1f. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_ogre_1_1_li_s_p_s_m_shadow_camera_setup_ae09cafbe81832dd23c70f85d9435b213}\label{class_ogre_1_1_li_s_p_s_m_shadow_camera_setup_ae09cafbe81832dd23c70f85d9435b213}} 
\index{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup@{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}!set\+Use\+Simple\+Optimal\+Adjust@{set\+Use\+Simple\+Optimal\+Adjust}}
\index{set\+Use\+Simple\+Optimal\+Adjust@{set\+Use\+Simple\+Optimal\+Adjust}!Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup@{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}}
\subsubsection{\texorpdfstring{set\+Use\+Simple\+Optimal\+Adjust()}{setUseSimpleOptimalAdjust()}}
{\footnotesize\ttfamily virtual void Ogre\+::\+Li\+S\+P\+S\+M\+Shadow\+Camera\+Setup\+::set\+Use\+Simple\+Optimal\+Adjust (\begin{DoxyParamCaption}\item[{bool}]{s }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}, {\ttfamily [inherited]}}



Sets whether or not to use a slightly simpler version of the camera near point derivation (default is true) 

\mbox{\Hypertarget{class_ogre_1_1_li_s_p_s_m_shadow_camera_setup_ad836bab9853f49b42a2fe9f2aab786b1}\label{class_ogre_1_1_li_s_p_s_m_shadow_camera_setup_ad836bab9853f49b42a2fe9f2aab786b1}} 
\index{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup@{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}!get\+Use\+Simple\+Optimal\+Adjust@{get\+Use\+Simple\+Optimal\+Adjust}}
\index{get\+Use\+Simple\+Optimal\+Adjust@{get\+Use\+Simple\+Optimal\+Adjust}!Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup@{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}}
\subsubsection{\texorpdfstring{get\+Use\+Simple\+Optimal\+Adjust()}{getUseSimpleOptimalAdjust()}}
{\footnotesize\ttfamily virtual bool Ogre\+::\+Li\+S\+P\+S\+M\+Shadow\+Camera\+Setup\+::get\+Use\+Simple\+Optimal\+Adjust (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}, {\ttfamily [inherited]}}



Gets whether or not to use a slightly simpler version of the camera near point derivation (default is true) 

\mbox{\Hypertarget{class_ogre_1_1_li_s_p_s_m_shadow_camera_setup_a2a6fb5e0335458e5c626740bfcbfc56c}\label{class_ogre_1_1_li_s_p_s_m_shadow_camera_setup_a2a6fb5e0335458e5c626740bfcbfc56c}} 
\index{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup@{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}!set\+Camera\+Light\+Direction\+Threshold@{set\+Camera\+Light\+Direction\+Threshold}}
\index{set\+Camera\+Light\+Direction\+Threshold@{set\+Camera\+Light\+Direction\+Threshold}!Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup@{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}}
\subsubsection{\texorpdfstring{set\+Camera\+Light\+Direction\+Threshold()}{setCameraLightDirectionThreshold()}}
{\footnotesize\ttfamily virtual void Ogre\+::\+Li\+S\+P\+S\+M\+Shadow\+Camera\+Setup\+::set\+Camera\+Light\+Direction\+Threshold (\begin{DoxyParamCaption}\item[{\hyperlink{class_ogre_1_1_degree}{Degree}}]{angle }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}, {\ttfamily [inherited]}}



Sets the threshold between the camera and the light direction below which the Li\+S\+P\+SM projection is \textquotesingle{}flattened\textquotesingle{}, since coincident light and camera projections cause problems with the perspective skew. 

\begin{DoxyRemark}{Remarks}
For example, setting this to 20 degrees will mean that as the difference between the light and camera direction reduces from 20 degrees to 0 degrees, the perspective skew will be proportionately removed. 
\end{DoxyRemark}
\mbox{\Hypertarget{class_ogre_1_1_li_s_p_s_m_shadow_camera_setup_abddaf4baa243cbda0e8a2bd43f3058f0}\label{class_ogre_1_1_li_s_p_s_m_shadow_camera_setup_abddaf4baa243cbda0e8a2bd43f3058f0}} 
\index{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup@{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}!get\+Camera\+Light\+Direction\+Threshold@{get\+Camera\+Light\+Direction\+Threshold}}
\index{get\+Camera\+Light\+Direction\+Threshold@{get\+Camera\+Light\+Direction\+Threshold}!Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup@{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}}
\subsubsection{\texorpdfstring{get\+Camera\+Light\+Direction\+Threshold()}{getCameraLightDirectionThreshold()}}
{\footnotesize\ttfamily virtual \hyperlink{class_ogre_1_1_degree}{Degree} Ogre\+::\+Li\+S\+P\+S\+M\+Shadow\+Camera\+Setup\+::get\+Camera\+Light\+Direction\+Threshold (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [virtual]}, {\ttfamily [inherited]}}



Sets the threshold between the camera and the light direction below which the Li\+S\+P\+SM projection is \textquotesingle{}flattened\textquotesingle{}, since coincident light and camera projections cause problems with the perspective skew. 

\mbox{\Hypertarget{class_ogre_1_1_focused_shadow_camera_setup_af57854c45cd48033da1cb28e316901dc}\label{class_ogre_1_1_focused_shadow_camera_setup_af57854c45cd48033da1cb28e316901dc}} 
\index{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup@{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}!set\+Use\+Aggressive\+Focus\+Region@{set\+Use\+Aggressive\+Focus\+Region}}
\index{set\+Use\+Aggressive\+Focus\+Region@{set\+Use\+Aggressive\+Focus\+Region}!Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup@{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}}
\subsubsection{\texorpdfstring{set\+Use\+Aggressive\+Focus\+Region()}{setUseAggressiveFocusRegion()}}
{\footnotesize\ttfamily void Ogre\+::\+Focused\+Shadow\+Camera\+Setup\+::set\+Use\+Aggressive\+Focus\+Region (\begin{DoxyParamCaption}\item[{bool}]{aggressive }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [inherited]}}



Sets whether or not to use the more aggressive approach to deciding on the focus region or not. 

\begin{DoxyNote}{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\textquotesingle{}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. 
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em aggressive} & True to use the more aggressive approach, false otherwise. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_ogre_1_1_focused_shadow_camera_setup_ad28464a9e78991c046b70f2d6c95a753}\label{class_ogre_1_1_focused_shadow_camera_setup_ad28464a9e78991c046b70f2d6c95a753}} 
\index{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup@{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}!get\+Use\+Aggressive\+Focus\+Region@{get\+Use\+Aggressive\+Focus\+Region}}
\index{get\+Use\+Aggressive\+Focus\+Region@{get\+Use\+Aggressive\+Focus\+Region}!Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup@{Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup}}
\subsubsection{\texorpdfstring{get\+Use\+Aggressive\+Focus\+Region()}{getUseAggressiveFocusRegion()}}
{\footnotesize\ttfamily bool Ogre\+::\+Focused\+Shadow\+Camera\+Setup\+::get\+Use\+Aggressive\+Focus\+Region (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [inherited]}}



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