\hypertarget{a09080}{}\section{Open\+Mesh\+:\+:Subdivider\+:\+:Adaptive\+:\+:CompositeT$<$ M $>$ Class Template Reference}
\label{a09080}\index{Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+Composite\+T$<$ M $>$@{Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+Composite\+T$<$ M $>$}}


{\ttfamily \#include $<$Open\+Flipper/libs\+\_\+required/\+Open\+Mesh/src/\+Open\+Mesh/\+Tools/\+Subdivider/\+Adaptive/\+Composite/\+Composite\+T.\+hh$>$}

\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a09080_a6a7324f11505d0140f4ce947c3e7872a}\label{a09080_a6a7324f11505d0140f4ce947c3e7872a}} 
typedef \hyperlink{a09076}{Rule\+InterfaceT}$<$ M $>$ {\bfseries Rule}
\item 
\mbox{\Hypertarget{a09080_aa75c59efa30d205c67d551d1cc7e5339}\label{a09080_aa75c59efa30d205c67d551d1cc7e5339}} 
typedef M {\bfseries Mesh}
\item 
\mbox{\Hypertarget{a09080_a27da6988470ed03567f5d4f39f850c97}\label{a09080_a27da6988470ed03567f5d4f39f850c97}} 
typedef std\+::vector$<$ \hyperlink{a09076}{Rule} $\ast$ $>$ {\bfseries Rule\+Sequence}
\item 
\mbox{\Hypertarget{a09080_a94af1e7b58406bbd5cdd2df34389ac5e}\label{a09080_a94af1e7b58406bbd5cdd2df34389ac5e}} 
typedef M\+::\+Vertex\+Handle {\bfseries VH}
\item 
\mbox{\Hypertarget{a09080_a6706919876617cbceb3fe854a3fd2769}\label{a09080_a6706919876617cbceb3fe854a3fd2769}} 
typedef M\+::\+Face\+Handle {\bfseries FH}
\item 
\mbox{\Hypertarget{a09080_a77f680a429898a23ad7874257ce816c0}\label{a09080_a77f680a429898a23ad7874257ce816c0}} 
typedef M\+::\+Edge\+Handle {\bfseries EH}
\item 
\mbox{\Hypertarget{a09080_acd6d1e782257d9c352076571c6e8f493}\label{a09080_acd6d1e782257d9c352076571c6e8f493}} 
typedef M\+::\+Halfedge\+Handle {\bfseries HH}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a09080_a14acda841f3f50918ce31e07b56ba507}\label{a09080_a14acda841f3f50918ce31e07b56ba507}} 
\hyperlink{a09080_a14acda841f3f50918ce31e07b56ba507}{CompositeT} (Mesh \&\+\_\+mesh)
\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item 
void \hyperlink{a09080_ad80960eb4a617e8bd46fdebdf842c4f1}{cleanup} (void)
\item 
\mbox{\Hypertarget{a09080_a18fd11270e399c7ede5f9a45373cf193}\label{a09080_a18fd11270e399c7ede5f9a45373cf193}} 
bool \hyperlink{a09080_a18fd11270e399c7ede5f9a45373cf193}{initialize} (void)
\begin{DoxyCompactList}\small\item\em Initialize faces, edges, vertices, and rules. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a09080_ae51784d44a9134dd09718617349cce09}\label{a09080_ae51784d44a9134dd09718617349cce09}} 
void \hyperlink{a09080_ae51784d44a9134dd09718617349cce09}{refine} (typename M\+::\+Face\+Handle \&\+\_\+fh)
\begin{DoxyCompactList}\small\item\em Refine one face. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a09080_a244944f4dfef7629d18a96da2e488a0d}\label{a09080_a244944f4dfef7629d18a96da2e488a0d}} 
void \hyperlink{a09080_a244944f4dfef7629d18a96da2e488a0d}{refine} (typename M\+::\+Vertex\+Handle \&\+\_\+vh)
\begin{DoxyCompactList}\small\item\em Raise one vertex to next final level. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a09080_ae33f9634758aeb49fa9dc0efc2adf6b9}\label{a09080_ae33f9634758aeb49fa9dc0efc2adf6b9}} 
int \hyperlink{a09080_ae33f9634758aeb49fa9dc0efc2adf6b9}{subdiv\+\_\+type} ()
\begin{DoxyCompactList}\small\item\em Return subdivision split type (3 for 1-\/to-\/3 split, 4 for 1-\/to-\/4 split). \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a09080_a7f860de1f18dca6af91aa8666e368204}\label{a09080_a7f860de1f18dca6af91aa8666e368204}} 
const \hyperlink{a09076}{Rule} \& {\bfseries subdiv\+\_\+rule} () const
\end{DoxyCompactItemize}
\begin{Indent}\textbf{ Managing composite rules}\par
\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$typename R $>$ }\\\hyperlink{a09072}{Rule\+HandleT}$<$ R $>$ \hyperlink{a09080_a9822926fab6924d5c9d5ada7a2db366e}{add} ()
\item 
{\footnotesize template$<$typename R $>$ }\\\hyperlink{a09072}{Rule\+HandleT}$<$ R $>$ \& \hyperlink{a09080_a748163a4a7c7f45f7714ae5ff724d014}{add} (\hyperlink{a09072}{Rule\+HandleT}$<$ R $>$ \&\+\_\+rh)
\item 
{\footnotesize template$<$typename R $>$ }\\\hyperlink{a09072}{Rule\+HandleT}$<$ R $>$\+::\hyperlink{a09076}{Rule} \& \hyperlink{a09080_a99ff9d4f4a55f612ee10dd1c5d0aa60d}{rule} (const \hyperlink{a09072}{Rule\+HandleT}$<$ R $>$ \&\+\_\+rh)
\item 
\hyperlink{a09076}{Rule\+InterfaceT}$<$ M $>$ \& \hyperlink{a09080_a8df1c3098721d47a64c64f9bbafe5639}{rule} (size\+\_\+t \+\_\+idx)
\item 
\mbox{\Hypertarget{a09080_a1fd94e9a9a3b6c0c973904bcd3d19fd0}\label{a09080_a1fd94e9a9a3b6c0c973904bcd3d19fd0}} 
size\+\_\+t \hyperlink{a09080_a1fd94e9a9a3b6c0c973904bcd3d19fd0}{n\+\_\+rules} () const
\begin{DoxyCompactList}\small\item\em Number of rules in the rule sequence. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a09080_a13ef8fec36da611f409984d89540e7f3}\label{a09080_a13ef8fec36da611f409984d89540e7f3}} 
std\+::string \hyperlink{a09080_a13ef8fec36da611f409984d89540e7f3}{rules\+\_\+as\+\_\+string} (const std\+::string \&\+\_\+sep=\char`\"{} $\ast$ \char`\"{}) const
\begin{DoxyCompactList}\small\item\em Return the sequence as string. \end{DoxyCompactList}\end{DoxyCompactItemize}
\end{Indent}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a09080_abf8a0cecb46f7acf03310359cd01cf05}\label{a09080_abf8a0cecb46f7acf03310359cd01cf05}} 
const Rule\+Sequence \& \hyperlink{a09080_abf8a0cecb46f7acf03310359cd01cf05}{rules} () const
\begin{DoxyCompactList}\small\item\em The rule sequence. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a09080_a773a6e846c083d83325949d2795fd17c}\label{a09080_a773a6e846c083d83325949d2795fd17c}} 
\hyperlink{a06218_af706613543b0da1b097580a9dc30fc6e}{state\+\_\+t} {\bfseries generation} (\hyperlink{a06218_af706613543b0da1b097580a9dc30fc6e}{state\+\_\+t} \+\_\+s)
\item 
\mbox{\Hypertarget{a09080_aaf7bfe6880bebd31900bba50b75a2ce6}\label{a09080_aaf7bfe6880bebd31900bba50b75a2ce6}} 
\hyperlink{a06218_af706613543b0da1b097580a9dc30fc6e}{state\+\_\+t} {\bfseries generation} (VH \+\_\+vh)
\item 
\mbox{\Hypertarget{a09080_af3ccdb29c74567d610fd22dc81fca9a4}\label{a09080_af3ccdb29c74567d610fd22dc81fca9a4}} 
\hyperlink{a06218_af706613543b0da1b097580a9dc30fc6e}{state\+\_\+t} {\bfseries generation} (EH \+\_\+eh)
\item 
\mbox{\Hypertarget{a09080_aa41a3f023fd6c4296f9b570547fb6271}\label{a09080_aa41a3f023fd6c4296f9b570547fb6271}} 
\hyperlink{a06218_af706613543b0da1b097580a9dc30fc6e}{state\+\_\+t} {\bfseries generation} (FH \+\_\+fh)
\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a09080_a8ddc5869b0069e38a891e0bec49d1a96}\label{a09080_a8ddc5869b0069e38a891e0bec49d1a96}} 
\hyperlink{a09076}{Rule} $\ast$ {\bfseries t\+\_\+rule} ()
\item 
\mbox{\Hypertarget{a09080_a939f967996c777ce034a2de9b3ee8b9c}\label{a09080_a939f967996c777ce034a2de9b3ee8b9c}} 
\hyperlink{a09076}{Rule} $\ast$ {\bfseries f\+\_\+rule} ()
\item 
\mbox{\Hypertarget{a09080_a434abd72686b697e6ce22eb48411968f}\label{a09080_a434abd72686b697e6ce22eb48411968f}} 
\hyperlink{a09076}{Rule} $\ast$ {\bfseries l\+\_\+rule} ()
\item 
\mbox{\Hypertarget{a09080_a14793cfbb432731379685ff2fe2b5922}\label{a09080_a14793cfbb432731379685ff2fe2b5922}} 
{\bfseries CompositeT} (const \hyperlink{a09080}{CompositeT} \&)
\item 
\mbox{\Hypertarget{a09080_a3d220748d76dbf062b34874540bb2c23}\label{a09080_a3d220748d76dbf062b34874540bb2c23}} 
\hyperlink{a09080}{CompositeT} \& {\bfseries operator=} (const \hyperlink{a09080}{CompositeT})
\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a09080_a419197784b44d0951f93a6f51afe61d5}\label{a09080_a419197784b44d0951f93a6f51afe61d5}} 
Rule\+Sequence {\bfseries rule\+\_\+sequence\+\_\+}
\item 
\mbox{\Hypertarget{a09080_a72ec78caeebd3da03388663051ae87dd}\label{a09080_a72ec78caeebd3da03388663051ae87dd}} 
int {\bfseries subdiv\+\_\+type\+\_\+}
\item 
\mbox{\Hypertarget{a09080_a70da5f11514e868ea21386a66301c1c8}\label{a09080_a70da5f11514e868ea21386a66301c1c8}} 
\hyperlink{a09076}{Rule} $\ast$ {\bfseries subdiv\+\_\+rule\+\_\+}
\item 
\mbox{\Hypertarget{a09080_a215e24f89fa0f8500eed9fc906c89bab}\label{a09080_a215e24f89fa0f8500eed9fc906c89bab}} 
Mesh \& {\bfseries mesh\+\_\+}
\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$typename M$>$\newline
class Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+Composite\+T$<$ M $>$}

\hyperlink{a06218}{Adaptive} Composite Subdivision framework.

The adaptive composite subdivision framework is based on the work done by P. Oswald and P. Schroeder. This framework elevates the uniform case of the composite scheme to the adaptive setting.

For details on the composite scheme refer to
\begin{DoxyItemize}
\item \href{http://cm.bell-labs.com/who/poswald/sqrt3.pdf}{\tt P. Oswald, P. Schroeder \char`\"{}\+Composite primal/dual sqrt(3)-\/subdivision schemes\char`\"{}, C\+A\+GD 20, 3, 2003, 135--164}
\end{DoxyItemize}

For details on the transition from uniform to adaptive composite subdivision please refer to
\begin{DoxyItemize}
\item \href{http://www.eg.org/EG/DL/PE/OPENSG03/04sovakar.pdf}{\tt A. von Studnitz, A. Sovakar, L. Kobbelt \char`\"{}\+A\+P\+I Design for Adaptive Subdivision
\+Schemes\char`\"{} Open\+SG Symposium 2003}
\end{DoxyItemize}

In the composite scheme a subdivision operator is created by combining smaller \char`\"{}atomic\char`\"{} rules. Depending on the selection and ordering of the operator many known subdivision schemes can be created.

Every rule inherits from \hyperlink{a09076}{Rule\+InterfaceT} and is represented out of the subdivider object by a \hyperlink{a09072}{Rule\+HandleT} (as usual within Open\+Mesh). You can add rules using the \hyperlink{a09080_a9822926fab6924d5c9d5ada7a2db366e}{Composite\+T\+::add()} functions. The correct order of adding the rules is very important, and furthermore not all rules get along with each other very well. (Please read the given literature, especially the paper by Oswald and Schr�der.)

To use a composite subdivider first define a rule sequence describing the order of execution of the rules. In the order the rules habe been added they will be executed. E.\+g. the rules given in operator notation have to added from right to left.

After the rule sequence has been defined the subdivider has to be intialized using \hyperlink{a09080_a18fd11270e399c7ede5f9a45373cf193}{Composite\+T\+::initialize()}. If everything went well, use \hyperlink{a09080_ae51784d44a9134dd09718617349cce09}{Composite\+T\+::refine()} to subdivide locally a face or vertex.

\begin{DoxyNote}{Note}
Not all (topological) operators have been implemented! 

Only triangle meshes are supported. 

The rule sequence must begin with a topological operator.
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\hyperlink{a09076}{Rule\+InterfaceT}, \hyperlink{a09072}{Rule\+HandleT} 
\end{DoxySeeAlso}


Definition at line 133 of file Composite\+T.\+hh.



\subsection{Member Function Documentation}
\mbox{\Hypertarget{a09080_a9822926fab6924d5c9d5ada7a2db366e}\label{a09080_a9822926fab6924d5c9d5ada7a2db366e}} 
\index{Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+CompositeT@{Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+CompositeT}!add@{add}}
\index{add@{add}!Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+CompositeT@{Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+CompositeT}}
\subsubsection{\texorpdfstring{add()}{add()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily template$<$typename M$>$ \\
template$<$typename R $>$ \\
\hyperlink{a09072}{Rule\+HandleT}$<$R$>$ \hyperlink{a09080}{Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+CompositeT}$<$ M $>$\+::add (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}

Add new rule to rule sequence by passing the type of the wanted rule as template argument to the method. \begin{DoxyReturn}{Returns}
Valid handle on success. Else it is invalid. 
\end{DoxyReturn}


Definition at line 201 of file Composite\+T.\+hh.

\mbox{\Hypertarget{a09080_a748163a4a7c7f45f7714ae5ff724d014}\label{a09080_a748163a4a7c7f45f7714ae5ff724d014}} 
\index{Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+CompositeT@{Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+CompositeT}!add@{add}}
\index{add@{add}!Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+CompositeT@{Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+CompositeT}}
\subsubsection{\texorpdfstring{add()}{add()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily template$<$typename M$>$ \\
template$<$typename R $>$ \\
\hyperlink{a09072}{Rule\+HandleT}$<$R$>$\& \hyperlink{a09080}{Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+CompositeT}$<$ M $>$\+::add (\begin{DoxyParamCaption}\item[{\hyperlink{a09072}{Rule\+HandleT}$<$ R $>$ \&}]{\+\_\+rh }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}

Add new rule to rule sequence by passing an appropriate handle to the method. \begin{DoxyReturn}{Returns}
Valid handle on success. Else it is invalid. 
\end{DoxyReturn}


Definition at line 213 of file Composite\+T.\+hh.

\mbox{\Hypertarget{a09080_ad80960eb4a617e8bd46fdebdf842c4f1}\label{a09080_ad80960eb4a617e8bd46fdebdf842c4f1}} 
\index{Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+CompositeT@{Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+CompositeT}!cleanup@{cleanup}}
\index{cleanup@{cleanup}!Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+CompositeT@{Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+CompositeT}}
\subsubsection{\texorpdfstring{cleanup()}{cleanup()}}
{\footnotesize\ttfamily template$<$typename M$>$ \\
void \hyperlink{a09080}{Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+CompositeT}$<$ M $>$\+::cleanup (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}

Reset {\ttfamily self} to state after the default constructor except of the mesh. 

Definition at line 161 of file Composite\+T.\+hh.

\mbox{\Hypertarget{a09080_a99ff9d4f4a55f612ee10dd1c5d0aa60d}\label{a09080_a99ff9d4f4a55f612ee10dd1c5d0aa60d}} 
\index{Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+CompositeT@{Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+CompositeT}!rule@{rule}}
\index{rule@{rule}!Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+CompositeT@{Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+CompositeT}}
\subsubsection{\texorpdfstring{rule()}{rule()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily template$<$typename M$>$ \\
template$<$typename R $>$ \\
\hyperlink{a09072}{Rule\+HandleT}$<$R$>$\+::\hyperlink{a09076}{Rule}\& \hyperlink{a09080}{Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+CompositeT}$<$ M $>$\+::rule (\begin{DoxyParamCaption}\item[{const \hyperlink{a09072}{Rule\+HandleT}$<$ R $>$ \&}]{\+\_\+rh }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}

Get rule in the rule sequence by a handle.

\begin{DoxyReturn}{Returns}
The wanted rule if the handle is valid. The return value is undefined if the handle is invalid! 
\end{DoxyReturn}


Definition at line 224 of file Composite\+T.\+hh.

\mbox{\Hypertarget{a09080_a8df1c3098721d47a64c64f9bbafe5639}\label{a09080_a8df1c3098721d47a64c64f9bbafe5639}} 
\index{Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+CompositeT@{Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+CompositeT}!rule@{rule}}
\index{rule@{rule}!Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+CompositeT@{Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+CompositeT}}
\subsubsection{\texorpdfstring{rule()}{rule()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily template$<$typename M$>$ \\
\hyperlink{a09076}{Rule\+InterfaceT}$<$M$>$\& \hyperlink{a09080}{Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+CompositeT}$<$ M $>$\+::rule (\begin{DoxyParamCaption}\item[{size\+\_\+t}]{\+\_\+idx }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}

Get rule (interface) by index

\begin{DoxyReturn}{Returns}
The wanted rule if the handle is valid. The return value is undefined if the handle is invalid! 
\end{DoxyReturn}


Definition at line 237 of file Composite\+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/\+Subdivider/\+Adaptive/\+Composite/\hyperlink{a15295}{Composite\+T.\+hh}\item 
Open\+Flipper/libs\+\_\+required/\+Open\+Mesh/src/\+Open\+Mesh/\+Tools/\+Subdivider/\+Adaptive/\+Composite/\hyperlink{a15301}{Composite\+T\+\_\+impl.\+hh}\end{DoxyCompactItemize}
