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


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=257pt]{class_ogre_1_1_p_s_s_m_shadow_camera_setup__inherit__graph}
\end{center}
\end{figure}
\doxysubsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
typedef std\+::vector$<$ \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} $>$ \mbox{\hyperlink{class_ogre_1_1_p_s_s_m_shadow_camera_setup_aa419507f8dc7e7824ad9cf7c691f01ae}{Optimal\+Adjust\+Factor\+List}}
\item 
typedef std\+::vector$<$ \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} $>$ \mbox{\hyperlink{class_ogre_1_1_p_s_s_m_shadow_camera_setup_a8883a70f9fd1d0ed31bab5ce82f62b02}{Split\+Point\+List}}
\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{class_ogre_1_1_p_s_s_m_shadow_camera_setup_ad19943dab4695c37674eedcd574a4844}{P\+S\+S\+M\+Shadow\+Camera\+Setup}} ()
\item 
virtual \mbox{\hyperlink{class_ogre_1_1_p_s_s_m_shadow_camera_setup_aea92d3872f6f0f8bbab04eb8f0474fa2}{$\sim$\+P\+S\+S\+M\+Shadow\+Camera\+Setup}} ()
\item 
void \mbox{\hyperlink{class_ogre_1_1_p_s_s_m_shadow_camera_setup_a1038abc3af65c1177d192ecc5bebf04a}{calculate\+Split\+Points}} (\mbox{\hyperlink{namespace_ogre_ab6e842a18caf062ed73a5d3badd0dd4c}{uint}} split\+Count, \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} near\+Dist, \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} far\+Dist, \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} lambda=0.\+95f)
\begin{DoxyCompactList}\small\item\em Calculate a new splitting scheme. \end{DoxyCompactList}\item 
virtual \mbox{\hyperlink{class_ogre_1_1_degree}{Degree}} \mbox{\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 
\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} \mbox{\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 
\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} \mbox{\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 
virtual void \mbox{\hyperlink{class_ogre_1_1_p_s_s_m_shadow_camera_setup_a0503ea13df793d0f8d83a30211281321}{get\+Shadow\+Camera}} (const \mbox{\hyperlink{class_ogre_1_1_scene_manager}{Ogre\+::\+Scene\+Manager}} $\ast$sm, const \mbox{\hyperlink{class_ogre_1_1_camera}{Ogre\+::\+Camera}} $\ast$cam, const \mbox{\hyperlink{class_ogre_1_1_viewport}{Ogre\+::\+Viewport}} $\ast$vp, const \mbox{\hyperlink{class_ogre_1_1_light}{Ogre\+::\+Light}} $\ast$light, \mbox{\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 
\mbox{\hyperlink{namespace_ogre_ab6e842a18caf062ed73a5d3badd0dd4c}{uint}} \mbox{\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 
\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} \mbox{\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 \mbox{\hyperlink{class_ogre_1_1_p_s_s_m_shadow_camera_setup_a8883a70f9fd1d0ed31bab5ce82f62b02}{Split\+Point\+List}} \& \mbox{\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 \mbox{\hyperlink{class_ogre_1_1_focused_shadow_camera_setup_ad28464a9e78991c046b70f2d6c95a753}{get\+Use\+Aggressive\+Focus\+Region}} () const
\item 
virtual bool \mbox{\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 \mbox{\hyperlink{class_ogre_1_1_li_s_p_s_m_shadow_camera_setup_a2a6fb5e0335458e5c626740bfcbfc56c}{set\+Camera\+Light\+Direction\+Threshold}} (\mbox{\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 
virtual void \mbox{\hyperlink{class_ogre_1_1_li_s_p_s_m_shadow_camera_setup_aa4f0c58ca0ea89aa7e4b11def4976ea6}{set\+Optimal\+Adjust\+Factor}} (\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} n)
\begin{DoxyCompactList}\small\item\em Adjusts the parameter n to produce optimal shadows. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{class_ogre_1_1_p_s_s_m_shadow_camera_setup_a4f16797f8c4fcee30141e5dd0690e647}{set\+Optimal\+Adjust\+Factor}} (size\+\_\+t split\+Index, \mbox{\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 
void \mbox{\hyperlink{class_ogre_1_1_p_s_s_m_shadow_camera_setup_a5000b20f43bea556bcdd994550f1f0ab}{set\+Split\+Padding}} (\mbox{\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 \mbox{\hyperlink{class_ogre_1_1_p_s_s_m_shadow_camera_setup_ab136d90731500be66640d339c04a2218}{set\+Split\+Points}} (const \mbox{\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 \mbox{\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 \mbox{\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}
\doxysubsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static \mbox{\hyperlink{namespace_ogre_a139829f6abc3581ec63563543ebfff15}{Shadow\+Camera\+Setup\+Ptr}} \mbox{\hyperlink{class_ogre_1_1_p_s_s_m_shadow_camera_setup_a3163534b8900a9f54c4d21a30217004c}{create}} ()
\begin{DoxyCompactList}\small\item\em Constructor, defaults to 3 splits. \end{DoxyCompactList}\item 
static \mbox{\hyperlink{namespace_ogre_a139829f6abc3581ec63563543ebfff15}{Shadow\+Camera\+Setup\+Ptr}} \mbox{\hyperlink{class_ogre_1_1_focused_shadow_camera_setup_a1d1a64d84fe3bd0ff8d570e7c7ab3460}{create}} (bool use\+Aggressive\+Region=true)
\begin{DoxyCompactList}\small\item\em Create an instance. \end{DoxyCompactList}\item 
static \mbox{\hyperlink{namespace_ogre_a139829f6abc3581ec63563543ebfff15}{Shadow\+Camera\+Setup\+Ptr}} \mbox{\hyperlink{class_ogre_1_1_li_s_p_s_m_shadow_camera_setup_ad26244d0895a5e1c2c272018af7b2d98}{create}} (\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} n=0.\+1f, bool use\+Simple\+N\+Opt=true, \mbox{\hyperlink{class_ogre_1_1_degree}{Degree}} angle=\mbox{\hyperlink{class_ogre_1_1_radian}{Radian}}(0.\+451f))
\end{DoxyCompactItemize}


\doxysubsection{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 \mbox{\hyperlink{class_ogre_1_1_scene_manager}{Scene\+Manager}}) to match the number of shadow maps required (default is 3 per light). 
\end{DoxyNote}


\doxysubsection{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::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}!SplitPointList@{SplitPointList}}
\index{SplitPointList@{SplitPointList}!Ogre::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}}
\doxysubsubsection{\texorpdfstring{SplitPointList}{SplitPointList}}
{\footnotesize\ttfamily typedef std\+::vector$<$\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}$>$ \mbox{\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::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}!OptimalAdjustFactorList@{OptimalAdjustFactorList}}
\index{OptimalAdjustFactorList@{OptimalAdjustFactorList}!Ogre::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}}
\doxysubsubsection{\texorpdfstring{OptimalAdjustFactorList}{OptimalAdjustFactorList}}
{\footnotesize\ttfamily typedef std\+::vector$<$\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}$>$ \mbox{\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}}}



\doxysubsection{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::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}!PSSMShadowCameraSetup@{PSSMShadowCameraSetup}}
\index{PSSMShadowCameraSetup@{PSSMShadowCameraSetup}!Ogre::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}}
\doxysubsubsection{\texorpdfstring{PSSMShadowCameraSetup()}{PSSMShadowCameraSetup()}}
{\footnotesize\ttfamily Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}

\begin{DoxyRefDesc}{Deprecated}
\item[\mbox{\hyperlink{deprecated__deprecated000171}{Deprecated}}]use \mbox{\hyperlink{class_ogre_1_1_p_s_s_m_shadow_camera_setup_a3163534b8900a9f54c4d21a30217004c}{create()}} \end{DoxyRefDesc}
\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::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}!````~PSSMShadowCameraSetup@{$\sim$PSSMShadowCameraSetup}}
\index{````~PSSMShadowCameraSetup@{$\sim$PSSMShadowCameraSetup}!Ogre::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}}
\doxysubsubsection{\texorpdfstring{$\sim$PSSMShadowCameraSetup()}{~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]}}



\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{class_ogre_1_1_p_s_s_m_shadow_camera_setup_a3163534b8900a9f54c4d21a30217004c}\label{class_ogre_1_1_p_s_s_m_shadow_camera_setup_a3163534b8900a9f54c4d21a30217004c}} 
\index{Ogre::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}!create@{create}}
\index{create@{create}!Ogre::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}}
\doxysubsubsection{\texorpdfstring{create()}{create()}\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}}
{\footnotesize\ttfamily static \mbox{\hyperlink{namespace_ogre_a139829f6abc3581ec63563543ebfff15}{Shadow\+Camera\+Setup\+Ptr}} Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup\+::create (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Constructor, defaults to 3 splits. 

\mbox{\Hypertarget{class_ogre_1_1_p_s_s_m_shadow_camera_setup_a1038abc3af65c1177d192ecc5bebf04a}\label{class_ogre_1_1_p_s_s_m_shadow_camera_setup_a1038abc3af65c1177d192ecc5bebf04a}} 
\index{Ogre::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}!calculateSplitPoints@{calculateSplitPoints}}
\index{calculateSplitPoints@{calculateSplitPoints}!Ogre::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}}
\doxysubsubsection{\texorpdfstring{calculateSplitPoints()}{calculateSplitPoints()}}
{\footnotesize\ttfamily void Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup\+::calculate\+Split\+Points (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{namespace_ogre_ab6e842a18caf062ed73a5d3badd0dd4c}{uint}}}]{split\+Count,  }\item[{\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}}]{near\+Dist,  }\item[{\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}}]{far\+Dist,  }\item[{\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}}]{lambda = {\ttfamily 0.95f} }\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::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}!setSplitPoints@{setSplitPoints}}
\index{setSplitPoints@{setSplitPoints}!Ogre::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}}
\doxysubsubsection{\texorpdfstring{setSplitPoints()}{setSplitPoints()}}
{\footnotesize\ttfamily void Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup\+::set\+Split\+Points (\begin{DoxyParamCaption}\item[{const \mbox{\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::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}!setOptimalAdjustFactor@{setOptimalAdjustFactor}}
\index{setOptimalAdjustFactor@{setOptimalAdjustFactor}!Ogre::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}}
\doxysubsubsection{\texorpdfstring{setOptimalAdjustFactor()}{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[{\mbox{\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::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}!setSplitPadding@{setSplitPadding}}
\index{setSplitPadding@{setSplitPadding}!Ogre::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}}
\doxysubsubsection{\texorpdfstring{setSplitPadding()}{setSplitPadding()}}
{\footnotesize\ttfamily void Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup\+::set\+Split\+Padding (\begin{DoxyParamCaption}\item[{\mbox{\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::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}!getSplitPadding@{getSplitPadding}}
\index{getSplitPadding@{getSplitPadding}!Ogre::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}}
\doxysubsubsection{\texorpdfstring{getSplitPadding()}{getSplitPadding()}}
{\footnotesize\ttfamily \mbox{\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::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}!getSplitCount@{getSplitCount}}
\index{getSplitCount@{getSplitCount}!Ogre::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}}
\doxysubsubsection{\texorpdfstring{getSplitCount()}{getSplitCount()}}
{\footnotesize\ttfamily \mbox{\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::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}!getShadowCamera@{getShadowCamera}}
\index{getShadowCamera@{getShadowCamera}!Ogre::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}}
\doxysubsubsection{\texorpdfstring{getShadowCamera()}{getShadowCamera()}}
{\footnotesize\ttfamily virtual void Ogre\+::\+P\+S\+S\+M\+Shadow\+Camera\+Setup\+::get\+Shadow\+Camera (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{class_ogre_1_1_scene_manager}{Ogre\+::\+Scene\+Manager}} $\ast$}]{sm,  }\item[{const \mbox{\hyperlink{class_ogre_1_1_camera}{Ogre\+::\+Camera}} $\ast$}]{cam,  }\item[{const \mbox{\hyperlink{class_ogre_1_1_viewport}{Ogre\+::\+Viewport}} $\ast$}]{vp,  }\item[{const \mbox{\hyperlink{class_ogre_1_1_light}{Ogre\+::\+Light}} $\ast$}]{light,  }\item[{\mbox{\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 \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{\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::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}!getSplitPoints@{getSplitPoints}}
\index{getSplitPoints@{getSplitPoints}!Ogre::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}}
\doxysubsubsection{\texorpdfstring{getSplitPoints()}{getSplitPoints()}}
{\footnotesize\ttfamily const \mbox{\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::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}!getOptimalAdjustFactor@{getOptimalAdjustFactor}}
\index{getOptimalAdjustFactor@{getOptimalAdjustFactor}!Ogre::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}}
\doxysubsubsection{\texorpdfstring{getOptimalAdjustFactor()}{getOptimalAdjustFactor()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \mbox{\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::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}!getOptimalAdjustFactor@{getOptimalAdjustFactor}}
\index{getOptimalAdjustFactor@{getOptimalAdjustFactor}!Ogre::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}}
\doxysubsubsection{\texorpdfstring{getOptimalAdjustFactor()}{getOptimalAdjustFactor()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \mbox{\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 \mbox{\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_ad26244d0895a5e1c2c272018af7b2d98}\label{class_ogre_1_1_li_s_p_s_m_shadow_camera_setup_ad26244d0895a5e1c2c272018af7b2d98}} 
\index{Ogre::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}!create@{create}}
\index{create@{create}!Ogre::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}}
\doxysubsubsection{\texorpdfstring{create()}{create()}\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}}
{\footnotesize\ttfamily static \mbox{\hyperlink{namespace_ogre_a139829f6abc3581ec63563543ebfff15}{Shadow\+Camera\+Setup\+Ptr}} Ogre\+::\+Li\+S\+P\+S\+M\+Shadow\+Camera\+Setup\+::create (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}}]{n = {\ttfamily 0.1f},  }\item[{bool}]{use\+Simple\+N\+Opt = {\ttfamily true},  }\item[{\mbox{\hyperlink{class_ogre_1_1_degree}{Degree}}}]{angle = {\ttfamily \mbox{\hyperlink{class_ogre_1_1_radian}{Radian}}(0.451f)} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}, {\ttfamily [inherited]}}


\begin{DoxyParams}{Parameters}
{\em n} & The adjustment factor \\
\hline
{\em use\+Simple\+N\+Opt} & \\
\hline
{\em angle} & camera \mbox{\hyperlink{class_ogre_1_1_light}{Light}} Direction Threshold \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_ogre_1_1_focused_shadow_camera_setup_a1d1a64d84fe3bd0ff8d570e7c7ab3460}\label{class_ogre_1_1_focused_shadow_camera_setup_a1d1a64d84fe3bd0ff8d570e7c7ab3460}} 
\index{Ogre::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}!create@{create}}
\index{create@{create}!Ogre::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}}
\doxysubsubsection{\texorpdfstring{create()}{create()}\hspace{0.1cm}{\footnotesize\ttfamily [3/3]}}
{\footnotesize\ttfamily static \mbox{\hyperlink{namespace_ogre_a139829f6abc3581ec63563543ebfff15}{Shadow\+Camera\+Setup\+Ptr}} Ogre\+::\+Focused\+Shadow\+Camera\+Setup\+::create (\begin{DoxyParamCaption}\item[{bool}]{use\+Aggressive\+Region = {\ttfamily true} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}, {\ttfamily [inherited]}}



Create an instance. 

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. 
\begin{DoxyParams}{Parameters}
{\em use\+Aggressive\+Region} & True to use the more aggressive approach, false otherwise. \\
\hline
\end{DoxyParams}
\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::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}!setOptimalAdjustFactor@{setOptimalAdjustFactor}}
\index{setOptimalAdjustFactor@{setOptimalAdjustFactor}!Ogre::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}}
\doxysubsubsection{\texorpdfstring{setOptimalAdjustFactor()}{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[{\mbox{\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 \mbox{\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::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}!setUseSimpleOptimalAdjust@{setUseSimpleOptimalAdjust}}
\index{setUseSimpleOptimalAdjust@{setUseSimpleOptimalAdjust}!Ogre::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}}
\doxysubsubsection{\texorpdfstring{setUseSimpleOptimalAdjust()}{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::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}!getUseSimpleOptimalAdjust@{getUseSimpleOptimalAdjust}}
\index{getUseSimpleOptimalAdjust@{getUseSimpleOptimalAdjust}!Ogre::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}}
\doxysubsubsection{\texorpdfstring{getUseSimpleOptimalAdjust()}{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::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}!setCameraLightDirectionThreshold@{setCameraLightDirectionThreshold}}
\index{setCameraLightDirectionThreshold@{setCameraLightDirectionThreshold}!Ogre::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}}
\doxysubsubsection{\texorpdfstring{setCameraLightDirectionThreshold()}{setCameraLightDirectionThreshold()}}
{\footnotesize\ttfamily virtual void Ogre\+::\+Li\+S\+P\+S\+M\+Shadow\+Camera\+Setup\+::set\+Camera\+Light\+Direction\+Threshold (\begin{DoxyParamCaption}\item[{\mbox{\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::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}!getCameraLightDirectionThreshold@{getCameraLightDirectionThreshold}}
\index{getCameraLightDirectionThreshold@{getCameraLightDirectionThreshold}!Ogre::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}}
\doxysubsubsection{\texorpdfstring{getCameraLightDirectionThreshold()}{getCameraLightDirectionThreshold()}}
{\footnotesize\ttfamily virtual \mbox{\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::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}!setUseAggressiveFocusRegion@{setUseAggressiveFocusRegion}}
\index{setUseAggressiveFocusRegion@{setUseAggressiveFocusRegion}!Ogre::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}}
\doxysubsubsection{\texorpdfstring{setUseAggressiveFocusRegion()}{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. 

\mbox{\Hypertarget{class_ogre_1_1_focused_shadow_camera_setup_ad28464a9e78991c046b70f2d6c95a753}\label{class_ogre_1_1_focused_shadow_camera_setup_ad28464a9e78991c046b70f2d6c95a753}} 
\index{Ogre::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}!getUseAggressiveFocusRegion@{getUseAggressiveFocusRegion}}
\index{getUseAggressiveFocusRegion@{getUseAggressiveFocusRegion}!Ogre::PSSMShadowCameraSetup@{Ogre::PSSMShadowCameraSetup}}
\doxysubsubsection{\texorpdfstring{getUseAggressiveFocusRegion()}{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 
\mbox{\hyperlink{_ogre_shadow_camera_setup_p_s_s_m_8h}{Ogre\+Shadow\+Camera\+Setup\+P\+S\+S\+M.\+h}}\end{DoxyCompactItemize}
