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


Represents a single joint in the skeleton.  




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

\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a00751_aefdda20dcd154a29429f0b8b24eed031}{typedef Point\+T {\bfseries Point}}\label{a00751_aefdda20dcd154a29429f0b8b24eed031}

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

\item 
\hypertarget{a00751_ad5c79e35aa4568eeb7114bb48feef0ff}{typedef \hyperlink{a00751}{Joint\+T}$<$ Point\+T $>$ {\bfseries Joint}}\label{a00751_ad5c79e35aa4568eeb7114bb48feef0ff}

\item 
\hypertarget{a00751_a2157a0647b9804a61d602aeed4c84b65}{typedef std\+::vector$<$ \hyperlink{a00751}{Joint} $\ast$ $>$\\*
\+::iterator {\bfseries Child\+Iter}}\label{a00751_a2157a0647b9804a61d602aeed4c84b65}

\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{a00751_a777f05fc8c3a684462fdb2afd0158b08}{Joint\+T} (const \hyperlink{a00751}{Joint} \&\+\_\+other)
\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item 
\hypertarget{a00751_affdb7c96c64d78155590b040a9c99044}{\hyperlink{a00751_affdb7c96c64d78155590b040a9c99044}{Joint\+T} (\hyperlink{a00751}{Joint} $\ast$\+\_\+parent, std\+::string \+\_\+name=\char`\"{}\char`\"{})}\label{a00751_affdb7c96c64d78155590b040a9c99044}

\begin{DoxyCompactList}\small\item\em Default constructor, creates a joint pointing to the origin. \end{DoxyCompactList}\item 
\hypertarget{a00751_ab02a80b45ef6566788e6c1b0e7708044}{\hyperlink{a00751_ab02a80b45ef6566788e6c1b0e7708044}{$\sim$\+Joint\+T} ()}\label{a00751_ab02a80b45ef6566788e6c1b0e7708044}

\begin{DoxyCompactList}\small\item\em Destructor. \end{DoxyCompactList}\item 
unsigned int \hyperlink{a00751_a3a8ee6a1e86d8394c6fdccedde644cb1}{id} ()
\begin{DoxyCompactList}\small\item\em returns the joint id \end{DoxyCompactList}\item 
void \hyperlink{a00751_a0edb64b04c35375c4b950e97836e9201}{set\+Parent} (\hyperlink{a00751}{Joint} $\ast$\+\_\+new\+Parent, \hyperlink{a01190}{Skeleton\+T}$<$ Point\+T $>$ \&\+\_\+skeleton)
\begin{DoxyCompactList}\small\item\em access parent of the joint \end{DoxyCompactList}\item 
\hyperlink{a00751}{Joint} $\ast$ \hyperlink{a00751_abc1ad433b8a324b77d06c5256258aabc}{parent} ()
\begin{DoxyCompactList}\small\item\em Returns the parent joint. \end{DoxyCompactList}\item 
\hypertarget{a00751_a3078f4bb1c24ff3db20d4175270a85e7}{bool {\bfseries is\+Root} ()}\label{a00751_a3078f4bb1c24ff3db20d4175270a85e7}

\item 
\hypertarget{a00751_adab0d5e52a6518d80cf786b0449284aa}{std\+::string \hyperlink{a00751_adab0d5e52a6518d80cf786b0449284aa}{name} ()}\label{a00751_adab0d5e52a6518d80cf786b0449284aa}

\begin{DoxyCompactList}\small\item\em Access the name of the joint. \end{DoxyCompactList}\item 
\hypertarget{a00751_afb3c9a4437352d09119ad8f25d096672}{void {\bfseries set\+Name} (std\+::string \+\_\+name)}\label{a00751_afb3c9a4437352d09119ad8f25d096672}

\end{DoxyCompactItemize}
\begin{Indent}{\bf Child access}\par
{\em Use this iterator to access the joints child nodes }\begin{DoxyCompactItemize}
\item 
\hypertarget{a00751_a7867b0aa2ca4e03d62ae581948b7dc2d}{Child\+Iter \hyperlink{a00751_a7867b0aa2ca4e03d62ae581948b7dc2d}{begin} ()}\label{a00751_a7867b0aa2ca4e03d62ae581948b7dc2d}

\begin{DoxyCompactList}\small\item\em Returns an iterator on the joints children. \end{DoxyCompactList}\item 
\hypertarget{a00751_a1cea292819497eed0c426390d2989deb}{Child\+Iter \hyperlink{a00751_a1cea292819497eed0c426390d2989deb}{end} ()}\label{a00751_a1cea292819497eed0c426390d2989deb}

\begin{DoxyCompactList}\small\item\em Returns the end iterator for the joints children. \end{DoxyCompactList}\item 
\hypertarget{a00751_a9572c1d3407c809c131a34cb998992a1}{size\+\_\+t \hyperlink{a00751_a9572c1d3407c809c131a34cb998992a1}{size} ()}\label{a00751_a9572c1d3407c809c131a34cb998992a1}

\begin{DoxyCompactList}\small\item\em Returns the number of children. \end{DoxyCompactList}\item 
\hyperlink{a00751}{Joint} $\ast$ \hyperlink{a00751_a44e546047928006ddbabd88bd73cf86d}{child} (size\+\_\+t \+\_\+index)
\begin{DoxyCompactList}\small\item\em Returns the child joint with the given index. \end{DoxyCompactList}\end{DoxyCompactItemize}
\end{Indent}
\begin{Indent}{\bf Selections}\par
{\em change and access selection state }\begin{DoxyCompactItemize}
\item 
\hypertarget{a00751_aabb2782f9793f0cbcba84f3f4e124140}{bool \hyperlink{a00751_aabb2782f9793f0cbcba84f3f4e124140}{selected} ()}\label{a00751_aabb2782f9793f0cbcba84f3f4e124140}

\begin{DoxyCompactList}\small\item\em Returns the joint's selection state. \end{DoxyCompactList}\item 
\hypertarget{a00751_ae3322dc794f73312c0b54ea150486c3a}{void \hyperlink{a00751_ae3322dc794f73312c0b54ea150486c3a}{set\+Selected} (bool \+\_\+selected)}\label{a00751_ae3322dc794f73312c0b54ea150486c3a}

\begin{DoxyCompactList}\small\item\em Set the joint's selction state. \end{DoxyCompactList}\end{DoxyCompactItemize}
\end{Indent}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a00751_a5b09006c84483bd2c4faf2decc548073}{void {\bfseries set\+Id} (unsigned int \+\_\+id)}\label{a00751_a5b09006c84483bd2c4faf2decc548073}

\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a00751_afda1851351a41d4ad8d3df11955b5135}{\hyperlink{a00751}{Joint} $\ast$ \hyperlink{a00751_afda1851351a41d4ad8d3df11955b5135}{parent\+\_\+}}\label{a00751_afda1851351a41d4ad8d3df11955b5135}

\begin{DoxyCompactList}\small\item\em The parent joint; this joint is in its parents \hyperlink{a00751_a924f948758d2a871ad24d45001c7b0e4}{Joint\+T\+::children\+\_\+} vector. It's 0 for the root node. \end{DoxyCompactList}\item 
\hypertarget{a00751_a924f948758d2a871ad24d45001c7b0e4}{std\+::vector$<$ \hyperlink{a00751}{Joint} $\ast$ $>$ \hyperlink{a00751_a924f948758d2a871ad24d45001c7b0e4}{children\+\_\+}}\label{a00751_a924f948758d2a871ad24d45001c7b0e4}

\begin{DoxyCompactList}\small\item\em The joints children, use the Joint\+T\+::get\+Child method to access them. \end{DoxyCompactList}\item 
\hypertarget{a00751_a9b0aae619c29c6783b4508603379789b}{std\+::string \hyperlink{a00751_a9b0aae619c29c6783b4508603379789b}{name\+\_\+}}\label{a00751_a9b0aae619c29c6783b4508603379789b}

\begin{DoxyCompactList}\small\item\em the name of the joint \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a00751_a9fd03a24a9948759c598186f63ba0701}{unsigned int \hyperlink{a00751_a9fd03a24a9948759c598186f63ba0701}{id\+\_\+}}\label{a00751_a9fd03a24a9948759c598186f63ba0701}

\begin{DoxyCompactList}\small\item\em An unique identifier, guaranteed to be part of a continuous sequence starting from 0. \end{DoxyCompactList}\item 
\hypertarget{a00751_a2e19c8be3f353fb835cc17cdfe1ec59e}{bool {\bfseries selected\+\_\+}}\label{a00751_a2e19c8be3f353fb835cc17cdfe1ec59e}

\end{DoxyCompactItemize}
\subsection*{Friends}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a00751_a9c68027d454364bb949026efa3c2df9a}{{\footnotesize template$<$class $>$ }\\class {\bfseries Skeleton\+T}}\label{a00751_a9c68027d454364bb949026efa3c2df9a}

\end{DoxyCompactItemize}


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

Represents a single joint in the skeleton. 

The skeleton is made up by a hierarchical structure of joints. The joints don't store their position themselves. Instead, the joint positions are stored in poses. The poses are managed by the \hyperlink{a00289}{Animation\+T} class and the skeleton. 

Definition at line 66 of file Joint\+T.\+hh.



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


Constructor. 

Copy constructor, creates an incomplete copy of the given joint.

The parent and children cannot be copied, since they are provided as pointers only. Furthermore, if a skeleton is being cloned the corresponding joints may not yet exist in this skeleton. 

Definition at line 79 of file Joint\+T.\+cc.



\subsection{Member Function Documentation}
\hypertarget{a00751_a44e546047928006ddbabd88bd73cf86d}{\index{Joint\+T@{Joint\+T}!child@{child}}
\index{child@{child}!Joint\+T@{Joint\+T}}
\subsubsection[{child}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Point\+T $>$ {\bf Joint\+T}$<$ Point\+T $>$ $\ast$ {\bf Joint\+T}$<$ Point\+T $>$\+::child (
\begin{DoxyParamCaption}
\item[{size\+\_\+t}]{\+\_\+index}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{a00751_a44e546047928006ddbabd88bd73cf86d}


Returns the child joint with the given index. 


\begin{DoxyParams}{Parameters}
{\em \+\_\+index} & The child nodes index \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A pointer to the child joint or zero if the index was out of range 
\end{DoxyReturn}


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

\hypertarget{a00751_a3a8ee6a1e86d8394c6fdccedde644cb1}{\index{Joint\+T@{Joint\+T}!id@{id}}
\index{id@{id}!Joint\+T@{Joint\+T}}
\subsubsection[{id}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Point\+T $>$ unsigned int {\bf Joint\+T}$<$ Point\+T $>$\+::id (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{a00751_a3a8ee6a1e86d8394c6fdccedde644cb1}


returns the joint id 

Returns the joints index.

The index is part of a continuous sequence out of the interval \mbox{[}0, number of joints). It is guaranteed not to change, unless joints are deleted from the skeleton. 

Definition at line 103 of file Joint\+T.\+cc.

\hypertarget{a00751_abc1ad433b8a324b77d06c5256258aabc}{\index{Joint\+T@{Joint\+T}!parent@{parent}}
\index{parent@{parent}!Joint\+T@{Joint\+T}}
\subsubsection[{parent}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Point\+T $>$ {\bf Joint\+T}$<$ Point\+T $>$ $\ast$ {\bf Joint\+T}$<$ Point\+T $>$\+::parent (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{a00751_abc1ad433b8a324b77d06c5256258aabc}


Returns the parent joint. 

If you want to know the root position of a joint, then just take its parents global position. They always match, since a joint is always directly attached to its parent. 

Definition at line 162 of file Joint\+T.\+cc.

\hypertarget{a00751_a0edb64b04c35375c4b950e97836e9201}{\index{Joint\+T@{Joint\+T}!set\+Parent@{set\+Parent}}
\index{set\+Parent@{set\+Parent}!Joint\+T@{Joint\+T}}
\subsubsection[{set\+Parent}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Point\+T$>$ void {\bf Joint\+T}$<$ Point\+T $>$\+::set\+Parent (
\begin{DoxyParamCaption}
\item[{{\bf Joint} $\ast$}]{\+\_\+new\+Parent, }
\item[{{\bf Skeleton\+T}$<$ Point\+T $>$ \&}]{\+\_\+skeleton}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{a00751_a0edb64b04c35375c4b950e97836e9201}


access parent of the joint 

Replaces this joints parent joint.

After calling this method this joint is child of the given joint. Keep in mind that this will corrupt the joints local matrix in all poses.


\begin{DoxyParams}{Parameters}
{\em \+\_\+new\+Parent} & The new parent joint \\
\hline
{\em \+\_\+skeleton} & The skeleton this joint is part of, used to update the poses local matrices \\
\hline
\end{DoxyParams}


Definition at line 128 of file Joint\+T.\+cc.



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