\hypertarget{classSkeletonT_1_1Iterator}{}\section{SkeletonT$<$ PointT $>$\+:\+:Iterator Class Reference}
\label{classSkeletonT_1_1Iterator}\index{Skeleton\+T$<$ Point\+T $>$\+::\+Iterator@{Skeleton\+T$<$ Point\+T $>$\+::\+Iterator}}


\hyperlink{classSkeletonT_1_1Iterator}{Iterator} class for the skeleton.  




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

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classSkeletonT_1_1Iterator_ada7c2898c4e47c9330197e1226a1d946}{Iterator} ()
\begin{DoxyCompactList}\small\item\em Default constructor. \end{DoxyCompactList}\item 
\hyperlink{classSkeletonT_1_1Iterator_a22bab2e8916e2d84a844f39499c5f543}{Iterator} (\hyperlink{classJointT}{Joint} $\ast$\+\_\+root)
\begin{DoxyCompactList}\small\item\em Constructor -\/ Creates an iterator for the given (sub-\/)tree. \end{DoxyCompactList}\item 
\hyperlink{classSkeletonT_1_1Iterator_a7e7445ba1cfdd7664e4e3274f4ef5f82}{Iterator} (const \hyperlink{classSkeletonT_1_1Iterator}{Iterator} \&other)
\begin{DoxyCompactList}\small\item\em Copy Constructor -\/ Creates a copy of the given iterator. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classSkeletonT_1_1Iterator_a1781b0c6d57be12fe954c3bcefab4030}\label{classSkeletonT_1_1Iterator_a1781b0c6d57be12fe954c3bcefab4030}} 
\hyperlink{classSkeletonT_1_1Iterator_a1781b0c6d57be12fe954c3bcefab4030}{$\sim$\+Iterator} ()
\begin{DoxyCompactList}\small\item\em Destructor. \end{DoxyCompactList}\item 
\hyperlink{classSkeletonT_1_1Iterator}{Iterator} \& \hyperlink{classSkeletonT_1_1Iterator_a8b005f609f70a73d2a0695b68c234529}{operator=} (const \hyperlink{classSkeletonT_1_1Iterator}{Iterator} \&other)
\begin{DoxyCompactList}\small\item\em Assignment Operator. \end{DoxyCompactList}\item 
\hyperlink{classSkeletonT_1_1Iterator}{Iterator} \& \hyperlink{classSkeletonT_1_1Iterator_a91cdb7f384108d63294ebee2641bea0d}{operator++} ()
\begin{DoxyCompactList}\small\item\em Increase the iterator. \end{DoxyCompactList}\item 
bool \hyperlink{classSkeletonT_1_1Iterator_aa6ea357314d65d991f05351a51f0127e}{operator!=} (const \hyperlink{classSkeletonT_1_1Iterator}{Iterator} \&other) const
\begin{DoxyCompactList}\small\item\em Compares the iterators. \end{DoxyCompactList}\item 
bool \hyperlink{classSkeletonT_1_1Iterator_abcda1f46c9bc4235a68d19644d91777a}{operator==} (const \hyperlink{classSkeletonT_1_1Iterator}{Iterator} \&other) const
\begin{DoxyCompactList}\small\item\em Compares the iterators. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classSkeletonT_1_1Iterator_a78ec47d0f828c35e846c9d38d3d2cd64}\label{classSkeletonT_1_1Iterator_a78ec47d0f828c35e846c9d38d3d2cd64}} 
\hyperlink{classJointT}{Joint} $\ast$ \hyperlink{classSkeletonT_1_1Iterator_a78ec47d0f828c35e846c9d38d3d2cd64}{operator$\ast$} () const
\begin{DoxyCompactList}\small\item\em Returns a pointer to the current joint. \end{DoxyCompactList}\item 
\hyperlink{classJointT}{Joint} $\ast$ \hyperlink{classSkeletonT_1_1Iterator_addd1fd5d7156a3ddaabbb1d749ca9121}{operator-\/$>$} () const
\begin{DoxyCompactList}\small\item\em Returns a pointer to the current joint. \end{DoxyCompactList}\item 
\hyperlink{classSkeletonT_1_1Iterator_a3315f3b3a12f2723917bbb695d492a0f}{operator bool} () const
\begin{DoxyCompactList}\small\item\em Returns false if the iterator is done iterating. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classJointT}{Joint} $\ast$ \hyperlink{classSkeletonT_1_1Iterator_a4c8084fdbd3c1a89ebb182fab938806b}{next\+Sibling} (\hyperlink{classJointT}{Joint} $\ast$\+\_\+p\+Parent, \hyperlink{classJointT}{Joint} $\ast$\+\_\+p\+Joint)
\begin{DoxyCompactList}\small\item\em Given a parent and one of its child nodes this method finds and returns the next sibling. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classSkeletonT_1_1Iterator_a30bfb8a0da407b6b48346e3e9dbebee9}\label{classSkeletonT_1_1Iterator_a30bfb8a0da407b6b48346e3e9dbebee9}} 
\hyperlink{classJointT}{Joint} $\ast$ {\bfseries p\+Current\+\_\+}
\item 
\mbox{\Hypertarget{classSkeletonT_1_1Iterator_afaa5b25de93c3040d80d34abd44a7379}\label{classSkeletonT_1_1Iterator_afaa5b25de93c3040d80d34abd44a7379}} 
std\+::stack$<$ \hyperlink{classJointT}{Joint} $\ast$ $>$ {\bfseries st\+Joints\+\_\+}
\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$class PointT$>$\newline
class Skeleton\+T$<$ Point\+T $>$\+::\+Iterator}

\hyperlink{classSkeletonT_1_1Iterator}{Iterator} class for the skeleton. 

This iterator can be used to iterate over all joints in a top-\/down (root to leaf), left-\/to-\/right order. It is possible to iterate over subtrees by constructing an iterator passing the root of the subtree as parameter. Cast the iterator to boolean to test if it iterated all joints. 

Definition at line 82 of file Skeleton\+T.\+hh.



\subsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{classSkeletonT_1_1Iterator_ada7c2898c4e47c9330197e1226a1d946}\label{classSkeletonT_1_1Iterator_ada7c2898c4e47c9330197e1226a1d946}} 
\index{Skeleton\+T\+::\+Iterator@{Skeleton\+T\+::\+Iterator}!Iterator@{Iterator}}
\index{Iterator@{Iterator}!Skeleton\+T\+::\+Iterator@{Skeleton\+T\+::\+Iterator}}
\subsubsection{\texorpdfstring{Iterator()}{Iterator()}\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}}
{\footnotesize\ttfamily template$<$typename PointT $>$ \\
\hyperlink{classSkeletonT}{SkeletonT}$<$ PointT $>$\+::Iterator\+::\+Iterator (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Default constructor. 

Creates an invalid iterator, not pointing to anything yet. 

Definition at line 73 of file Skeleton\+T\+\_\+impl.\+hh.

\mbox{\Hypertarget{classSkeletonT_1_1Iterator_a22bab2e8916e2d84a844f39499c5f543}\label{classSkeletonT_1_1Iterator_a22bab2e8916e2d84a844f39499c5f543}} 
\index{Skeleton\+T\+::\+Iterator@{Skeleton\+T\+::\+Iterator}!Iterator@{Iterator}}
\index{Iterator@{Iterator}!Skeleton\+T\+::\+Iterator@{Skeleton\+T\+::\+Iterator}}
\subsubsection{\texorpdfstring{Iterator()}{Iterator()}\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}}
{\footnotesize\ttfamily template$<$typename PointT $>$ \\
\hyperlink{classSkeletonT}{SkeletonT}$<$ PointT $>$\+::Iterator\+::\+Iterator (\begin{DoxyParamCaption}\item[{\hyperlink{classJointT}{Joint} $\ast$}]{\+\_\+root }\end{DoxyParamCaption})}



Constructor -\/ Creates an iterator for the given (sub-\/)tree. 

The iterator will traverse all nodes below \+\_\+root (inclusive \+\_\+root) in a top-\/down, \char`\"{}left-\/to-\/right\char`\"{} manner. 

Definition at line 86 of file Skeleton\+T\+\_\+impl.\+hh.

\mbox{\Hypertarget{classSkeletonT_1_1Iterator_a7e7445ba1cfdd7664e4e3274f4ef5f82}\label{classSkeletonT_1_1Iterator_a7e7445ba1cfdd7664e4e3274f4ef5f82}} 
\index{Skeleton\+T\+::\+Iterator@{Skeleton\+T\+::\+Iterator}!Iterator@{Iterator}}
\index{Iterator@{Iterator}!Skeleton\+T\+::\+Iterator@{Skeleton\+T\+::\+Iterator}}
\subsubsection{\texorpdfstring{Iterator()}{Iterator()}\hspace{0.1cm}{\footnotesize\ttfamily [3/3]}}
{\footnotesize\ttfamily template$<$typename PointT $>$ \\
\hyperlink{classSkeletonT}{SkeletonT}$<$ PointT $>$\+::Iterator\+::\+Iterator (\begin{DoxyParamCaption}\item[{const \hyperlink{classSkeletonT_1_1Iterator}{Iterator} \&}]{other }\end{DoxyParamCaption})}



Copy Constructor -\/ Creates a copy of the given iterator. 

This iterator will become a copy of the given iterator. They both point to the same position now, but iterate the tree independently. 

Definition at line 100 of file Skeleton\+T\+\_\+impl.\+hh.



\subsection{Member Function Documentation}
\mbox{\Hypertarget{classSkeletonT_1_1Iterator_a4c8084fdbd3c1a89ebb182fab938806b}\label{classSkeletonT_1_1Iterator_a4c8084fdbd3c1a89ebb182fab938806b}} 
\index{Skeleton\+T\+::\+Iterator@{Skeleton\+T\+::\+Iterator}!next\+Sibling@{next\+Sibling}}
\index{next\+Sibling@{next\+Sibling}!Skeleton\+T\+::\+Iterator@{Skeleton\+T\+::\+Iterator}}
\subsubsection{\texorpdfstring{next\+Sibling()}{nextSibling()}}
{\footnotesize\ttfamily template$<$typename PointT $>$ \\
\hyperlink{classSkeletonT}{SkeletonT}$<$ PointT $>$\+::\hyperlink{classJointT}{Joint} $\ast$ \hyperlink{classSkeletonT}{SkeletonT}$<$ PointT $>$\+::Iterator\+::next\+Sibling (\begin{DoxyParamCaption}\item[{\hyperlink{classJointT}{Joint} $\ast$}]{\+\_\+p\+Parent,  }\item[{\hyperlink{classJointT}{Joint} $\ast$}]{\+\_\+p\+Joint }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Given a parent and one of its child nodes this method finds and returns the next sibling. 


\begin{DoxyParams}{Parameters}
{\em \+\_\+p\+Parent} & The parent node, take it from the stack \\
\hline
{\em \+\_\+p\+Joint} & A child node of \+\_\+p\+Parent, its next sibling is wanted \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Either a pointer to the sibling or 0 if there are no more siblings 
\end{DoxyReturn}


Definition at line 258 of file Skeleton\+T\+\_\+impl.\+hh.

\mbox{\Hypertarget{classSkeletonT_1_1Iterator_a3315f3b3a12f2723917bbb695d492a0f}\label{classSkeletonT_1_1Iterator_a3315f3b3a12f2723917bbb695d492a0f}} 
\index{Skeleton\+T\+::\+Iterator@{Skeleton\+T\+::\+Iterator}!operator bool@{operator bool}}
\index{operator bool@{operator bool}!Skeleton\+T\+::\+Iterator@{Skeleton\+T\+::\+Iterator}}
\subsubsection{\texorpdfstring{operator bool()}{operator bool()}}
{\footnotesize\ttfamily template$<$typename PointT $>$ \\
\hyperlink{classSkeletonT}{SkeletonT}$<$ PointT $>$\+::Iterator\+::operator bool (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const}



Returns false if the iterator is done iterating. 

There are two ways to test if the joint iterator has reached its end. Cast it to bool and test if it is false or compare it to the return value of \hyperlink{classSkeletonT_ad5e80649bdb640885fd1b905896d6fbb}{Skeleton\+T$<$$>$\+::end}. 

Definition at line 243 of file Skeleton\+T\+\_\+impl.\+hh.

\mbox{\Hypertarget{classSkeletonT_1_1Iterator_aa6ea357314d65d991f05351a51f0127e}\label{classSkeletonT_1_1Iterator_aa6ea357314d65d991f05351a51f0127e}} 
\index{Skeleton\+T\+::\+Iterator@{Skeleton\+T\+::\+Iterator}!operator"!=@{operator"!=}}
\index{operator"!=@{operator"!=}!Skeleton\+T\+::\+Iterator@{Skeleton\+T\+::\+Iterator}}
\subsubsection{\texorpdfstring{operator"!=()}{operator!=()}}
{\footnotesize\ttfamily template$<$typename PointT $>$ \\
bool \hyperlink{classSkeletonT}{SkeletonT}$<$ PointT $>$\+::Iterator\+::operator!= (\begin{DoxyParamCaption}\item[{const \hyperlink{classSkeletonT_1_1Iterator}{Iterator} \&}]{other }\end{DoxyParamCaption}) const}



Compares the iterators. 

The iterators are equal if they point to the same joint, no matter where they began to iterate. 

Definition at line 187 of file Skeleton\+T\+\_\+impl.\+hh.

\mbox{\Hypertarget{classSkeletonT_1_1Iterator_a91cdb7f384108d63294ebee2641bea0d}\label{classSkeletonT_1_1Iterator_a91cdb7f384108d63294ebee2641bea0d}} 
\index{Skeleton\+T\+::\+Iterator@{Skeleton\+T\+::\+Iterator}!operator++@{operator++}}
\index{operator++@{operator++}!Skeleton\+T\+::\+Iterator@{Skeleton\+T\+::\+Iterator}}
\subsubsection{\texorpdfstring{operator++()}{operator++()}}
{\footnotesize\ttfamily template$<$typename PointT $>$ \\
\hyperlink{classSkeletonT}{SkeletonT}$<$ PointT $>$\+::\hyperlink{classSkeletonT_1_1Iterator}{Iterator} \& \hyperlink{classSkeletonT}{SkeletonT}$<$ PointT $>$\+::Iterator\+::operator++ (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Increase the iterator. 

The iterator will be changed to point to the next child, or whatever joint is next. 

Definition at line 141 of file Skeleton\+T\+\_\+impl.\+hh.

\mbox{\Hypertarget{classSkeletonT_1_1Iterator_addd1fd5d7156a3ddaabbb1d749ca9121}\label{classSkeletonT_1_1Iterator_addd1fd5d7156a3ddaabbb1d749ca9121}} 
\index{Skeleton\+T\+::\+Iterator@{Skeleton\+T\+::\+Iterator}!operator-\/$>$@{operator-\/$>$}}
\index{operator-\/$>$@{operator-\/$>$}!Skeleton\+T\+::\+Iterator@{Skeleton\+T\+::\+Iterator}}
\subsubsection{\texorpdfstring{operator-\/$>$()}{operator->()}}
{\footnotesize\ttfamily template$<$typename PointT $>$ \\
\hyperlink{classSkeletonT}{SkeletonT}$<$ PointT $>$\+::\hyperlink{classJointT}{Joint} $\ast$ \hyperlink{classSkeletonT}{SkeletonT}$<$ PointT $>$\+::Iterator\+::operator-\/$>$ (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const}



Returns a pointer to the current joint. 

This way it is possible to access the joint by calling\+: 
\begin{DoxyCode}
\hyperlink{classSkeletonT_1_1Iterator}{SkeletonT<>::Iterator} it;
...
it->method();
\end{DoxyCode}
 

Definition at line 229 of file Skeleton\+T\+\_\+impl.\+hh.

\mbox{\Hypertarget{classSkeletonT_1_1Iterator_a8b005f609f70a73d2a0695b68c234529}\label{classSkeletonT_1_1Iterator_a8b005f609f70a73d2a0695b68c234529}} 
\index{Skeleton\+T\+::\+Iterator@{Skeleton\+T\+::\+Iterator}!operator=@{operator=}}
\index{operator=@{operator=}!Skeleton\+T\+::\+Iterator@{Skeleton\+T\+::\+Iterator}}
\subsubsection{\texorpdfstring{operator=()}{operator=()}}
{\footnotesize\ttfamily template$<$typename PointT $>$ \\
\hyperlink{classSkeletonT}{SkeletonT}$<$ PointT $>$\+::\hyperlink{classSkeletonT_1_1Iterator}{Iterator} \& \hyperlink{classSkeletonT}{SkeletonT}$<$ PointT $>$\+::Iterator\+::operator= (\begin{DoxyParamCaption}\item[{const \hyperlink{classSkeletonT_1_1Iterator}{Iterator} \&}]{other }\end{DoxyParamCaption})}



Assignment Operator. 

Assign values from given iterator to this iterator and also return self 

Definition at line 126 of file Skeleton\+T\+\_\+impl.\+hh.

\mbox{\Hypertarget{classSkeletonT_1_1Iterator_abcda1f46c9bc4235a68d19644d91777a}\label{classSkeletonT_1_1Iterator_abcda1f46c9bc4235a68d19644d91777a}} 
\index{Skeleton\+T\+::\+Iterator@{Skeleton\+T\+::\+Iterator}!operator==@{operator==}}
\index{operator==@{operator==}!Skeleton\+T\+::\+Iterator@{Skeleton\+T\+::\+Iterator}}
\subsubsection{\texorpdfstring{operator==()}{operator==()}}
{\footnotesize\ttfamily template$<$typename PointT $>$ \\
bool \hyperlink{classSkeletonT}{SkeletonT}$<$ PointT $>$\+::Iterator\+::operator== (\begin{DoxyParamCaption}\item[{const \hyperlink{classSkeletonT_1_1Iterator}{Iterator} \&}]{other }\end{DoxyParamCaption}) const}



Compares the iterators. 

The iterators are equal if they point to the same joint, no matter where they began to iterate. 

Definition at line 200 of file Skeleton\+T\+\_\+impl.\+hh.



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