\hypertarget{a08924}{}\section{Open\+Mesh\+:\+:Decimater\+:\+:Base\+DecimaterT$<$ MeshT $>$ Class Template Reference}
\label{a08924}\index{Open\+Mesh\+::\+Decimater\+::\+Base\+Decimater\+T$<$ Mesh\+T $>$@{Open\+Mesh\+::\+Decimater\+::\+Base\+Decimater\+T$<$ Mesh\+T $>$}}
Inheritance diagram for Open\+Mesh\+:\+:Decimater\+:\+:Base\+DecimaterT$<$ MeshT $>$\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3.601286cm]{a08924}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a08924_acf71a7f9e9717f9a1be7e0d10bc84615}\label{a08924_acf71a7f9e9717f9a1be7e0d10bc84615}} 
typedef \hyperlink{a08924}{Base\+DecimaterT}$<$ MeshT $>$ {\bfseries Self}
\item 
\mbox{\Hypertarget{a08924_a8b1d851255dd19a1fad12f47304e105b}\label{a08924_a8b1d851255dd19a1fad12f47304e105b}} 
typedef MeshT {\bfseries Mesh}
\item 
\mbox{\Hypertarget{a08924_a0e0e078a178ebfcaa0d567cafabf0d93}\label{a08924_a0e0e078a178ebfcaa0d567cafabf0d93}} 
typedef \hyperlink{a08928}{Collapse\+InfoT}$<$ MeshT $>$ {\bfseries Collapse\+Info}
\item 
\mbox{\Hypertarget{a08924_a2d74f124a7f8ae0c471760fe34bae571}\label{a08924_a2d74f124a7f8ae0c471760fe34bae571}} 
typedef \hyperlink{a08956}{Mod\+BaseT}$<$ MeshT $>$ {\bfseries Module}
\item 
\mbox{\Hypertarget{a08924_aaa1e4a65ab8d2507eecfe16553c9a2b8}\label{a08924_aaa1e4a65ab8d2507eecfe16553c9a2b8}} 
typedef std\+::vector$<$ \hyperlink{a08956}{Module} $\ast$$>$ {\bfseries Module\+List}
\item 
\mbox{\Hypertarget{a08924_a630207b818e071bc7f6b10e5d7bc8801}\label{a08924_a630207b818e071bc7f6b10e5d7bc8801}} 
typedef Module\+List\+::iterator {\bfseries Module\+List\+Iterator}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a08924_adcba4546553667f83876afc88f2e36cc}\label{a08924_adcba4546553667f83876afc88f2e36cc}} 
{\bfseries Base\+DecimaterT} (Mesh \&\+\_\+mesh)
\item 
bool \hyperlink{a08924_a6b828064b2a7fa5b03b637bae507ac62}{initialize} ()
\item 
\mbox{\Hypertarget{a08924_ac01a4c49f9efd1de8ef886f7ff2b58ca}\label{a08924_ac01a4c49f9efd1de8ef886f7ff2b58ca}} 
bool \hyperlink{a08924_ac01a4c49f9efd1de8ef886f7ff2b58ca}{is\+\_\+initialized} () const
\begin{DoxyCompactList}\small\item\em Returns whether decimater has been successfully initialized. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08924_a0a007b3d7e3620ecb3d99516945259f4}\label{a08924_a0a007b3d7e3620ecb3d99516945259f4}} 
void \hyperlink{a08924_a0a007b3d7e3620ecb3d99516945259f4}{info} (std\+::ostream \&\+\_\+os)
\begin{DoxyCompactList}\small\item\em \hyperlink{a11736}{Print} information about modules to \+\_\+os. \end{DoxyCompactList}\item 
void \hyperlink{a08924_a596e2729e5a998715b535590fcfd00c8}{set\+\_\+observer} (\hyperlink{a08996}{Observer} $\ast$\+\_\+o)
\begin{DoxyCompactList}\small\item\em Add observer. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08924_a9018b5e7fcc152cc7d85a6a99bf02bd5}\label{a08924_a9018b5e7fcc152cc7d85a6a99bf02bd5}} 
\hyperlink{a08996}{Observer} $\ast$ \hyperlink{a08924_a9018b5e7fcc152cc7d85a6a99bf02bd5}{observer} ()
\begin{DoxyCompactList}\small\item\em Get current observer of a decimater. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08924_aa5d6598dced77ec6d97823559a3e58dc}\label{a08924_aa5d6598dced77ec6d97823559a3e58dc}} 
Mesh \& \hyperlink{a08924_aa5d6598dced77ec6d97823559a3e58dc}{mesh} ()
\begin{DoxyCompactList}\small\item\em access mesh. used in modules. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08924_a2168dd685ec75cc239516d2570703036}\label{a08924_a2168dd685ec75cc239516d2570703036}} 
{\footnotesize template$<$typename \+\_\+\+Module $>$ }\\bool \hyperlink{a08924_a2168dd685ec75cc239516d2570703036}{add} (\hyperlink{a08952}{Mod\+HandleT}$<$ \+\_\+\+Module $>$ \&\+\_\+mh)
\begin{DoxyCompactList}\small\item\em add module to decimater \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08924_a0b81adeaacfda9773ff6c3584f1f014b}\label{a08924_a0b81adeaacfda9773ff6c3584f1f014b}} 
{\footnotesize template$<$typename \+\_\+\+Module $>$ }\\bool \hyperlink{a08924_a0b81adeaacfda9773ff6c3584f1f014b}{remove} (\hyperlink{a08952}{Mod\+HandleT}$<$ \+\_\+\+Module $>$ \&\+\_\+mh)
\begin{DoxyCompactList}\small\item\em remove module \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08924_a9854adb7ec9f2419ece2067b5f237cfa}\label{a08924_a9854adb7ec9f2419ece2067b5f237cfa}} 
{\footnotesize template$<$typename Module $>$ }\\\hyperlink{a08956}{Module} \& \hyperlink{a08924_a9854adb7ec9f2419ece2067b5f237cfa}{module} (\hyperlink{a08952}{Mod\+HandleT}$<$ \hyperlink{a08956}{Module} $>$ \&\+\_\+mh)
\begin{DoxyCompactList}\small\item\em get module referenced by handle \+\_\+mh \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a08924_a181b92fd81aea37771dbbe9d0f7b4b30}\label{a08924_a181b92fd81aea37771dbbe9d0f7b4b30}} 
bool \hyperlink{a08924_a181b92fd81aea37771dbbe9d0f7b4b30}{notify\+\_\+observer} (size\+\_\+t \+\_\+n\+\_\+collapses)
\begin{DoxyCompactList}\small\item\em returns false, if abort requested by observer \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08924_a7999f437ff1a15e28f1621b77f62974e}\label{a08924_a7999f437ff1a15e28f1621b77f62974e}} 
void \hyperlink{a08924_a7999f437ff1a15e28f1621b77f62974e}{set\+\_\+uninitialized} ()
\begin{DoxyCompactList}\small\item\em Reset the initialized flag, and clear the bmodules\+\_\+ and cmodule\+\_\+. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08924_a11f4e99daaa70662eb5556115b7ba68b}\label{a08924_a11f4e99daaa70662eb5556115b7ba68b}} 
void {\bfseries update\+\_\+modules} (\hyperlink{a08928}{Collapse\+Info} \&\+\_\+ci)
\item 
bool \hyperlink{a08924_aebbb2f4afd23574937109486a4ac6d1b}{is\+\_\+collapse\+\_\+legal} (const \hyperlink{a08928}{Collapse\+Info} \&\+\_\+ci)
\item 
\mbox{\Hypertarget{a08924_a3046073cf42608d314df3c4dfc2d49b4}\label{a08924_a3046073cf42608d314df3c4dfc2d49b4}} 
float \hyperlink{a08924_a3046073cf42608d314df3c4dfc2d49b4}{collapse\+\_\+priority} (const \hyperlink{a08928}{Collapse\+Info} \&\+\_\+ci)
\begin{DoxyCompactList}\small\item\em Calculate priority of an halfedge collapse (using the modules) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08924_a5a2763cdc33d785a1f53aed2168a7189}\label{a08924_a5a2763cdc33d785a1f53aed2168a7189}} 
void \hyperlink{a08924_a5a2763cdc33d785a1f53aed2168a7189}{preprocess\+\_\+collapse} (\hyperlink{a08928}{Collapse\+Info} \&\+\_\+ci)
\begin{DoxyCompactList}\small\item\em Pre-\/process a collapse. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08924_a8a3153d5847b381262fc15d110c3f10e}\label{a08924_a8a3153d5847b381262fc15d110c3f10e}} 
void \hyperlink{a08924_a8a3153d5847b381262fc15d110c3f10e}{postprocess\+\_\+collapse} (\hyperlink{a08928}{Collapse\+Info} \&\+\_\+ci)
\begin{DoxyCompactList}\small\item\em Post-\/process a collapse. \end{DoxyCompactList}\item 
void \hyperlink{a08924_a2ee8ed71b9fdf8524d12cfae47f63ed9}{set\+\_\+error\+\_\+tolerance\+\_\+factor} (double \+\_\+factor)
\item 
void \hyperlink{a08924_ae97d95611924a0630a111543d2c8bf1e}{reset} ()
\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a08924_a3a468e050b3a1db68e214aaa5bcd8a7f}\label{a08924_a3a468e050b3a1db68e214aaa5bcd8a7f}} 
Mesh \& \hyperlink{a08924_a3a468e050b3a1db68e214aaa5bcd8a7f}{mesh\+\_\+}
\begin{DoxyCompactList}\small\item\em reference to mesh \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08924_a9fbb09edeea8d023330d4c63e59f2cbe}\label{a08924_a9fbb09edeea8d023330d4c63e59f2cbe}} 
Module\+List \hyperlink{a08924_a9fbb09edeea8d023330d4c63e59f2cbe}{bmodules\+\_\+}
\begin{DoxyCompactList}\small\item\em list of binary modules \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08924_a660b2f0fbb71240126347556540d0dc6}\label{a08924_a660b2f0fbb71240126347556540d0dc6}} 
\hyperlink{a08956}{Module} $\ast$ \hyperlink{a08924_a660b2f0fbb71240126347556540d0dc6}{cmodule\+\_\+}
\begin{DoxyCompactList}\small\item\em the current priority module \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08924_a563ca63f4af6eda819178ed9545808c6}\label{a08924_a563ca63f4af6eda819178ed9545808c6}} 
Module\+List \hyperlink{a08924_a563ca63f4af6eda819178ed9545808c6}{all\+\_\+modules\+\_\+}
\begin{DoxyCompactList}\small\item\em list of all allocated modules (including cmodule\+\_\+ and all of bmodules\+\_\+) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08924_a8f55561911aaf174c1f4ddaadfa14280}\label{a08924_a8f55561911aaf174c1f4ddaadfa14280}} 
bool \hyperlink{a08924_a8f55561911aaf174c1f4ddaadfa14280}{initialized\+\_\+}
\begin{DoxyCompactList}\small\item\em Flag if all modules were initialized. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08924_a425962c5a129ded9311daf22d8e6c80d}\label{a08924_a425962c5a129ded9311daf22d8e6c80d}} 
\hyperlink{a08996}{Observer} $\ast$ \hyperlink{a08924_a425962c5a129ded9311daf22d8e6c80d}{observer\+\_\+}
\begin{DoxyCompactList}\small\item\em observer \end{DoxyCompactList}\end{DoxyCompactItemize}


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



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



\subsection{Member Function Documentation}
\mbox{\Hypertarget{a08924_a6b828064b2a7fa5b03b637bae507ac62}\label{a08924_a6b828064b2a7fa5b03b637bae507ac62}} 
\index{Open\+Mesh\+::\+Decimater\+::\+Base\+DecimaterT@{Open\+Mesh\+::\+Decimater\+::\+Base\+DecimaterT}!initialize@{initialize}}
\index{initialize@{initialize}!Open\+Mesh\+::\+Decimater\+::\+Base\+DecimaterT@{Open\+Mesh\+::\+Decimater\+::\+Base\+DecimaterT}}
\subsubsection{\texorpdfstring{initialize()}{initialize()}}
{\footnotesize\ttfamily template$<$class Mesh $>$ \\
bool \hyperlink{a08924}{Open\+Mesh\+::\+Decimater\+::\+Base\+DecimaterT}$<$ Mesh $>$\+::initialize (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}

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 236 of file Base\+Decimater\+T\+\_\+impl.\+hh.

\mbox{\Hypertarget{a08924_aebbb2f4afd23574937109486a4ac6d1b}\label{a08924_aebbb2f4afd23574937109486a4ac6d1b}} 
\index{Open\+Mesh\+::\+Decimater\+::\+Base\+DecimaterT@{Open\+Mesh\+::\+Decimater\+::\+Base\+DecimaterT}!is\+\_\+collapse\+\_\+legal@{is\+\_\+collapse\+\_\+legal}}
\index{is\+\_\+collapse\+\_\+legal@{is\+\_\+collapse\+\_\+legal}!Open\+Mesh\+::\+Decimater\+::\+Base\+DecimaterT@{Open\+Mesh\+::\+Decimater\+::\+Base\+DecimaterT}}
\subsubsection{\texorpdfstring{is\+\_\+collapse\+\_\+legal()}{is\_collapse\_legal()}}
{\footnotesize\ttfamily template$<$class Mesh $>$ \\
bool \hyperlink{a08924}{Open\+Mesh\+::\+Decimater\+::\+Base\+DecimaterT}$<$ Mesh $>$\+::is\+\_\+collapse\+\_\+legal (\begin{DoxyParamCaption}\item[{const \hyperlink{a08928}{Collapse\+Info} \&}]{\+\_\+ci }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [protected]}}

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 100 of file Base\+Decimater\+T\+\_\+impl.\+hh.

\mbox{\Hypertarget{a08924_ae97d95611924a0630a111543d2c8bf1e}\label{a08924_ae97d95611924a0630a111543d2c8bf1e}} 
\index{Open\+Mesh\+::\+Decimater\+::\+Base\+DecimaterT@{Open\+Mesh\+::\+Decimater\+::\+Base\+DecimaterT}!reset@{reset}}
\index{reset@{reset}!Open\+Mesh\+::\+Decimater\+::\+Base\+DecimaterT@{Open\+Mesh\+::\+Decimater\+::\+Base\+DecimaterT}}
\subsubsection{\texorpdfstring{reset()}{reset()}}
{\footnotesize\ttfamily template$<$typename MeshT $>$ \\
void \hyperlink{a08924}{Open\+Mesh\+::\+Decimater\+::\+Base\+DecimaterT}$<$ MeshT $>$\+::reset (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [protected]}}

Reset the status of this class

You have to call initialize again!! 

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

\mbox{\Hypertarget{a08924_a2ee8ed71b9fdf8524d12cfae47f63ed9}\label{a08924_a2ee8ed71b9fdf8524d12cfae47f63ed9}} 
\index{Open\+Mesh\+::\+Decimater\+::\+Base\+DecimaterT@{Open\+Mesh\+::\+Decimater\+::\+Base\+DecimaterT}!set\+\_\+error\+\_\+tolerance\+\_\+factor@{set\+\_\+error\+\_\+tolerance\+\_\+factor}}
\index{set\+\_\+error\+\_\+tolerance\+\_\+factor@{set\+\_\+error\+\_\+tolerance\+\_\+factor}!Open\+Mesh\+::\+Decimater\+::\+Base\+DecimaterT@{Open\+Mesh\+::\+Decimater\+::\+Base\+DecimaterT}}
\subsubsection{\texorpdfstring{set\+\_\+error\+\_\+tolerance\+\_\+factor()}{set\_error\_tolerance\_factor()}}
{\footnotesize\ttfamily template$<$class Mesh $>$ \\
void \hyperlink{a08924}{Open\+Mesh\+::\+Decimater\+::\+Base\+DecimaterT}$<$ Mesh $>$\+::set\+\_\+error\+\_\+tolerance\+\_\+factor (\begin{DoxyParamCaption}\item[{double}]{\+\_\+factor }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [protected]}}

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 191 of file Base\+Decimater\+T\+\_\+impl.\+hh.

\mbox{\Hypertarget{a08924_a596e2729e5a998715b535590fcfd00c8}\label{a08924_a596e2729e5a998715b535590fcfd00c8}} 
\index{Open\+Mesh\+::\+Decimater\+::\+Base\+DecimaterT@{Open\+Mesh\+::\+Decimater\+::\+Base\+DecimaterT}!set\+\_\+observer@{set\+\_\+observer}}
\index{set\+\_\+observer@{set\+\_\+observer}!Open\+Mesh\+::\+Decimater\+::\+Base\+DecimaterT@{Open\+Mesh\+::\+Decimater\+::\+Base\+DecimaterT}}
\subsubsection{\texorpdfstring{set\+\_\+observer()}{set\_observer()}}
{\footnotesize\ttfamily template$<$typename MeshT $>$ \\
void \hyperlink{a08924}{Open\+Mesh\+::\+Decimater\+::\+Base\+DecimaterT}$<$ MeshT $>$\+::set\+\_\+observer (\begin{DoxyParamCaption}\item[{\hyperlink{a08996}{Observer} $\ast$}]{\+\_\+o }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



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{a08996}{Observer} to be used \\
\hline
\end{DoxyParams}


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



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