\hypertarget{class_ogre_1_1_tangent_space_calc}{}\section{Ogre\+:\+:Tangent\+Space\+Calc Class Reference}
\label{class_ogre_1_1_tangent_space_calc}\index{Ogre\+::\+Tangent\+Space\+Calc@{Ogre\+::\+Tangent\+Space\+Calc}}


Class for calculating a tangent space basis.  




{\ttfamily \#include $<$Ogre\+Tangent\+Space\+Calc.\+h$>$}

\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{struct_ogre_1_1_tangent_space_calc_1_1_index_remap}{Index\+Remap}
\begin{DoxyCompactList}\small\item\em Information about a remapped index. \end{DoxyCompactList}\item 
struct \hyperlink{struct_ogre_1_1_tangent_space_calc_1_1_result}{Result}
\begin{DoxyCompactList}\small\item\em The result of having built a tangent space basis. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
typedef std\+::list$<$ \hyperlink{struct_ogre_1_1_tangent_space_calc_1_1_index_remap}{Index\+Remap} $>$ \hyperlink{class_ogre_1_1_tangent_space_calc_af7aa66e32c70fac39f0c518393015321}{Index\+Remap\+List}
\begin{DoxyCompactList}\small\item\em List of indexes that were remapped (split vertices). \end{DoxyCompactList}\item 
typedef std\+::pair$<$ size\+\_\+t, size\+\_\+t $>$ \hyperlink{class_ogre_1_1_tangent_space_calc_af7248e9a56104604d70decacbddc24b6}{Vertex\+Split}
\item 
typedef std\+::list$<$ \hyperlink{class_ogre_1_1_tangent_space_calc_af7248e9a56104604d70decacbddc24b6}{Vertex\+Split} $>$ \hyperlink{class_ogre_1_1_tangent_space_calc_aba0d535d599204aa3b58fe0717b8bbb5}{Vertex\+Splits}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_ogre_1_1_tangent_space_calc_a33eeb35f74cfa2d2c90ab7b138763752}{Tangent\+Space\+Calc} ()
\item 
void \hyperlink{class_ogre_1_1_tangent_space_calc_aa15868f47d97e86805e75ee53ffe66a2}{add\+Index\+Data} (\hyperlink{class_ogre_1_1_index_data}{Index\+Data} $\ast$i\+\_\+in, \hyperlink{class_ogre_1_1_render_operation_a7a272218dae54048c87f31176c19e10d}{Render\+Operation\+::\+Operation\+Type} op\+Type=\hyperlink{class_ogre_1_1_render_operation_a7a272218dae54048c87f31176c19e10da8c00ee152b44fe8000c2fd675437c087}{Render\+Operation\+::\+O\+T\+\_\+\+T\+R\+I\+A\+N\+G\+L\+E\+\_\+\+L\+I\+ST})
\begin{DoxyCompactList}\small\item\em Add a set of index data that references the vertex data. \end{DoxyCompactList}\item 
\hyperlink{struct_ogre_1_1_tangent_space_calc_1_1_result}{Result} \hyperlink{class_ogre_1_1_tangent_space_calc_a57b5fd6b859dd9378bcebeb6882352d1}{build} (\hyperlink{group___render_system_ga0a62b3f2ede8992ff365bb013a8bc00d}{Vertex\+Element\+Semantic} target\+Semantic=\hyperlink{group___render_system_gga0a62b3f2ede8992ff365bb013a8bc00da57d43012049b3ec7b4240b207dd029f2}{V\+E\+S\+\_\+\+T\+A\+N\+G\+E\+NT}, unsigned short source\+Tex\+Coord\+Set=0, unsigned short index=1)
\begin{DoxyCompactList}\small\item\em Build a tangent space basis from the provided data. \end{DoxyCompactList}\item 
void \hyperlink{class_ogre_1_1_tangent_space_calc_afd150caf2af93ec05fcbc836641e894a}{clear} ()
\begin{DoxyCompactList}\small\item\em Reset the calculation object. \end{DoxyCompactList}\item 
bool \hyperlink{class_ogre_1_1_tangent_space_calc_aff282be1144cc20f9eb669fcb33393c2}{get\+Split\+Mirrored} () const
\begin{DoxyCompactList}\small\item\em Gets whether or not to split vertices when a mirrored tangent space transition is detected. \end{DoxyCompactList}\item 
bool \hyperlink{class_ogre_1_1_tangent_space_calc_a2108f7fcd81d75bf2417f2ca45244f3e}{get\+Split\+Rotated} () const
\begin{DoxyCompactList}\small\item\em Sets whether or not to split vertices when tangent space rotates more than 90 degrees around a vertex. \end{DoxyCompactList}\item 
bool \hyperlink{class_ogre_1_1_tangent_space_calc_a9edb082fa98b5cbe85034c1abe7d02f6}{get\+Store\+Parity\+InW} () const
\begin{DoxyCompactList}\small\item\em Gets whether to store tangent space parity in the W of a 4-\/component tangent or not. \end{DoxyCompactList}\item 
void \hyperlink{class_ogre_1_1_tangent_space_calc_a43107313dd9e1fefb5a0f0760792ac45}{set\+Split\+Mirrored} (bool split)
\begin{DoxyCompactList}\small\item\em Sets whether or not to split vertices when a mirrored tangent space transition is detected (matrix parity differs). \end{DoxyCompactList}\item 
void \hyperlink{class_ogre_1_1_tangent_space_calc_a3b9ef4ec951f3a95e40697d7c6637a7d}{set\+Split\+Rotated} (bool split)
\begin{DoxyCompactList}\small\item\em Sets whether or not to split vertices when tangent space rotates more than 90 degrees around a vertex. \end{DoxyCompactList}\item 
void \hyperlink{class_ogre_1_1_tangent_space_calc_a637794857196e7b6bec4974b97ee5a50}{set\+Store\+Parity\+InW} (bool enabled)
\begin{DoxyCompactList}\small\item\em Sets whether to store tangent space parity in the W of a 4-\/component tangent or not. \end{DoxyCompactList}\item 
void \hyperlink{class_ogre_1_1_tangent_space_calc_aac1530e73ac67068755e65063965fe98}{set\+Vertex\+Data} (\hyperlink{class_ogre_1_1_vertex_data}{Vertex\+Data} $\ast$v\+\_\+in)
\begin{DoxyCompactList}\small\item\em Set the incoming vertex data (which will be modified) \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Class for calculating a tangent space basis. 

\subsection{Member Typedef Documentation}
\mbox{\Hypertarget{class_ogre_1_1_tangent_space_calc_af7248e9a56104604d70decacbddc24b6}\label{class_ogre_1_1_tangent_space_calc_af7248e9a56104604d70decacbddc24b6}} 
\index{Ogre\+::\+Tangent\+Space\+Calc@{Ogre\+::\+Tangent\+Space\+Calc}!Vertex\+Split@{Vertex\+Split}}
\index{Vertex\+Split@{Vertex\+Split}!Ogre\+::\+Tangent\+Space\+Calc@{Ogre\+::\+Tangent\+Space\+Calc}}
\subsubsection{\texorpdfstring{Vertex\+Split}{VertexSplit}}
{\footnotesize\ttfamily typedef std\+::pair$<$size\+\_\+t, size\+\_\+t$>$ \hyperlink{class_ogre_1_1_tangent_space_calc_af7248e9a56104604d70decacbddc24b6}{Ogre\+::\+Tangent\+Space\+Calc\+::\+Vertex\+Split}}

\mbox{\Hypertarget{class_ogre_1_1_tangent_space_calc_af7aa66e32c70fac39f0c518393015321}\label{class_ogre_1_1_tangent_space_calc_af7aa66e32c70fac39f0c518393015321}} 
\index{Ogre\+::\+Tangent\+Space\+Calc@{Ogre\+::\+Tangent\+Space\+Calc}!Index\+Remap\+List@{Index\+Remap\+List}}
\index{Index\+Remap\+List@{Index\+Remap\+List}!Ogre\+::\+Tangent\+Space\+Calc@{Ogre\+::\+Tangent\+Space\+Calc}}
\subsubsection{\texorpdfstring{Index\+Remap\+List}{IndexRemapList}}
{\footnotesize\ttfamily typedef std\+::list$<$\hyperlink{struct_ogre_1_1_tangent_space_calc_1_1_index_remap}{Index\+Remap}$>$ \hyperlink{class_ogre_1_1_tangent_space_calc_af7aa66e32c70fac39f0c518393015321}{Ogre\+::\+Tangent\+Space\+Calc\+::\+Index\+Remap\+List}}



List of indexes that were remapped (split vertices). 

\mbox{\Hypertarget{class_ogre_1_1_tangent_space_calc_aba0d535d599204aa3b58fe0717b8bbb5}\label{class_ogre_1_1_tangent_space_calc_aba0d535d599204aa3b58fe0717b8bbb5}} 
\index{Ogre\+::\+Tangent\+Space\+Calc@{Ogre\+::\+Tangent\+Space\+Calc}!Vertex\+Splits@{Vertex\+Splits}}
\index{Vertex\+Splits@{Vertex\+Splits}!Ogre\+::\+Tangent\+Space\+Calc@{Ogre\+::\+Tangent\+Space\+Calc}}
\subsubsection{\texorpdfstring{Vertex\+Splits}{VertexSplits}}
{\footnotesize\ttfamily typedef std\+::list$<$\hyperlink{class_ogre_1_1_tangent_space_calc_af7248e9a56104604d70decacbddc24b6}{Vertex\+Split}$>$ \hyperlink{class_ogre_1_1_tangent_space_calc_aba0d535d599204aa3b58fe0717b8bbb5}{Ogre\+::\+Tangent\+Space\+Calc\+::\+Vertex\+Splits}}



\subsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{class_ogre_1_1_tangent_space_calc_a33eeb35f74cfa2d2c90ab7b138763752}\label{class_ogre_1_1_tangent_space_calc_a33eeb35f74cfa2d2c90ab7b138763752}} 
\index{Ogre\+::\+Tangent\+Space\+Calc@{Ogre\+::\+Tangent\+Space\+Calc}!Tangent\+Space\+Calc@{Tangent\+Space\+Calc}}
\index{Tangent\+Space\+Calc@{Tangent\+Space\+Calc}!Ogre\+::\+Tangent\+Space\+Calc@{Ogre\+::\+Tangent\+Space\+Calc}}
\subsubsection{\texorpdfstring{Tangent\+Space\+Calc()}{TangentSpaceCalc()}}
{\footnotesize\ttfamily Ogre\+::\+Tangent\+Space\+Calc\+::\+Tangent\+Space\+Calc (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



\subsection{Member Function Documentation}
\mbox{\Hypertarget{class_ogre_1_1_tangent_space_calc_afd150caf2af93ec05fcbc836641e894a}\label{class_ogre_1_1_tangent_space_calc_afd150caf2af93ec05fcbc836641e894a}} 
\index{Ogre\+::\+Tangent\+Space\+Calc@{Ogre\+::\+Tangent\+Space\+Calc}!clear@{clear}}
\index{clear@{clear}!Ogre\+::\+Tangent\+Space\+Calc@{Ogre\+::\+Tangent\+Space\+Calc}}
\subsubsection{\texorpdfstring{clear()}{clear()}}
{\footnotesize\ttfamily void Ogre\+::\+Tangent\+Space\+Calc\+::clear (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Reset the calculation object. 

\mbox{\Hypertarget{class_ogre_1_1_tangent_space_calc_aac1530e73ac67068755e65063965fe98}\label{class_ogre_1_1_tangent_space_calc_aac1530e73ac67068755e65063965fe98}} 
\index{Ogre\+::\+Tangent\+Space\+Calc@{Ogre\+::\+Tangent\+Space\+Calc}!set\+Vertex\+Data@{set\+Vertex\+Data}}
\index{set\+Vertex\+Data@{set\+Vertex\+Data}!Ogre\+::\+Tangent\+Space\+Calc@{Ogre\+::\+Tangent\+Space\+Calc}}
\subsubsection{\texorpdfstring{set\+Vertex\+Data()}{setVertexData()}}
{\footnotesize\ttfamily void Ogre\+::\+Tangent\+Space\+Calc\+::set\+Vertex\+Data (\begin{DoxyParamCaption}\item[{\hyperlink{class_ogre_1_1_vertex_data}{Vertex\+Data} $\ast$}]{v\+\_\+in }\end{DoxyParamCaption})}



Set the incoming vertex data (which will be modified) 

\mbox{\Hypertarget{class_ogre_1_1_tangent_space_calc_aa15868f47d97e86805e75ee53ffe66a2}\label{class_ogre_1_1_tangent_space_calc_aa15868f47d97e86805e75ee53ffe66a2}} 
\index{Ogre\+::\+Tangent\+Space\+Calc@{Ogre\+::\+Tangent\+Space\+Calc}!add\+Index\+Data@{add\+Index\+Data}}
\index{add\+Index\+Data@{add\+Index\+Data}!Ogre\+::\+Tangent\+Space\+Calc@{Ogre\+::\+Tangent\+Space\+Calc}}
\subsubsection{\texorpdfstring{add\+Index\+Data()}{addIndexData()}}
{\footnotesize\ttfamily void Ogre\+::\+Tangent\+Space\+Calc\+::add\+Index\+Data (\begin{DoxyParamCaption}\item[{\hyperlink{class_ogre_1_1_index_data}{Index\+Data} $\ast$}]{i\+\_\+in,  }\item[{\hyperlink{class_ogre_1_1_render_operation_a7a272218dae54048c87f31176c19e10d}{Render\+Operation\+::\+Operation\+Type}}]{op\+Type = {\ttfamily \hyperlink{class_ogre_1_1_render_operation_a7a272218dae54048c87f31176c19e10da8c00ee152b44fe8000c2fd675437c087}{Render\+Operation\+::\+O\+T\+\_\+\+T\+R\+I\+A\+N\+G\+L\+E\+\_\+\+L\+I\+ST}} }\end{DoxyParamCaption})}



Add a set of index data that references the vertex data. 

This might be modified if there are vertex splits. \mbox{\Hypertarget{class_ogre_1_1_tangent_space_calc_a637794857196e7b6bec4974b97ee5a50}\label{class_ogre_1_1_tangent_space_calc_a637794857196e7b6bec4974b97ee5a50}} 
\index{Ogre\+::\+Tangent\+Space\+Calc@{Ogre\+::\+Tangent\+Space\+Calc}!set\+Store\+Parity\+InW@{set\+Store\+Parity\+InW}}
\index{set\+Store\+Parity\+InW@{set\+Store\+Parity\+InW}!Ogre\+::\+Tangent\+Space\+Calc@{Ogre\+::\+Tangent\+Space\+Calc}}
\subsubsection{\texorpdfstring{set\+Store\+Parity\+In\+W()}{setStoreParityInW()}}
{\footnotesize\ttfamily void Ogre\+::\+Tangent\+Space\+Calc\+::set\+Store\+Parity\+InW (\begin{DoxyParamCaption}\item[{bool}]{enabled }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Sets whether to store tangent space parity in the W of a 4-\/component tangent or not. 

\begin{DoxyRemark}{Remarks}
The default element format to use is V\+E\+T\+\_\+\+F\+L\+O\+A\+T3 which is enough to accurately deal with tangents that do not involve any texture coordinate mirroring. If you wish to allow UV mirroring in your model, you must enable 4-\/component tangents using this method, and the \textquotesingle{}w\textquotesingle{} co-\/ordinate will be populated with the parity of the triangle (+1 or -\/1), which will allow you to generate the bitangent properly. 
\end{DoxyRemark}

\begin{DoxyParams}{Parameters}
{\em enabled} & true to enable 4-\/component tangents (default false). If you enable this, you will probably also want to enable mirror splitting (see set\+Split\+Mirrored), and your shader must understand how to deal with the parity. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_ogre_1_1_tangent_space_calc_a9edb082fa98b5cbe85034c1abe7d02f6}\label{class_ogre_1_1_tangent_space_calc_a9edb082fa98b5cbe85034c1abe7d02f6}} 
\index{Ogre\+::\+Tangent\+Space\+Calc@{Ogre\+::\+Tangent\+Space\+Calc}!get\+Store\+Parity\+InW@{get\+Store\+Parity\+InW}}
\index{get\+Store\+Parity\+InW@{get\+Store\+Parity\+InW}!Ogre\+::\+Tangent\+Space\+Calc@{Ogre\+::\+Tangent\+Space\+Calc}}
\subsubsection{\texorpdfstring{get\+Store\+Parity\+In\+W()}{getStoreParityInW()}}
{\footnotesize\ttfamily bool Ogre\+::\+Tangent\+Space\+Calc\+::get\+Store\+Parity\+InW (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Gets whether to store tangent space parity in the W of a 4-\/component tangent or not. 

\mbox{\Hypertarget{class_ogre_1_1_tangent_space_calc_a43107313dd9e1fefb5a0f0760792ac45}\label{class_ogre_1_1_tangent_space_calc_a43107313dd9e1fefb5a0f0760792ac45}} 
\index{Ogre\+::\+Tangent\+Space\+Calc@{Ogre\+::\+Tangent\+Space\+Calc}!set\+Split\+Mirrored@{set\+Split\+Mirrored}}
\index{set\+Split\+Mirrored@{set\+Split\+Mirrored}!Ogre\+::\+Tangent\+Space\+Calc@{Ogre\+::\+Tangent\+Space\+Calc}}
\subsubsection{\texorpdfstring{set\+Split\+Mirrored()}{setSplitMirrored()}}
{\footnotesize\ttfamily void Ogre\+::\+Tangent\+Space\+Calc\+::set\+Split\+Mirrored (\begin{DoxyParamCaption}\item[{bool}]{split }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Sets whether or not to split vertices when a mirrored tangent space transition is detected (matrix parity differs). 

\begin{DoxyRemark}{Remarks}
This defaults to \textquotesingle{}off\textquotesingle{} because it\textquotesingle{}s the safest option; tangents will be interpolated in all cases even if they don\textquotesingle{}t agree around a vertex, so artefacts will be smoothed out. When you\textquotesingle{}re using art assets of unknown quality this can avoid extra seams on the visible surface. However, if your artists are good, they will be hiding texture seams in folds of the model and thus you can turn this option on, which will prevent the results of those seams from getting smoothed into other areas, which is exactly what you want. 
\end{DoxyRemark}
\begin{DoxyNote}{Note}
This option is automatically disabled if you provide any strip or fan based geometry. 
\end{DoxyNote}
\mbox{\Hypertarget{class_ogre_1_1_tangent_space_calc_aff282be1144cc20f9eb669fcb33393c2}\label{class_ogre_1_1_tangent_space_calc_aff282be1144cc20f9eb669fcb33393c2}} 
\index{Ogre\+::\+Tangent\+Space\+Calc@{Ogre\+::\+Tangent\+Space\+Calc}!get\+Split\+Mirrored@{get\+Split\+Mirrored}}
\index{get\+Split\+Mirrored@{get\+Split\+Mirrored}!Ogre\+::\+Tangent\+Space\+Calc@{Ogre\+::\+Tangent\+Space\+Calc}}
\subsubsection{\texorpdfstring{get\+Split\+Mirrored()}{getSplitMirrored()}}
{\footnotesize\ttfamily bool Ogre\+::\+Tangent\+Space\+Calc\+::get\+Split\+Mirrored (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Gets whether or not to split vertices when a mirrored tangent space transition is detected. 

\mbox{\Hypertarget{class_ogre_1_1_tangent_space_calc_a3b9ef4ec951f3a95e40697d7c6637a7d}\label{class_ogre_1_1_tangent_space_calc_a3b9ef4ec951f3a95e40697d7c6637a7d}} 
\index{Ogre\+::\+Tangent\+Space\+Calc@{Ogre\+::\+Tangent\+Space\+Calc}!set\+Split\+Rotated@{set\+Split\+Rotated}}
\index{set\+Split\+Rotated@{set\+Split\+Rotated}!Ogre\+::\+Tangent\+Space\+Calc@{Ogre\+::\+Tangent\+Space\+Calc}}
\subsubsection{\texorpdfstring{set\+Split\+Rotated()}{setSplitRotated()}}
{\footnotesize\ttfamily void Ogre\+::\+Tangent\+Space\+Calc\+::set\+Split\+Rotated (\begin{DoxyParamCaption}\item[{bool}]{split }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Sets whether or not to split vertices when tangent space rotates more than 90 degrees around a vertex. 

\begin{DoxyRemark}{Remarks}
This defaults to \textquotesingle{}off\textquotesingle{} because it\textquotesingle{}s the safest option; tangents will be interpolated in all cases even if they don\textquotesingle{}t agree around a vertex, so artefacts will be smoothed out. When you\textquotesingle{}re using art assets of unknown quality this can avoid extra seams on the visible surface. However, if your artists are good, they will be hiding texture inconsistencies in folds of the model and thus you can turn this option on, which will prevent the results of those seams from getting smoothed into other areas, which is exactly what you want. 
\end{DoxyRemark}
\begin{DoxyNote}{Note}
This option is automatically disabled if you provide any strip or fan based geometry. 
\end{DoxyNote}
\mbox{\Hypertarget{class_ogre_1_1_tangent_space_calc_a2108f7fcd81d75bf2417f2ca45244f3e}\label{class_ogre_1_1_tangent_space_calc_a2108f7fcd81d75bf2417f2ca45244f3e}} 
\index{Ogre\+::\+Tangent\+Space\+Calc@{Ogre\+::\+Tangent\+Space\+Calc}!get\+Split\+Rotated@{get\+Split\+Rotated}}
\index{get\+Split\+Rotated@{get\+Split\+Rotated}!Ogre\+::\+Tangent\+Space\+Calc@{Ogre\+::\+Tangent\+Space\+Calc}}
\subsubsection{\texorpdfstring{get\+Split\+Rotated()}{getSplitRotated()}}
{\footnotesize\ttfamily bool Ogre\+::\+Tangent\+Space\+Calc\+::get\+Split\+Rotated (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Sets whether or not to split vertices when tangent space rotates more than 90 degrees around a vertex. 



References Ogre\+::\+Tangent\+Space\+Calc\+::\+Index\+Remap\+::face\+Index, Ogre\+::\+Tangent\+Space\+Calc\+::\+Result\+::indexes\+Remapped, Ogre\+::\+Tangent\+Space\+Calc\+::\+Index\+Remap\+::index\+Set, Ogre\+::\+Tangent\+Space\+Calc\+::\+Index\+Remap\+::split\+Vertex, Ogre\+::\+V\+E\+S\+\_\+\+T\+A\+N\+G\+E\+NT, and Ogre\+::\+Vector3\+::\+Z\+E\+RO.

\mbox{\Hypertarget{class_ogre_1_1_tangent_space_calc_a57b5fd6b859dd9378bcebeb6882352d1}\label{class_ogre_1_1_tangent_space_calc_a57b5fd6b859dd9378bcebeb6882352d1}} 
\index{Ogre\+::\+Tangent\+Space\+Calc@{Ogre\+::\+Tangent\+Space\+Calc}!build@{build}}
\index{build@{build}!Ogre\+::\+Tangent\+Space\+Calc@{Ogre\+::\+Tangent\+Space\+Calc}}
\subsubsection{\texorpdfstring{build()}{build()}}
{\footnotesize\ttfamily \hyperlink{struct_ogre_1_1_tangent_space_calc_1_1_result}{Result} Ogre\+::\+Tangent\+Space\+Calc\+::build (\begin{DoxyParamCaption}\item[{\hyperlink{group___render_system_ga0a62b3f2ede8992ff365bb013a8bc00d}{Vertex\+Element\+Semantic}}]{target\+Semantic = {\ttfamily \hyperlink{group___render_system_gga0a62b3f2ede8992ff365bb013a8bc00da57d43012049b3ec7b4240b207dd029f2}{V\+E\+S\+\_\+\+T\+A\+N\+G\+E\+NT}},  }\item[{unsigned short}]{source\+Tex\+Coord\+Set = {\ttfamily 0},  }\item[{unsigned short}]{index = {\ttfamily 1} }\end{DoxyParamCaption})}



Build a tangent space basis from the provided data. 

\begin{DoxyRemark}{Remarks}
Only indexed triangle lists are allowed. Strips and fans cannot be supported because it may be necessary to split the geometry up to respect deviances in the tangent space basis better. 
\end{DoxyRemark}

\begin{DoxyParams}{Parameters}
{\em target\+Semantic} & The semantic to store the tangents in. Defaults to the explicit tangent binding, but note that this is only usable on more modern hardware (Shader Model 2), so if you need portability with older cards you should change this to a texture coordinate binding instead. \\
\hline
{\em source\+Tex\+Coord\+Set} & The texture coordinate index which should be used as the source of 2D texture coordinates, with which to calculate the tangents. \\
\hline
{\em index} & The element index, ie the texture coordinate set which should be used to store the 3D coordinates representing a tangent vector per vertex, if target\+Semantic is V\+E\+S\+\_\+\+T\+E\+X\+T\+U\+R\+E\+\_\+\+C\+O\+O\+R\+D\+I\+N\+A\+T\+ES. If this already exists, it will be overwritten. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A structure containing the results of the tangent space build. Vertex data will always be modified but it\textquotesingle{}s also possible that the index data could be adjusted. This happens when mirroring is used on a mesh, which causes the tangent space to be inverted on opposite sides of an edge. This is discontinuous, therefore the vertices have to be split along this edge, resulting in new vertices. 
\end{DoxyReturn}


The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
\hyperlink{_ogre_tangent_space_calc_8h}{Ogre\+Tangent\+Space\+Calc.\+h}\end{DoxyCompactItemize}
