\hypertarget{a08972}{}\section{Open\+Mesh\+:\+:Decimater\+:\+:Mod\+Normal\+DeviationT$<$ MeshT $>$ Class Template Reference}
\label{a08972}\index{Open\+Mesh\+::\+Decimater\+::\+Mod\+Normal\+Deviation\+T$<$ Mesh\+T $>$@{Open\+Mesh\+::\+Decimater\+::\+Mod\+Normal\+Deviation\+T$<$ Mesh\+T $>$}}


Use Normal deviation to control decimation.  




{\ttfamily \#include $<$Open\+Flipper/libs\+\_\+required/\+Open\+Mesh/src/\+Open\+Mesh/\+Tools/\+Decimater/\+Mod\+Normal\+Deviation\+T.\+hh$>$}

Inheritance diagram for Open\+Mesh\+:\+:Decimater\+:\+:Mod\+Normal\+DeviationT$<$ MeshT $>$\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{a08972}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a08972_a9e85ab0725e6de3c6084cab601e3a8cc}\label{a08972_a9e85ab0725e6de3c6084cab601e3a8cc}} 
typedef \hyperlink{a08776_a15372f27edf521d8e9028e2abccae342}{Mesh\+::\+Scalar} {\bfseries Scalar}
\item 
\mbox{\Hypertarget{a08972_ac94465e11b99346c5be7796ddd5256e5}\label{a08972_ac94465e11b99346c5be7796ddd5256e5}} 
typedef \hyperlink{a08776_aed10fb4dfb536b53a5e20c8f2442eadf}{Mesh\+::\+Point} {\bfseries Point}
\item 
\mbox{\Hypertarget{a08972_ab5a127bbc5af7d2ec291ff09404b0030}\label{a08972_ab5a127bbc5af7d2ec291ff09404b0030}} 
typedef \hyperlink{a08776_a3570fd132d1ac589b380485cf59c9e0b}{Mesh\+::\+Normal} {\bfseries Normal}
\item 
\mbox{\Hypertarget{a08972_a959b268e3e9d11957fa748804a569454}\label{a08972_a959b268e3e9d11957fa748804a569454}} 
typedef \hyperlink{a08776_a0fc18e13d70825938274e3faf7b55e01}{Mesh\+::\+Vertex\+Handle} {\bfseries Vertex\+Handle}
\item 
\mbox{\Hypertarget{a08972_a0d15bd3f564575c0707c5d24542774a4}\label{a08972_a0d15bd3f564575c0707c5d24542774a4}} 
typedef Mesh\+::\+Face\+Handle {\bfseries Face\+Handle}
\item 
\mbox{\Hypertarget{a08972_aca933991fbc250a445744fe55b8aaa7a}\label{a08972_aca933991fbc250a445744fe55b8aaa7a}} 
typedef Mesh\+::\+Edge\+Handle {\bfseries Edge\+Handle}
\item 
\mbox{\Hypertarget{a08972_a7a2fd8f7280a973426d9e31ae15f15d8}\label{a08972_a7a2fd8f7280a973426d9e31ae15f15d8}} 
typedef \hyperlink{a08424}{Normal\+ConeT}$<$ Scalar $>$ {\bfseries Normal\+Cone}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a08972_a17d112b7c54488468b70fa65e93a25e6}\label{a08972_a17d112b7c54488468b70fa65e93a25e6}} 
{\bfseries D\+E\+C\+I\+M\+A\+T\+I\+N\+G\+\_\+\+M\+O\+D\+U\+LE} (\hyperlink{a08972}{Mod\+Normal\+DeviationT}, MeshT, Normal\+Deviation)
\item 
\mbox{\Hypertarget{a08972_a9ce9d2155ccb0c7719081d7e0ec2c023}\label{a08972_a9ce9d2155ccb0c7719081d7e0ec2c023}} 
\hyperlink{a08972_a9ce9d2155ccb0c7719081d7e0ec2c023}{Mod\+Normal\+DeviationT} (MeshT \&\+\_\+mesh, float \+\_\+max\+\_\+dev=180.\+0)
\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08972_a598f31b76401fff7f03b1ade2ea8345a}\label{a08972_a598f31b76401fff7f03b1ade2ea8345a}} 
\hyperlink{a08972_a598f31b76401fff7f03b1ade2ea8345a}{$\sim$\+Mod\+Normal\+DeviationT} ()
\begin{DoxyCompactList}\small\item\em Destructor. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08972_a1763b9ccf7233d0e066ec15eadfc1bc2}\label{a08972_a1763b9ccf7233d0e066ec15eadfc1bc2}} 
Scalar \hyperlink{a08972_a1763b9ccf7233d0e066ec15eadfc1bc2}{normal\+\_\+deviation} () const
\begin{DoxyCompactList}\small\item\em Get normal deviation ( 0 .. 360 ) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08972_a083312c66b27b936d28fceb86e32bc86}\label{a08972_a083312c66b27b936d28fceb86e32bc86}} 
void \hyperlink{a08972_a083312c66b27b936d28fceb86e32bc86}{set\+\_\+normal\+\_\+deviation} (Scalar \+\_\+s)
\begin{DoxyCompactList}\small\item\em Set normal deviation ( 0 .. 360 ) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08972_aebc3a2df21b76c4f7f70d668a5b2ae27}\label{a08972_aebc3a2df21b76c4f7f70d668a5b2ae27}} 
void \hyperlink{a08972_aebc3a2df21b76c4f7f70d668a5b2ae27}{initialize} ()
\begin{DoxyCompactList}\small\item\em Allocate and init normal cones. \end{DoxyCompactList}\item 
float \hyperlink{a08972_a46e41a1f64c62f72207d842f4cb581af}{collapse\+\_\+priority} (const \hyperlink{a08928}{Collapse\+Info} \&\+\_\+ci)
\begin{DoxyCompactList}\small\item\em Control normals when Decimating. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08972_a03b1ad704d30d9a3d8cbf0ba1d97af46}\label{a08972_a03b1ad704d30d9a3d8cbf0ba1d97af46}} 
void \hyperlink{a08972_a03b1ad704d30d9a3d8cbf0ba1d97af46}{set\+\_\+error\+\_\+tolerance\+\_\+factor} (double \+\_\+factor)
\begin{DoxyCompactList}\small\item\em set the percentage of normal deviation \end{DoxyCompactList}\item 
void \hyperlink{a08972_a4f1c81426de1133b30357b14bc9030e8}{postprocess\+\_\+collapse} (const \hyperlink{a08928}{Collapse\+Info} \&\+\_\+ci)
\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a08972_a46ffa461371cffa9f36d7d7c4b16f17e}\label{a08972_a46ffa461371cffa9f36d7d7c4b16f17e}} 
Mesh \& {\bfseries mesh\+\_\+}
\item 
\mbox{\Hypertarget{a08972_a112b418ef0d3325c707de83bdc946ddc}\label{a08972_a112b418ef0d3325c707de83bdc946ddc}} 
Scalar {\bfseries normal\+\_\+deviation\+\_\+}
\item 
\mbox{\Hypertarget{a08972_afaeeba918210db43d92862966927c294}\label{a08972_afaeeba918210db43d92862966927c294}} 
\hyperlink{a08888}{Open\+Mesh\+::\+F\+Prop\+HandleT}$<$ \hyperlink{a08424}{Normal\+Cone} $>$ {\bfseries normal\+\_\+cones\+\_\+}
\end{DoxyCompactItemize}
\subsection*{Additional Inherited Members}


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

Use Normal deviation to control decimation. 

The module tracks the normals while decimating a normal cone consisting of all normals of the faces collapsed together is computed and if a collapse would increase the size of the cone to a value greater than the given value the collapse will be illegal.

In binary and mode, the collapse is legal if\+:
\begin{DoxyItemize}
\item The normal deviation after the collapse is lower than the given value
\end{DoxyItemize}

In continuous mode the maximal deviation is returned 

Definition at line 88 of file Mod\+Normal\+Deviation\+T.\+hh.



\subsection{Member Function Documentation}
\mbox{\Hypertarget{a08972_a46e41a1f64c62f72207d842f4cb581af}\label{a08972_a46e41a1f64c62f72207d842f4cb581af}} 
\index{Open\+Mesh\+::\+Decimater\+::\+Mod\+Normal\+DeviationT@{Open\+Mesh\+::\+Decimater\+::\+Mod\+Normal\+DeviationT}!collapse\+\_\+priority@{collapse\+\_\+priority}}
\index{collapse\+\_\+priority@{collapse\+\_\+priority}!Open\+Mesh\+::\+Decimater\+::\+Mod\+Normal\+DeviationT@{Open\+Mesh\+::\+Decimater\+::\+Mod\+Normal\+DeviationT}}
\subsubsection{\texorpdfstring{collapse\+\_\+priority()}{collapse\_priority()}}
{\footnotesize\ttfamily template$<$class MeshT$>$ \\
float \hyperlink{a08972}{Open\+Mesh\+::\+Decimater\+::\+Mod\+Normal\+DeviationT}$<$ MeshT $>$\+::collapse\+\_\+priority (\begin{DoxyParamCaption}\item[{const \hyperlink{a08928}{Collapse\+Info} \&}]{\+\_\+ci }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



Control normals when Decimating. 

Binary and Cont. mode.

The module tracks the normals while decimating a normal cone consisting of all normals of the faces collapsed together is computed and if a collapse would increase the size of the cone to a value greater than the given value the collapse will be illegal.


\begin{DoxyParams}{Parameters}
{\em \+\_\+ci} & Collapse info data \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Half of the normal cones size (radius in radians) 
\end{DoxyReturn}


Reimplemented from \hyperlink{a08956_acb81c6b9a752741fce2366ca605cd14c}{Open\+Mesh\+::\+Decimater\+::\+Mod\+Base\+T$<$ Mesh\+T $>$}.



Definition at line 168 of file Mod\+Normal\+Deviation\+T.\+hh.

\mbox{\Hypertarget{a08972_a4f1c81426de1133b30357b14bc9030e8}\label{a08972_a4f1c81426de1133b30357b14bc9030e8}} 
\index{Open\+Mesh\+::\+Decimater\+::\+Mod\+Normal\+DeviationT@{Open\+Mesh\+::\+Decimater\+::\+Mod\+Normal\+DeviationT}!postprocess\+\_\+collapse@{postprocess\+\_\+collapse}}
\index{postprocess\+\_\+collapse@{postprocess\+\_\+collapse}!Open\+Mesh\+::\+Decimater\+::\+Mod\+Normal\+DeviationT@{Open\+Mesh\+::\+Decimater\+::\+Mod\+Normal\+DeviationT}}
\subsubsection{\texorpdfstring{postprocess\+\_\+collapse()}{postprocess\_collapse()}}
{\footnotesize\ttfamily template$<$class MeshT$>$ \\
void \hyperlink{a08972}{Open\+Mesh\+::\+Decimater\+::\+Mod\+Normal\+DeviationT}$<$ MeshT $>$\+::postprocess\+\_\+collapse (\begin{DoxyParamCaption}\item[{const \hyperlink{a08928}{Collapse\+Info} \&}]{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}

After \+\_\+from\+\_\+vh has been collapsed into \+\_\+to\+\_\+vh, this method will be called. 

Reimplemented from \hyperlink{a08956_a9b79ddfa2e7771572dd558c928edcdeb}{Open\+Mesh\+::\+Decimater\+::\+Mod\+Base\+T$<$ Mesh\+T $>$}.



Definition at line 219 of file Mod\+Normal\+Deviation\+T.\+hh.



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
Open\+Flipper/libs\+\_\+required/\+Open\+Mesh/src/\+Open\+Mesh/\+Tools/\+Decimater/\hyperlink{a02225}{Mod\+Normal\+Deviation\+T.\+hh}\end{DoxyCompactItemize}
