\hypertarget{a00996}{\section{Pose\+T$<$ Point\+T $>$ Class Template Reference}
\label{a00996}\index{Pose\+T$<$ Point\+T $>$@{Pose\+T$<$ Point\+T $>$}}
}


A general pose, used to store the frames of the animation.  




{\ttfamily \#include $<$Object\+Types/\+Skeleton/\+Pose\+T.\+hh$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{a00996_a5a9d4e97c56496891eb33790585dde36}{Pose\+T} (\hyperlink{a01190}{Skeleton\+T}$<$ Point $>$ $\ast$\+\_\+skeleton)
\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item 
\hyperlink{a00996_ae35c56f35d46493438aa4253234d3cf6}{Pose\+T} (const \hyperlink{a00996}{Pose\+T}$<$ Point\+T $>$ \&\+\_\+other)
\begin{DoxyCompactList}\small\item\em Copy Constructor. \end{DoxyCompactList}\item 
\hypertarget{a00996_a706a4caa1db574b4c3ee0beeca6ac366}{virtual \hyperlink{a00996_a706a4caa1db574b4c3ee0beeca6ac366}{$\sim$\+Pose\+T} ()}\label{a00996_a706a4caa1db574b4c3ee0beeca6ac366}

\begin{DoxyCompactList}\small\item\em Destructor. \end{DoxyCompactList}\end{DoxyCompactItemize}
\begin{Indent}{\bf Pose editing}\par
{\em \label{a00996_PoseEditing}%
\hypertarget{a00996_PoseEditing}{}%
 These methods update the other coordinate systems, changing the local coordinates will also change the global and vice versa. }\begin{DoxyCompactItemize}
\item 
const \hyperlink{a00797}{Matrix} \& \hyperlink{a00996_a573488c3420491bab0ca4fbc9ba07fd6}{local\+Matrix} (unsigned int \+\_\+joint) const 
\begin{DoxyCompactList}\small\item\em Returns the local matrix for the given joint. \end{DoxyCompactList}\item 
void \hyperlink{a00996_a09a23fe006d4efaadc71d3e731a205a6}{set\+Local\+Matrix} (unsigned int \+\_\+joint, const \hyperlink{a00797}{Matrix} \&\+\_\+local, bool \+\_\+keep\+Local\+Child\+Positions=true)
\begin{DoxyCompactList}\small\item\em Sets the local coordinate system. \end{DoxyCompactList}\item 
\hyperlink{a01409}{Vector} \hyperlink{a00996_aac5274f01beab1731d92aa2c4f6675f2}{local\+Translation} (unsigned int \+\_\+joint)
\begin{DoxyCompactList}\small\item\em Returns the local translation vector. \end{DoxyCompactList}\item 
void \hyperlink{a00996_a7903b555811eafb67204e829bd286d95}{set\+Local\+Translation} (unsigned int \+\_\+joint, const \hyperlink{a01409}{Vector} \&\+\_\+position, bool \+\_\+keep\+Local\+Child\+Positions=true)
\begin{DoxyCompactList}\small\item\em Sets the local translation vector. \end{DoxyCompactList}\item 
\hypertarget{a00996_a2cbdd9d274d567090119fbff77ad1d66}{\hyperlink{a00797}{Matrix} \hyperlink{a00996_a2cbdd9d274d567090119fbff77ad1d66}{local\+Matrix\+Inv} (unsigned int \+\_\+joint) const }\label{a00996_a2cbdd9d274d567090119fbff77ad1d66}

\begin{DoxyCompactList}\small\item\em Simply returns the inverse of the local matrix. \end{DoxyCompactList}\item 
const \hyperlink{a00797}{Matrix} \& \hyperlink{a00996_ab89f36bd560bdfd0bc4e44f850c006fd}{global\+Matrix} (unsigned int \+\_\+joint) const 
\begin{DoxyCompactList}\small\item\em Returns the global matrix for the given joint. \end{DoxyCompactList}\item 
void \hyperlink{a00996_abb3b80190a71cedef449b0e28669de32}{set\+Global\+Matrix} (unsigned int \+\_\+joint, const \hyperlink{a00797}{Matrix} \&\+\_\+global, bool \+\_\+keep\+Global\+Child\+Positions=true)
\begin{DoxyCompactList}\small\item\em Sets the global coordinate system. \end{DoxyCompactList}\item 
\hyperlink{a01409}{Vector} \hyperlink{a00996_ac6c29e6e544e09a06a3ff17554125fe8}{global\+Translation} (unsigned int \+\_\+joint)
\begin{DoxyCompactList}\small\item\em Returns the global translation vector. \end{DoxyCompactList}\item 
void \hyperlink{a00996_a4ea35b6a61485ed152ba2f3e9ca010d3}{set\+Global\+Translation} (unsigned int \+\_\+joint, const \hyperlink{a01409}{Vector} \&\+\_\+position, bool \+\_\+keep\+Global\+Child\+Positions=true)
\begin{DoxyCompactList}\small\item\em Sets the global translation vector. \end{DoxyCompactList}\item 
virtual \hyperlink{a00797}{Matrix} \hyperlink{a00996_a88fdd11ae46e96304e186fa0bdafe423}{global\+Matrix\+Inv} (unsigned int \+\_\+joint) const 
\begin{DoxyCompactList}\small\item\em Simply returns the inverse of the global matrix. \end{DoxyCompactList}\end{DoxyCompactItemize}
\end{Indent}
\begin{Indent}{\bf Synchronization}\par
{\em Use these methods to keep the pose in sync with the number (and indices) of the joints. }\begin{DoxyCompactItemize}
\item 
virtual void \hyperlink{a00996_a801251494f8116df9f442e446d993167}{insert\+Joint\+At} (unsigned int \+\_\+index)
\begin{DoxyCompactList}\small\item\em Called by the skeleton/animation as a new joint is inserted. \end{DoxyCompactList}\item 
virtual void \hyperlink{a00996_ac5b6fcccb9ea2ddc0c1a5b15d6b96d07}{remove\+Joint\+At} (unsigned int \+\_\+index)
\begin{DoxyCompactList}\small\item\em Called by the skeleton/animation as a joint is removed. \end{DoxyCompactList}\end{DoxyCompactItemize}
\end{Indent}
\begin{Indent}{\bf Unified Matrices}\par
{\em \label{a00996_UnifiedMatrices}%
\hypertarget{a00996_UnifiedMatrices}{}%
 Use these methods to gain access to the precalculations performed by this derivation. }\begin{DoxyCompactItemize}
\item 
const \hyperlink{a00797}{Matrix} \& \hyperlink{a00996_a4728134cf798467485eed51a608fbe8d}{unified\+Matrix} (unsigned int \+\_\+joint)
\begin{DoxyCompactList}\small\item\em Returns the unified matrix. \end{DoxyCompactList}\item 
const \hyperlink{a01092}{Quaternion} \& \hyperlink{a00996_aa0e48e83de6b205d10d844eb800b532b}{unified\+Rotation} (unsigned int \+\_\+joint)
\begin{DoxyCompactList}\small\item\em Returns a quaternion holding the rotational part of the unified matrix. \end{DoxyCompactList}\item 
const \hyperlink{a00514}{Dual\+Quaternion} \& \hyperlink{a00996_aaae29998a1edeb9f9db187c5b1d22eb9}{unified\+Dual\+Quaternion} (unsigned int \+\_\+joint)
\begin{DoxyCompactList}\small\item\em Returns a dual quaternion holding the unified matrix represented as dual quaternion. \end{DoxyCompactList}\end{DoxyCompactItemize}
\end{Indent}
\subsection*{Protected Types}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a00996_af368c240c2973962daac54ae7e3d27cf}{typedef Point\+T {\bfseries Point}}\label{a00996_af368c240c2973962daac54ae7e3d27cf}

\item 
\hypertarget{a00996_a468709dd74920ce080dc720ce4cf7746}{typedef Point\+::value\+\_\+type {\bfseries Scalar}}\label{a00996_a468709dd74920ce080dc720ce4cf7746}

\item 
\hypertarget{a00996_a62dfae59bca4fb29396e574bdd1bdd3d}{typedef \hyperlink{a01409}{A\+C\+G\+::\+Vector\+T}$<$ Scalar, 3 $>$ {\bfseries Vector}}\label{a00996_a62dfae59bca4fb29396e574bdd1bdd3d}

\item 
\hypertarget{a00996_aae6c6b4a485383840861edc586e525b7}{typedef \hyperlink{a00797}{A\+C\+G\+::\+Matrix4x4\+T}$<$ Scalar $>$ {\bfseries Matrix}}\label{a00996_aae6c6b4a485383840861edc586e525b7}

\item 
\hypertarget{a00996_abb89ad9dccf2ce4882fe185be6c482c2}{typedef \hyperlink{a01092}{A\+C\+G\+::\+Quaternion\+T}$<$ Scalar $>$ {\bfseries Quaternion}}\label{a00996_abb89ad9dccf2ce4882fe185be6c482c2}

\item 
\hypertarget{a00996_a4473520e3f92ef7c3cbf2e0530eff809}{typedef \hyperlink{a00514}{A\+C\+G\+::\+Dual\+Quaternion\+T}\\*
$<$ Scalar $>$ {\bfseries Dual\+Quaternion}}\label{a00996_a4473520e3f92ef7c3cbf2e0530eff809}

\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{Indent}{\bf Coordinate system update methods}\par
{\em These methods propagate the change in one of the coordinate systems into the other. This will keep intact the children nodes' positions per default (by recursively updating all children.). This behavior can be influenced via the \+\_\+keep\+Child\+Positions parameter. }\begin{DoxyCompactItemize}
\item 
void \hyperlink{a00996_a34abac5dcdc359468ef4f0e8a7bd1dfa}{update\+From\+Local} (unsigned int \+\_\+joint, bool \+\_\+keep\+Child\+Positions=true)
\begin{DoxyCompactList}\small\item\em This method propagates the change in the local coordinate system to the global system and all children. \end{DoxyCompactList}\item 
void \hyperlink{a00996_a24473b2174c40af1b11ffcbdbc6dadea}{update\+From\+Global} (unsigned int \+\_\+joint, bool \+\_\+keep\+Child\+Positions=true)
\begin{DoxyCompactList}\small\item\em This method propagates the change in the global coordinate system to the local system and all children. \end{DoxyCompactList}\end{DoxyCompactItemize}
\end{Indent}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a00996_a190ff4824527354641dc543e24c33e68}{\hyperlink{a01190}{Skeleton\+T}$<$ Point\+T $>$ $\ast$ \hyperlink{a00996_a190ff4824527354641dc543e24c33e68}{skeleton\+\_\+}}\label{a00996_a190ff4824527354641dc543e24c33e68}

\begin{DoxyCompactList}\small\item\em a pointer to the skeleton \end{DoxyCompactList}\item 
\hypertarget{a00996_a9af0b6c3af4272a9d5460a60018eb452}{std\+::vector$<$ \hyperlink{a00797}{Matrix} $>$ \hyperlink{a00996_a9af0b6c3af4272a9d5460a60018eb452}{local\+\_\+}}\label{a00996_a9af0b6c3af4272a9d5460a60018eb452}

\begin{DoxyCompactList}\small\item\em the pose in local coordinates \end{DoxyCompactList}\item 
\hypertarget{a00996_a0c76f19d55d359415d220ce62b922aeb}{std\+::vector$<$ \hyperlink{a00797}{Matrix} $>$ \hyperlink{a00996_a0c76f19d55d359415d220ce62b922aeb}{global\+\_\+}}\label{a00996_a0c76f19d55d359415d220ce62b922aeb}

\begin{DoxyCompactList}\small\item\em the pose in global coordinates \end{DoxyCompactList}\item 
\hypertarget{a00996_af63a7e93df27e04e95444220d88de4fa}{std\+::vector$<$ \hyperlink{a00797}{Matrix} $>$ \hyperlink{a00996_af63a7e93df27e04e95444220d88de4fa}{unified\+\_\+}}\label{a00996_af63a7e93df27e04e95444220d88de4fa}

\begin{DoxyCompactList}\small\item\em the global pose matrix left-\/multiplied to the inverse global reference matrix\+: $ M_{pose} \cdot M^{-1}_{reference} $ \end{DoxyCompactList}\item 
std\+::vector$<$ \hyperlink{a00514}{Dual\+Quaternion} $>$ \hyperlink{a00996_a83f6b4ed724159f2a28db5de68ca06a6}{unified\+Dual\+Quaternion\+\_\+}
\end{DoxyCompactItemize}
\subsection*{Friends}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a00996_a9c68027d454364bb949026efa3c2df9a}{{\footnotesize template$<$typename $>$ }\\class {\bfseries Skeleton\+T}}\label{a00996_a9c68027d454364bb949026efa3c2df9a}

\item 
\hypertarget{a00996_abc60cfa7b53cea6a967cf23baabf58a9}{{\footnotesize template$<$typename $>$ }\\class {\bfseries Animation\+T}}\label{a00996_abc60cfa7b53cea6a967cf23baabf58a9}

\item 
\hypertarget{a00996_afa541f8158246f2d1f3fc8822d774ea3}{{\footnotesize template$<$typename $>$ }\\class {\bfseries Frame\+Animation\+T}}\label{a00996_afa541f8158246f2d1f3fc8822d774ea3}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$typename Point\+T$>$class Pose\+T$<$ Point\+T $>$}

A general pose, used to store the frames of the animation. 

Definition at line 68 of file Pose\+T.\+hh.



\subsection{Constructor \& Destructor Documentation}
\hypertarget{a00996_a5a9d4e97c56496891eb33790585dde36}{\index{Pose\+T@{Pose\+T}!Pose\+T@{Pose\+T}}
\index{Pose\+T@{Pose\+T}!Pose\+T@{Pose\+T}}
\subsubsection[{Pose\+T}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Point\+T $>$ {\bf Pose\+T}$<$ Point\+T $>$\+::{\bf Pose\+T} (
\begin{DoxyParamCaption}
\item[{{\bf Skeleton\+T}$<$ Point $>$ $\ast$}]{\+\_\+skeleton}
\end{DoxyParamCaption}
)}}\label{a00996_a5a9d4e97c56496891eb33790585dde36}


Constructor. 

Constructor for a new pose.

The pose will automatically be equipped with the right number of fields for the joints stored in the skeleton. Just fill them with data.


\begin{DoxyParams}{Parameters}
{\em \+\_\+skeleton} & The skeleton that owns this pose \\
\hline
\end{DoxyParams}


Definition at line 65 of file Pose\+T.\+cc.

\hypertarget{a00996_ae35c56f35d46493438aa4253234d3cf6}{\index{Pose\+T@{Pose\+T}!Pose\+T@{Pose\+T}}
\index{Pose\+T@{Pose\+T}!Pose\+T@{Pose\+T}}
\subsubsection[{Pose\+T}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Point\+T$>$ {\bf Pose\+T}$<$ Point\+T $>$\+::{\bf Pose\+T} (
\begin{DoxyParamCaption}
\item[{const {\bf Pose\+T}$<$ Point\+T $>$ \&}]{\+\_\+other}
\end{DoxyParamCaption}
)}}\label{a00996_ae35c56f35d46493438aa4253234d3cf6}


Copy Constructor. 

Copy constructor.

Creates an independent copy of the given pose. 

Definition at line 82 of file Pose\+T.\+cc.



\subsection{Member Function Documentation}
\hypertarget{a00996_ab89f36bd560bdfd0bc4e44f850c006fd}{\index{Pose\+T@{Pose\+T}!global\+Matrix@{global\+Matrix}}
\index{global\+Matrix@{global\+Matrix}!Pose\+T@{Pose\+T}}
\subsubsection[{global\+Matrix}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Point\+T $>$ const {\bf Pose\+T}$<$ Point\+T $>$\+::{\bf Matrix} \& {\bf Pose\+T}$<$ Point\+T $>$\+::global\+Matrix (
\begin{DoxyParamCaption}
\item[{unsigned int}]{\+\_\+joint}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}}\label{a00996_ab89f36bd560bdfd0bc4e44f850c006fd}


Returns the global matrix for the given joint. 

global matrix manipulation the global matrix represents a joints orientation/translation in global coordinates

The global Matrix defines the transformation from bone coordinates back into global world coordinates.


\begin{DoxyParams}{Parameters}
{\em \+\_\+joint} & The joints index, same as for \hyperlink{a01190_a2aa22e9b07c72f616712f8c67e8ae0d5}{Skeleton\+T$<$$>$\+::joint} \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The global matrix, relative to world coordinates 
\end{DoxyReturn}


Definition at line 199 of file Pose\+T.\+cc.

\hypertarget{a00996_a88fdd11ae46e96304e186fa0bdafe423}{\index{Pose\+T@{Pose\+T}!global\+Matrix\+Inv@{global\+Matrix\+Inv}}
\index{global\+Matrix\+Inv@{global\+Matrix\+Inv}!Pose\+T@{Pose\+T}}
\subsubsection[{global\+Matrix\+Inv}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Point\+T $>$ {\bf Pose\+T}$<$ Point\+T $>$\+::{\bf Matrix} {\bf Pose\+T}$<$ Point\+T $>$\+::global\+Matrix\+Inv (
\begin{DoxyParamCaption}
\item[{unsigned int}]{\+\_\+joint}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [virtual]}}}\label{a00996_a88fdd11ae46e96304e186fa0bdafe423}


Simply returns the inverse of the global matrix. 

The inverse of the global Matrix defines the transformation from global world coordinates in the currently active pose into bone coordinates. 

Definition at line 273 of file Pose\+T.\+cc.

\hypertarget{a00996_ac6c29e6e544e09a06a3ff17554125fe8}{\index{Pose\+T@{Pose\+T}!global\+Translation@{global\+Translation}}
\index{global\+Translation@{global\+Translation}!Pose\+T@{Pose\+T}}
\subsubsection[{global\+Translation}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Point\+T $>$ {\bf Pose\+T}$<$ Point\+T $>$\+::{\bf Vector} {\bf Pose\+T}$<$ Point\+T $>$\+::global\+Translation (
\begin{DoxyParamCaption}
\item[{unsigned int}]{\+\_\+joint}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{a00996_ac6c29e6e544e09a06a3ff17554125fe8}


Returns the global translation vector. 


\begin{DoxyParams}{Parameters}
{\em \+\_\+joint} & The joints index, same as for \hyperlink{a01190_a2aa22e9b07c72f616712f8c67e8ae0d5}{Skeleton\+T$<$$>$\+::joint} \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The global translation vector (the 4th column in the global matrix) 
\end{DoxyReturn}


Definition at line 233 of file Pose\+T.\+cc.

\hypertarget{a00996_a801251494f8116df9f442e446d993167}{\index{Pose\+T@{Pose\+T}!insert\+Joint\+At@{insert\+Joint\+At}}
\index{insert\+Joint\+At@{insert\+Joint\+At}!Pose\+T@{Pose\+T}}
\subsubsection[{insert\+Joint\+At}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Point\+T $>$ void {\bf Pose\+T}$<$ Point\+T $>$\+::insert\+Joint\+At (
\begin{DoxyParamCaption}
\item[{unsigned int}]{\+\_\+index}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}}\label{a00996_a801251494f8116df9f442e446d993167}


Called by the skeleton/animation as a new joint is inserted. 

To keep the vectors storing the matrices for the joints in sync with the joints a new entry has to be inserted in exactly the same place if a new joint is added to the skeleton. This is done here. Derived classes have to overwrite this method to keep their data members in sync as well. Always call the base class method first.


\begin{DoxyParams}{Parameters}
{\em \+\_\+index} & The new joint is inserted at this position. Insert new joints at the end by passing \hyperlink{a01190_a5f84278746abf75857b26ed83575041e}{Skeleton\+T$<$$>$\+::joint\+Count()} as parameter. \\
\hline
\end{DoxyParams}


Definition at line 287 of file Pose\+T.\+cc.

\hypertarget{a00996_a573488c3420491bab0ca4fbc9ba07fd6}{\index{Pose\+T@{Pose\+T}!local\+Matrix@{local\+Matrix}}
\index{local\+Matrix@{local\+Matrix}!Pose\+T@{Pose\+T}}
\subsubsection[{local\+Matrix}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Point\+T $>$ const {\bf Pose\+T}$<$ Point\+T $>$\+::{\bf Matrix} \& {\bf Pose\+T}$<$ Point\+T $>$\+::local\+Matrix (
\begin{DoxyParamCaption}
\item[{unsigned int}]{\+\_\+joint}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}}\label{a00996_a573488c3420491bab0ca4fbc9ba07fd6}


Returns the local matrix for the given joint. 

local matrix manipulation the local matrix represents a joints orientation/translation in the coordinate frame of the parent joint


\begin{DoxyParams}{Parameters}
{\em \+\_\+joint} & The joints index, same as for \hyperlink{a01190_a2aa22e9b07c72f616712f8c67e8ae0d5}{Skeleton\+T$<$$>$\+::joint} \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The local matrix, relative to the parents coordinate system 
\end{DoxyReturn}


Definition at line 110 of file Pose\+T.\+cc.

\hypertarget{a00996_aac5274f01beab1731d92aa2c4f6675f2}{\index{Pose\+T@{Pose\+T}!local\+Translation@{local\+Translation}}
\index{local\+Translation@{local\+Translation}!Pose\+T@{Pose\+T}}
\subsubsection[{local\+Translation}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Point\+T $>$ {\bf Pose\+T}$<$ Point\+T $>$\+::{\bf Vector} {\bf Pose\+T}$<$ Point\+T $>$\+::local\+Translation (
\begin{DoxyParamCaption}
\item[{unsigned int}]{\+\_\+joint}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{a00996_aac5274f01beab1731d92aa2c4f6675f2}


Returns the local translation vector. 

The local translation vector describes the translation from the origin of the parent joint coordinate system to the origin of the local joint coordinate system in local coordinates.


\begin{DoxyParams}{Parameters}
{\em \+\_\+joint} & The joints index, same as for \hyperlink{a01190_a2aa22e9b07c72f616712f8c67e8ae0d5}{Skeleton\+T$<$$>$\+::joint} \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The local translation vector (the 4th column in the local matrix) 
\end{DoxyReturn}


Definition at line 145 of file Pose\+T.\+cc.

\hypertarget{a00996_ac5b6fcccb9ea2ddc0c1a5b15d6b96d07}{\index{Pose\+T@{Pose\+T}!remove\+Joint\+At@{remove\+Joint\+At}}
\index{remove\+Joint\+At@{remove\+Joint\+At}!Pose\+T@{Pose\+T}}
\subsubsection[{remove\+Joint\+At}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Point\+T $>$ void {\bf Pose\+T}$<$ Point\+T $>$\+::remove\+Joint\+At (
\begin{DoxyParamCaption}
\item[{unsigned int}]{\+\_\+index}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}}\label{a00996_ac5b6fcccb9ea2ddc0c1a5b15d6b96d07}


Called by the skeleton/animation as a joint is removed. 

To keep the vectors storing the matrices for the joints in sync with the joints exactly the same entry has to be removed as a joint is removed from the skeleton. This is done here. Derived classes have to overwrite this method to keep their data members in sync as well. Always call the base class method first.


\begin{DoxyParams}{Parameters}
{\em \+\_\+index} & The new joint is inserted at this position. Insert new joints at the end by passing \hyperlink{a01190_a5f84278746abf75857b26ed83575041e}{Skeleton\+T$<$$>$\+::joint\+Count()} as parameter. \\
\hline
\end{DoxyParams}


Definition at line 304 of file Pose\+T.\+cc.

\hypertarget{a00996_abb3b80190a71cedef449b0e28669de32}{\index{Pose\+T@{Pose\+T}!set\+Global\+Matrix@{set\+Global\+Matrix}}
\index{set\+Global\+Matrix@{set\+Global\+Matrix}!Pose\+T@{Pose\+T}}
\subsubsection[{set\+Global\+Matrix}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Point\+T $>$ void {\bf Pose\+T}$<$ Point\+T $>$\+::set\+Global\+Matrix (
\begin{DoxyParamCaption}
\item[{unsigned int}]{\+\_\+joint, }
\item[{const {\bf Matrix} \&}]{\+\_\+global, }
\item[{bool}]{\+\_\+keep\+Global\+Child\+Positions = {\ttfamily true}}
\end{DoxyParamCaption}
)}}\label{a00996_abb3b80190a71cedef449b0e28669de32}


Sets the global coordinate system. 

The global Matrix defines the transformation from bone coordinates back into global world coordinates. The change will automatically be propagated to all children. Also the local matrices will be updated.


\begin{DoxyParams}{Parameters}
{\em \+\_\+joint} & The joints index, same as for \hyperlink{a01190_a2aa22e9b07c72f616712f8c67e8ae0d5}{Skeleton\+T$<$$>$\+::joint} \\
\hline
{\em \+\_\+global} & The new global matrix \\
\hline
{\em \+\_\+keep\+Global\+Child\+Positions} & Do the children stay at the same position or do they move with their parent joint \\
\hline
\end{DoxyParams}


Definition at line 217 of file Pose\+T.\+cc.

\hypertarget{a00996_a4ea35b6a61485ed152ba2f3e9ca010d3}{\index{Pose\+T@{Pose\+T}!set\+Global\+Translation@{set\+Global\+Translation}}
\index{set\+Global\+Translation@{set\+Global\+Translation}!Pose\+T@{Pose\+T}}
\subsubsection[{set\+Global\+Translation}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Point\+T $>$ void {\bf Pose\+T}$<$ Point\+T $>$\+::set\+Global\+Translation (
\begin{DoxyParamCaption}
\item[{unsigned int}]{\+\_\+joint, }
\item[{const {\bf Vector} \&}]{\+\_\+position, }
\item[{bool}]{\+\_\+keep\+Global\+Child\+Positions = {\ttfamily true}}
\end{DoxyParamCaption}
)}}\label{a00996_a4ea35b6a61485ed152ba2f3e9ca010d3}


Sets the global translation vector. 

The matrix is otherwise not modified. The change is automatically propagated to all children. Also the local coordinate frames will be updated.


\begin{DoxyParams}{Parameters}
{\em \+\_\+joint} & The joints index, same as for \hyperlink{a01190_a2aa22e9b07c72f616712f8c67e8ae0d5}{Skeleton\+T$<$$>$\+::joint} \\
\hline
{\em \+\_\+position} & The new global translation vector \\
\hline
{\em \+\_\+keep\+Global\+Child\+Positions} & Do the children stay at the same position or do they move with their parent joint \\
\hline
\end{DoxyParams}


Definition at line 255 of file Pose\+T.\+cc.

\hypertarget{a00996_a09a23fe006d4efaadc71d3e731a205a6}{\index{Pose\+T@{Pose\+T}!set\+Local\+Matrix@{set\+Local\+Matrix}}
\index{set\+Local\+Matrix@{set\+Local\+Matrix}!Pose\+T@{Pose\+T}}
\subsubsection[{set\+Local\+Matrix}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Point\+T $>$ void {\bf Pose\+T}$<$ Point\+T $>$\+::set\+Local\+Matrix (
\begin{DoxyParamCaption}
\item[{unsigned int}]{\+\_\+joint, }
\item[{const {\bf Matrix} \&}]{\+\_\+local, }
\item[{bool}]{\+\_\+keep\+Local\+Child\+Positions = {\ttfamily true}}
\end{DoxyParamCaption}
)}}\label{a00996_a09a23fe006d4efaadc71d3e731a205a6}


Sets the local coordinate system. 

The change will automatically be propagated to all children. Also the global matrices will be updated.


\begin{DoxyParams}{Parameters}
{\em \+\_\+joint} & The joints index, same as for \hyperlink{a01190_a2aa22e9b07c72f616712f8c67e8ae0d5}{Skeleton\+T$<$$>$\+::joint} \\
\hline
{\em \+\_\+local} & The new local matrix \\
\hline
{\em \+\_\+keep\+Local\+Child\+Positions} & If true, the positions of the children will be kept \\
\hline
\end{DoxyParams}


Definition at line 126 of file Pose\+T.\+cc.

\hypertarget{a00996_a7903b555811eafb67204e829bd286d95}{\index{Pose\+T@{Pose\+T}!set\+Local\+Translation@{set\+Local\+Translation}}
\index{set\+Local\+Translation@{set\+Local\+Translation}!Pose\+T@{Pose\+T}}
\subsubsection[{set\+Local\+Translation}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Point\+T $>$ void {\bf Pose\+T}$<$ Point\+T $>$\+::set\+Local\+Translation (
\begin{DoxyParamCaption}
\item[{unsigned int}]{\+\_\+joint, }
\item[{const {\bf Vector} \&}]{\+\_\+position, }
\item[{bool}]{\+\_\+keep\+Local\+Child\+Positions = {\ttfamily true}}
\end{DoxyParamCaption}
)}}\label{a00996_a7903b555811eafb67204e829bd286d95}


Sets the local translation vector. 

The matrix is otherwise not modified. The change is automatically propagated to all children. Also the global coordinate frames will be updated.


\begin{DoxyParams}{Parameters}
{\em \+\_\+joint} & The joints index, same as for \hyperlink{a01190_a2aa22e9b07c72f616712f8c67e8ae0d5}{Skeleton\+T$<$$>$\+::joint} \\
\hline
{\em \+\_\+position} & The new local translation vector \\
\hline
{\em \+\_\+keep\+Local\+Child\+Positions} & If true, the positions of the children will be kept \\
\hline
\end{DoxyParams}


Definition at line 167 of file Pose\+T.\+cc.

\hypertarget{a00996_aaae29998a1edeb9f9db187c5b1d22eb9}{\index{Pose\+T@{Pose\+T}!unified\+Dual\+Quaternion@{unified\+Dual\+Quaternion}}
\index{unified\+Dual\+Quaternion@{unified\+Dual\+Quaternion}!Pose\+T@{Pose\+T}}
\subsubsection[{unified\+Dual\+Quaternion}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Point\+T $>$ const {\bf Pose\+T}$<$ Point\+T $>$\+::{\bf Dual\+Quaternion} \& {\bf Pose\+T}$<$ Point\+T $>$\+::unified\+Dual\+Quaternion (
\begin{DoxyParamCaption}
\item[{unsigned int}]{\+\_\+joint}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{a00996_aaae29998a1edeb9f9db187c5b1d22eb9}


Returns a dual quaternion holding the unified matrix represented as dual quaternion. 

This is used by the Dual Quaternion blend skinning.


\begin{DoxyParams}{Parameters}
{\em \+\_\+joint} & The joints index, same as for \hyperlink{a01190_a2aa22e9b07c72f616712f8c67e8ae0d5}{Skeleton\+T$<$$>$\+::joint} \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The rotational part of the unified matrix 
\end{DoxyReturn}


Definition at line 437 of file Pose\+T.\+cc.

\hypertarget{a00996_a4728134cf798467485eed51a608fbe8d}{\index{Pose\+T@{Pose\+T}!unified\+Matrix@{unified\+Matrix}}
\index{unified\+Matrix@{unified\+Matrix}!Pose\+T@{Pose\+T}}
\subsubsection[{unified\+Matrix}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Point\+T $>$ const {\bf Pose\+T}$<$ Point\+T $>$\+::{\bf Matrix} \& {\bf Pose\+T}$<$ Point\+T $>$\+::unified\+Matrix (
\begin{DoxyParamCaption}
\item[{unsigned int}]{\+\_\+joint}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{a00996_a4728134cf798467485eed51a608fbe8d}


Returns the unified matrix. 

The unified matrix stores \[ M_{unified} = M_{pose} \cdot M^{-1}_{reference} \] speeding up the calculation of the vertices in the current pose \[ v_{pose} = M_{pose} \cdot M^{-1}_{reference} \cdot v_{reference} \] The matrix \[ M^{-1}_{reference} \] transforms a point of the skin in global coordinates when the skeleton is in the reference pose to local bone coordinates. The Matrix \[ M_{pose} \] takes a point in bone coordinates and transforms it back into global coordinates. As the matrix is given by a skeleton in a different pose, the points in local coordinates will therefore follow the skeleton. \[ v_{pose} = M_{unified} \cdot v_{reference} \]


\begin{DoxyParams}{Parameters}
{\em \+\_\+joint} & The joints index, same as for \hyperlink{a01190_a2aa22e9b07c72f616712f8c67e8ae0d5}{Skeleton\+T$<$$>$\+::joint} \\
\hline
\end{DoxyParams}


Definition at line 403 of file Pose\+T.\+cc.

\hypertarget{a00996_aa0e48e83de6b205d10d844eb800b532b}{\index{Pose\+T@{Pose\+T}!unified\+Rotation@{unified\+Rotation}}
\index{unified\+Rotation@{unified\+Rotation}!Pose\+T@{Pose\+T}}
\subsubsection[{unified\+Rotation}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Point\+T $>$ const {\bf Pose\+T}$<$ Point\+T $>$\+::{\bf Quaternion} \& {\bf Pose\+T}$<$ Point\+T $>$\+::unified\+Rotation (
\begin{DoxyParamCaption}
\item[{unsigned int}]{\+\_\+joint}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{a00996_aa0e48e83de6b205d10d844eb800b532b}


Returns a quaternion holding the rotational part of the unified matrix. 

This is used by the spherical blend skinning.

The rotational part of the unified matrix is stored in the real part of the dual quaternion


\begin{DoxyParams}{Parameters}
{\em \+\_\+joint} & The joints index, same as for \hyperlink{a01190_a2aa22e9b07c72f616712f8c67e8ae0d5}{Skeleton\+T$<$$>$\+::joint} \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The rotational part of the unified matrix 
\end{DoxyReturn}


Definition at line 421 of file Pose\+T.\+cc.

\hypertarget{a00996_a24473b2174c40af1b11ffcbdbc6dadea}{\index{Pose\+T@{Pose\+T}!update\+From\+Global@{update\+From\+Global}}
\index{update\+From\+Global@{update\+From\+Global}!Pose\+T@{Pose\+T}}
\subsubsection[{update\+From\+Global}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Point\+T $>$ void {\bf Pose\+T}$<$ Point\+T $>$\+::update\+From\+Global (
\begin{DoxyParamCaption}
\item[{unsigned int}]{\+\_\+joint, }
\item[{bool}]{\+\_\+keep\+Child\+Positions = {\ttfamily true}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [protected]}}}\label{a00996_a24473b2174c40af1b11ffcbdbc6dadea}


This method propagates the change in the global coordinate system to the local system and all children. 

Do not overwrite this method, instead overwrite Base\+Pose\+::\+Update\+From\+Global\+Callback. Otherwise the recursion will become a problem.


\begin{DoxyParams}{Parameters}
{\em \+\_\+joint} & The updated joints index \\
\hline
{\em \+\_\+keep\+Child\+Positions} & Do the children stay at the same global position or do they move with their parent joint \\
\hline
\end{DoxyParams}


Definition at line 359 of file Pose\+T.\+cc.

\hypertarget{a00996_a34abac5dcdc359468ef4f0e8a7bd1dfa}{\index{Pose\+T@{Pose\+T}!update\+From\+Local@{update\+From\+Local}}
\index{update\+From\+Local@{update\+From\+Local}!Pose\+T@{Pose\+T}}
\subsubsection[{update\+From\+Local}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Point\+T $>$ void {\bf Pose\+T}$<$ Point\+T $>$\+::update\+From\+Local (
\begin{DoxyParamCaption}
\item[{unsigned int}]{\+\_\+joint, }
\item[{bool}]{\+\_\+keep\+Child\+Positions = {\ttfamily true}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [protected]}}}\label{a00996_a34abac5dcdc359468ef4f0e8a7bd1dfa}


This method propagates the change in the local coordinate system to the global system and all children. 


\begin{DoxyParams}{Parameters}
{\em \+\_\+joint} & The updated joints index \\
\hline
{\em \+\_\+keep\+Child\+Positions} & Do the children stay at the same position or do they move with their parent joint \\
\hline
\end{DoxyParams}


Definition at line 321 of file Pose\+T.\+cc.



\subsection{Member Data Documentation}
\hypertarget{a00996_a83f6b4ed724159f2a28db5de68ca06a6}{\index{Pose\+T@{Pose\+T}!unified\+Dual\+Quaternion\+\_\+@{unified\+Dual\+Quaternion\+\_\+}}
\index{unified\+Dual\+Quaternion\+\_\+@{unified\+Dual\+Quaternion\+\_\+}!Pose\+T@{Pose\+T}}
\subsubsection[{unified\+Dual\+Quaternion\+\_\+}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Point\+T$>$ std\+::vector$<${\bf Dual\+Quaternion}$>$ {\bf Pose\+T}$<$ Point\+T $>$\+::unified\+Dual\+Quaternion\+\_\+\hspace{0.3cm}{\ttfamily [protected]}}}\label{a00996_a83f6b4ed724159f2a28db5de68ca06a6}
Joint\+T\+::\+Pose\+T\+::unified in Dual\+Quaternion representation note\+: the real part of the dual quaternion is the rotation part of the transformation as quaternion 

Definition at line 198 of file Pose\+T.\+hh.



The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
Object\+Types/\+Skeleton/Pose\+T.\+hh\item 
Object\+Types/\+Skeleton/Pose\+T.\+cc\end{DoxyCompactItemize}
