\hypertarget{a00313}{\section{Open\+Mesh\+:\+:Decimater\+:\+:Base\+Decimater\+T$<$ Mesh\+T $>$ Singleton Reference}
\label{a00313}\index{Open\+Mesh\+::\+Decimater\+::\+Base\+Decimater\+T$<$ Mesh\+T $>$@{Open\+Mesh\+::\+Decimater\+::\+Base\+Decimater\+T$<$ Mesh\+T $>$}}
}
Inheritance diagram for Open\+Mesh\+:\+:Decimater\+:\+:Base\+Decimater\+T$<$ Mesh\+T $>$\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3.601286cm]{a00313}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a00313_acf71a7f9e9717f9a1be7e0d10bc84615}{typedef \hyperlink{a00313}{Base\+Decimater\+T}$<$ Mesh\+T $>$ {\bfseries Self}}\label{a00313_acf71a7f9e9717f9a1be7e0d10bc84615}

\item 
\hypertarget{a00313_a8b1d851255dd19a1fad12f47304e105b}{typedef Mesh\+T {\bfseries Mesh}}\label{a00313_a8b1d851255dd19a1fad12f47304e105b}

\item 
\hypertarget{a00313_a0e0e078a178ebfcaa0d567cafabf0d93}{typedef \hyperlink{a00417}{Collapse\+Info\+T}$<$ Mesh\+T $>$ {\bfseries Collapse\+Info}}\label{a00313_a0e0e078a178ebfcaa0d567cafabf0d93}

\item 
\hypertarget{a00313_a2d74f124a7f8ae0c471760fe34bae571}{typedef \hyperlink{a00846}{Mod\+Base\+T}$<$ Mesh\+T $>$ {\bfseries Module}}\label{a00313_a2d74f124a7f8ae0c471760fe34bae571}

\item 
\hypertarget{a00313_aaa1e4a65ab8d2507eecfe16553c9a2b8}{typedef std\+::vector$<$ \hyperlink{a00846}{Module} $\ast$ $>$ {\bfseries Module\+List}}\label{a00313_aaa1e4a65ab8d2507eecfe16553c9a2b8}

\item 
\hypertarget{a00313_a630207b818e071bc7f6b10e5d7bc8801}{typedef Module\+List\+::iterator {\bfseries Module\+List\+Iterator}}\label{a00313_a630207b818e071bc7f6b10e5d7bc8801}

\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a00313_adcba4546553667f83876afc88f2e36cc}{{\bfseries Base\+Decimater\+T} (Mesh \&\+\_\+mesh)}\label{a00313_adcba4546553667f83876afc88f2e36cc}

\item 
bool \hyperlink{a00313_a6b828064b2a7fa5b03b637bae507ac62}{initialize} ()
\item 
\hypertarget{a00313_ad8bb8df36d34e27775aebe3844fab935}{bool \hyperlink{a00313_ad8bb8df36d34e27775aebe3844fab935}{is\+\_\+initialized} () const }\label{a00313_ad8bb8df36d34e27775aebe3844fab935}

\begin{DoxyCompactList}\small\item\em Returns whether decimater has been successfully initialized. \end{DoxyCompactList}\item 
\hypertarget{a00313_a0a007b3d7e3620ecb3d99516945259f4}{void \hyperlink{a00313_a0a007b3d7e3620ecb3d99516945259f4}{info} (std\+::ostream \&\+\_\+os)}\label{a00313_a0a007b3d7e3620ecb3d99516945259f4}

\begin{DoxyCompactList}\small\item\em \hyperlink{a01015}{Print} information about modules to \+\_\+os. \end{DoxyCompactList}\item 
void \hyperlink{a00313_a596e2729e5a998715b535590fcfd00c8}{set\+\_\+observer} (\hyperlink{a00907}{Observer} $\ast$\+\_\+o)
\begin{DoxyCompactList}\small\item\em Add observer. \end{DoxyCompactList}\item 
\hypertarget{a00313_a9018b5e7fcc152cc7d85a6a99bf02bd5}{\hyperlink{a00907}{Observer} $\ast$ \hyperlink{a00313_a9018b5e7fcc152cc7d85a6a99bf02bd5}{observer} ()}\label{a00313_a9018b5e7fcc152cc7d85a6a99bf02bd5}

\begin{DoxyCompactList}\small\item\em Get current observer of a decimater. \end{DoxyCompactList}\item 
\hypertarget{a00313_aa5d6598dced77ec6d97823559a3e58dc}{Mesh \& \hyperlink{a00313_aa5d6598dced77ec6d97823559a3e58dc}{mesh} ()}\label{a00313_aa5d6598dced77ec6d97823559a3e58dc}

\begin{DoxyCompactList}\small\item\em access mesh. used in modules. \end{DoxyCompactList}\item 
\hypertarget{a00313_a2168dd685ec75cc239516d2570703036}{{\footnotesize template$<$typename \+\_\+\+Module $>$ }\\bool \hyperlink{a00313_a2168dd685ec75cc239516d2570703036}{add} (\hyperlink{a00848}{Mod\+Handle\+T}$<$ \+\_\+\+Module $>$ \&\+\_\+mh)}\label{a00313_a2168dd685ec75cc239516d2570703036}

\begin{DoxyCompactList}\small\item\em add module to decimater \end{DoxyCompactList}\item 
\hypertarget{a00313_a0b81adeaacfda9773ff6c3584f1f014b}{{\footnotesize template$<$typename \+\_\+\+Module $>$ }\\bool \hyperlink{a00313_a0b81adeaacfda9773ff6c3584f1f014b}{remove} (\hyperlink{a00848}{Mod\+Handle\+T}$<$ \+\_\+\+Module $>$ \&\+\_\+mh)}\label{a00313_a0b81adeaacfda9773ff6c3584f1f014b}

\begin{DoxyCompactList}\small\item\em remove module \end{DoxyCompactList}\item 
\hypertarget{a00313_a9854adb7ec9f2419ece2067b5f237cfa}{{\footnotesize template$<$typename Module $>$ }\\\hyperlink{a00846}{Module} \& \hyperlink{a00313_a9854adb7ec9f2419ece2067b5f237cfa}{module} (\hyperlink{a00848}{Mod\+Handle\+T}$<$ \hyperlink{a00846}{Module} $>$ \&\+\_\+mh)}\label{a00313_a9854adb7ec9f2419ece2067b5f237cfa}

\begin{DoxyCompactList}\small\item\em get module referenced by handle \+\_\+mh \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a00313_a181b92fd81aea37771dbbe9d0f7b4b30}{bool \hyperlink{a00313_a181b92fd81aea37771dbbe9d0f7b4b30}{notify\+\_\+observer} (size\+\_\+t \+\_\+n\+\_\+collapses)}\label{a00313_a181b92fd81aea37771dbbe9d0f7b4b30}

\begin{DoxyCompactList}\small\item\em returns false, if abort requested by observer \end{DoxyCompactList}\item 
\hypertarget{a00313_a7999f437ff1a15e28f1621b77f62974e}{void \hyperlink{a00313_a7999f437ff1a15e28f1621b77f62974e}{set\+\_\+uninitialized} ()}\label{a00313_a7999f437ff1a15e28f1621b77f62974e}

\begin{DoxyCompactList}\small\item\em Reset the initialized flag, and clear the bmodules\+\_\+ and cmodule\+\_\+. \end{DoxyCompactList}\item 
\hypertarget{a00313_a11f4e99daaa70662eb5556115b7ba68b}{void {\bfseries update\+\_\+modules} (\hyperlink{a00417}{Collapse\+Info} \&\+\_\+ci)}\label{a00313_a11f4e99daaa70662eb5556115b7ba68b}

\item 
bool \hyperlink{a00313_aebbb2f4afd23574937109486a4ac6d1b}{is\+\_\+collapse\+\_\+legal} (const \hyperlink{a00417}{Collapse\+Info} \&\+\_\+ci)
\item 
\hypertarget{a00313_a3046073cf42608d314df3c4dfc2d49b4}{float \hyperlink{a00313_a3046073cf42608d314df3c4dfc2d49b4}{collapse\+\_\+priority} (const \hyperlink{a00417}{Collapse\+Info} \&\+\_\+ci)}\label{a00313_a3046073cf42608d314df3c4dfc2d49b4}

\begin{DoxyCompactList}\small\item\em Calculate priority of an halfedge collapse (using the modules) \end{DoxyCompactList}\item 
\hypertarget{a00313_a5a2763cdc33d785a1f53aed2168a7189}{void \hyperlink{a00313_a5a2763cdc33d785a1f53aed2168a7189}{preprocess\+\_\+collapse} (\hyperlink{a00417}{Collapse\+Info} \&\+\_\+ci)}\label{a00313_a5a2763cdc33d785a1f53aed2168a7189}

\begin{DoxyCompactList}\small\item\em Pre-\/process a collapse. \end{DoxyCompactList}\item 
\hypertarget{a00313_a8a3153d5847b381262fc15d110c3f10e}{void \hyperlink{a00313_a8a3153d5847b381262fc15d110c3f10e}{postprocess\+\_\+collapse} (\hyperlink{a00417}{Collapse\+Info} \&\+\_\+ci)}\label{a00313_a8a3153d5847b381262fc15d110c3f10e}

\begin{DoxyCompactList}\small\item\em Post-\/process a collapse. \end{DoxyCompactList}\item 
void \hyperlink{a00313_a2ee8ed71b9fdf8524d12cfae47f63ed9}{set\+\_\+error\+\_\+tolerance\+\_\+factor} (double \+\_\+factor)
\item 
void \hyperlink{a00313_ae97d95611924a0630a111543d2c8bf1e}{reset} ()
\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a00313_a3a468e050b3a1db68e214aaa5bcd8a7f}{Mesh \& \hyperlink{a00313_a3a468e050b3a1db68e214aaa5bcd8a7f}{mesh\+\_\+}}\label{a00313_a3a468e050b3a1db68e214aaa5bcd8a7f}

\begin{DoxyCompactList}\small\item\em reference to mesh \end{DoxyCompactList}\item 
\hypertarget{a00313_a9fbb09edeea8d023330d4c63e59f2cbe}{Module\+List \hyperlink{a00313_a9fbb09edeea8d023330d4c63e59f2cbe}{bmodules\+\_\+}}\label{a00313_a9fbb09edeea8d023330d4c63e59f2cbe}

\begin{DoxyCompactList}\small\item\em list of binary modules \end{DoxyCompactList}\item 
\hypertarget{a00313_a660b2f0fbb71240126347556540d0dc6}{\hyperlink{a00846}{Module} $\ast$ \hyperlink{a00313_a660b2f0fbb71240126347556540d0dc6}{cmodule\+\_\+}}\label{a00313_a660b2f0fbb71240126347556540d0dc6}

\begin{DoxyCompactList}\small\item\em the current priority module \end{DoxyCompactList}\item 
\hypertarget{a00313_a563ca63f4af6eda819178ed9545808c6}{Module\+List \hyperlink{a00313_a563ca63f4af6eda819178ed9545808c6}{all\+\_\+modules\+\_\+}}\label{a00313_a563ca63f4af6eda819178ed9545808c6}

\begin{DoxyCompactList}\small\item\em list of all allocated modules (including cmodule\+\_\+ and all of bmodules\+\_\+) \end{DoxyCompactList}\item 
\hypertarget{a00313_a8f55561911aaf174c1f4ddaadfa14280}{bool \hyperlink{a00313_a8f55561911aaf174c1f4ddaadfa14280}{initialized\+\_\+}}\label{a00313_a8f55561911aaf174c1f4ddaadfa14280}

\begin{DoxyCompactList}\small\item\em Flag if all modules were initialized. \end{DoxyCompactList}\item 
\hypertarget{a00313_a425962c5a129ded9311daf22d8e6c80d}{\hyperlink{a00907}{Observer} $\ast$ \hyperlink{a00313_a425962c5a129ded9311daf22d8e6c80d}{observer\+\_\+}}\label{a00313_a425962c5a129ded9311daf22d8e6c80d}

\begin{DoxyCompactList}\small\item\em observer \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$typename Mesh\+T$>$singleton Open\+Mesh\+::\+Decimater\+::\+Base\+Decimater\+T$<$ Mesh\+T $>$}



Definition at line 90 of file Base\+Decimater\+T.\+hh.



\subsection{Member Function Documentation}
\hypertarget{a00313_a6b828064b2a7fa5b03b637bae507ac62}{\index{Open\+Mesh\+::\+Decimater\+::\+Base\+Decimater\+T@{Open\+Mesh\+::\+Decimater\+::\+Base\+Decimater\+T}!initialize@{initialize}}
\index{initialize@{initialize}!Open\+Mesh\+::\+Decimater\+::\+Base\+Decimater\+T@{Open\+Mesh\+::\+Decimater\+::\+Base\+Decimater\+T}}
\subsubsection[{initialize}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Mesh $>$ bool {\bf Open\+Mesh\+::\+Decimater\+::\+Base\+Decimater\+T}$<$ Mesh $>$\+::initialize (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{a00313_a6b828064b2a7fa5b03b637bae507ac62}
Initialize decimater and decimating modules.

Return values\+: true ok false No ore more than one non-\/binary module exist. In that case the decimater is uninitialized! 

Definition at line 243 of file Base\+Decimater\+T.\+cc.

\hypertarget{a00313_aebbb2f4afd23574937109486a4ac6d1b}{\index{Open\+Mesh\+::\+Decimater\+::\+Base\+Decimater\+T@{Open\+Mesh\+::\+Decimater\+::\+Base\+Decimater\+T}!is\+\_\+collapse\+\_\+legal@{is\+\_\+collapse\+\_\+legal}}
\index{is\+\_\+collapse\+\_\+legal@{is\+\_\+collapse\+\_\+legal}!Open\+Mesh\+::\+Decimater\+::\+Base\+Decimater\+T@{Open\+Mesh\+::\+Decimater\+::\+Base\+Decimater\+T}}
\subsubsection[{is\+\_\+collapse\+\_\+legal}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Mesh $>$ bool {\bf Open\+Mesh\+::\+Decimater\+::\+Base\+Decimater\+T}$<$ Mesh $>$\+::is\+\_\+collapse\+\_\+legal (
\begin{DoxyParamCaption}
\item[{const {\bf Collapse\+Info} \&}]{\+\_\+ci}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [protected]}}}\label{a00313_aebbb2f4afd23574937109486a4ac6d1b}
Is an edge collapse legal? Performs topological test only. The method evaluates the status bit Locked, Deleted, and Feature. \begin{DoxyAttention}{Attention}
The method temporarily sets the bit Tagged. After usage the bit will be disabled! 
\end{DoxyAttention}


Definition at line 107 of file Base\+Decimater\+T.\+cc.

\hypertarget{a00313_ae97d95611924a0630a111543d2c8bf1e}{\index{Open\+Mesh\+::\+Decimater\+::\+Base\+Decimater\+T@{Open\+Mesh\+::\+Decimater\+::\+Base\+Decimater\+T}!reset@{reset}}
\index{reset@{reset}!Open\+Mesh\+::\+Decimater\+::\+Base\+Decimater\+T@{Open\+Mesh\+::\+Decimater\+::\+Base\+Decimater\+T}}
\subsubsection[{reset}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Mesh\+T $>$ void {\bf Open\+Mesh\+::\+Decimater\+::\+Base\+Decimater\+T}$<$ Mesh\+T $>$\+::reset (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [protected]}}}\label{a00313_ae97d95611924a0630a111543d2c8bf1e}
Reset the status of this class

You have to call initialize again!! 

Definition at line 253 of file Base\+Decimater\+T.\+hh.

\hypertarget{a00313_a2ee8ed71b9fdf8524d12cfae47f63ed9}{\index{Open\+Mesh\+::\+Decimater\+::\+Base\+Decimater\+T@{Open\+Mesh\+::\+Decimater\+::\+Base\+Decimater\+T}!set\+\_\+error\+\_\+tolerance\+\_\+factor@{set\+\_\+error\+\_\+tolerance\+\_\+factor}}
\index{set\+\_\+error\+\_\+tolerance\+\_\+factor@{set\+\_\+error\+\_\+tolerance\+\_\+factor}!Open\+Mesh\+::\+Decimater\+::\+Base\+Decimater\+T@{Open\+Mesh\+::\+Decimater\+::\+Base\+Decimater\+T}}
\subsubsection[{set\+\_\+error\+\_\+tolerance\+\_\+factor}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Mesh $>$ void {\bf Open\+Mesh\+::\+Decimater\+::\+Base\+Decimater\+T}$<$ Mesh $>$\+::set\+\_\+error\+\_\+tolerance\+\_\+factor (
\begin{DoxyParamCaption}
\item[{double}]{\+\_\+factor}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [protected]}}}\label{a00313_a2ee8ed71b9fdf8524d12cfae47f63ed9}
This provides a function that allows the setting of a percentage of the original constraint of the modules

Note that some modules might re-\/initialize in their set\+\_\+error\+\_\+tolerance\+\_\+factor function as necessary 
\begin{DoxyParams}{Parameters}
{\em \+\_\+factor} & has to be in the closed interval between 0.\+0 and 1.\+0 \\
\hline
\end{DoxyParams}


Definition at line 198 of file Base\+Decimater\+T.\+cc.

\hypertarget{a00313_a596e2729e5a998715b535590fcfd00c8}{\index{Open\+Mesh\+::\+Decimater\+::\+Base\+Decimater\+T@{Open\+Mesh\+::\+Decimater\+::\+Base\+Decimater\+T}!set\+\_\+observer@{set\+\_\+observer}}
\index{set\+\_\+observer@{set\+\_\+observer}!Open\+Mesh\+::\+Decimater\+::\+Base\+Decimater\+T@{Open\+Mesh\+::\+Decimater\+::\+Base\+Decimater\+T}}
\subsubsection[{set\+\_\+observer}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Mesh\+T $>$ void {\bf Open\+Mesh\+::\+Decimater\+::\+Base\+Decimater\+T}$<$ Mesh\+T $>$\+::set\+\_\+observer (
\begin{DoxyParamCaption}
\item[{{\bf Observer} $\ast$}]{\+\_\+o}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{a00313_a596e2729e5a998715b535590fcfd00c8}


Add observer. 

You can set an observer which is used as a callback to check the decimators progress and to abort it if necessary.


\begin{DoxyParams}{Parameters}
{\em \+\_\+o} & \hyperlink{a00907}{Observer} to be used \\
\hline
\end{DoxyParams}


Definition at line 131 of file Base\+Decimater\+T.\+hh.



The documentation for this singleton was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
libs\+\_\+required/\+Open\+Mesh/src/\+Open\+Mesh/\+Tools/\+Decimater/\hyperlink{a02016}{Base\+Decimater\+T.\+hh}\item 
libs\+\_\+required/\+Open\+Mesh/src/\+Open\+Mesh/\+Tools/\+Decimater/Base\+Decimater\+T.\+cc\end{DoxyCompactItemize}
