\hypertarget{a00439}{\section{Open\+Mesh\+:\+:Subdivider\+:\+:Adaptive\+:\+:Composite\+T$<$ M $>$ Singleton Reference}
\label{a00439}\index{Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+Composite\+T$<$ M $>$@{Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+Composite\+T$<$ M $>$}}
}


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

\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a00439_a6a7324f11505d0140f4ce947c3e7872a}{typedef \hyperlink{a01125}{Rule\+Interface\+T}$<$ M $>$ {\bfseries Rule}}\label{a00439_a6a7324f11505d0140f4ce947c3e7872a}

\item 
\hypertarget{a00439_aa75c59efa30d205c67d551d1cc7e5339}{typedef M {\bfseries Mesh}}\label{a00439_aa75c59efa30d205c67d551d1cc7e5339}

\item 
\hypertarget{a00439_a27da6988470ed03567f5d4f39f850c97}{typedef std\+::vector$<$ \hyperlink{a01125}{Rule} $\ast$ $>$ {\bfseries Rule\+Sequence}}\label{a00439_a27da6988470ed03567f5d4f39f850c97}

\item 
\hypertarget{a00439_a94af1e7b58406bbd5cdd2df34389ac5e}{typedef M\+::\+Vertex\+Handle {\bfseries V\+H}}\label{a00439_a94af1e7b58406bbd5cdd2df34389ac5e}

\item 
\hypertarget{a00439_a6706919876617cbceb3fe854a3fd2769}{typedef M\+::\+Face\+Handle {\bfseries F\+H}}\label{a00439_a6706919876617cbceb3fe854a3fd2769}

\item 
\hypertarget{a00439_a77f680a429898a23ad7874257ce816c0}{typedef M\+::\+Edge\+Handle {\bfseries E\+H}}\label{a00439_a77f680a429898a23ad7874257ce816c0}

\item 
\hypertarget{a00439_acd6d1e782257d9c352076571c6e8f493}{typedef M\+::\+Halfedge\+Handle {\bfseries H\+H}}\label{a00439_acd6d1e782257d9c352076571c6e8f493}

\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a00439_a14acda841f3f50918ce31e07b56ba507}{\hyperlink{a00439_a14acda841f3f50918ce31e07b56ba507}{Composite\+T} (Mesh \&\+\_\+mesh)}\label{a00439_a14acda841f3f50918ce31e07b56ba507}

\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item 
void \hyperlink{a00439_ad80960eb4a617e8bd46fdebdf842c4f1}{cleanup} (void)
\item 
\hypertarget{a00439_a18fd11270e399c7ede5f9a45373cf193}{bool \hyperlink{a00439_a18fd11270e399c7ede5f9a45373cf193}{initialize} (void)}\label{a00439_a18fd11270e399c7ede5f9a45373cf193}

\begin{DoxyCompactList}\small\item\em Initialize faces, edges, vertices, and rules. \end{DoxyCompactList}\item 
\hypertarget{a00439_ae51784d44a9134dd09718617349cce09}{void \hyperlink{a00439_ae51784d44a9134dd09718617349cce09}{refine} (typename M\+::\+Face\+Handle \&\+\_\+fh)}\label{a00439_ae51784d44a9134dd09718617349cce09}

\begin{DoxyCompactList}\small\item\em Refine one face. \end{DoxyCompactList}\item 
\hypertarget{a00439_a244944f4dfef7629d18a96da2e488a0d}{void \hyperlink{a00439_a244944f4dfef7629d18a96da2e488a0d}{refine} (typename M\+::\+Vertex\+Handle \&\+\_\+vh)}\label{a00439_a244944f4dfef7629d18a96da2e488a0d}

\begin{DoxyCompactList}\small\item\em Raise one vertex to next final level. \end{DoxyCompactList}\item 
\hypertarget{a00439_ae33f9634758aeb49fa9dc0efc2adf6b9}{int \hyperlink{a00439_ae33f9634758aeb49fa9dc0efc2adf6b9}{subdiv\+\_\+type} ()}\label{a00439_ae33f9634758aeb49fa9dc0efc2adf6b9}

\begin{DoxyCompactList}\small\item\em Return subdivision split type (3 for 1-\/to-\/3 split, 4 for 1-\/to-\/4 split). \end{DoxyCompactList}\item 
\hypertarget{a00439_aaf00f4079a52c5227768530d9355620f}{const \hyperlink{a01125}{Rule} \& {\bfseries subdiv\+\_\+rule} () const }\label{a00439_aaf00f4079a52c5227768530d9355620f}

\end{DoxyCompactItemize}
\begin{Indent}{\bf Managing composite rules}\par
\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$typename R $>$ }\\\hyperlink{a01124}{Rule\+Handle\+T}$<$ R $>$ \hyperlink{a00439_a9822926fab6924d5c9d5ada7a2db366e}{add} ()
\item 
{\footnotesize template$<$typename R $>$ }\\\hyperlink{a01124}{Rule\+Handle\+T}$<$ R $>$ \& \hyperlink{a00439_a748163a4a7c7f45f7714ae5ff724d014}{add} (\hyperlink{a01124}{Rule\+Handle\+T}$<$ R $>$ \&\+\_\+rh)
\item 
{\footnotesize template$<$typename R $>$ }\\\hyperlink{a01124}{Rule\+Handle\+T}$<$ R $>$\+::\hyperlink{a01125}{Rule} \& \hyperlink{a00439_a99ff9d4f4a55f612ee10dd1c5d0aa60d}{rule} (const \hyperlink{a01124}{Rule\+Handle\+T}$<$ R $>$ \&\+\_\+rh)
\item 
\hyperlink{a01125}{Rule\+Interface\+T}$<$ M $>$ \& \hyperlink{a00439_a8df1c3098721d47a64c64f9bbafe5639}{rule} (size\+\_\+t \+\_\+idx)
\item 
\hypertarget{a00439_a856933d180069ff4e125b9edd255a5e9}{size\+\_\+t \hyperlink{a00439_a856933d180069ff4e125b9edd255a5e9}{n\+\_\+rules} () const }\label{a00439_a856933d180069ff4e125b9edd255a5e9}

\begin{DoxyCompactList}\small\item\em Number of rules in the rule sequence. \end{DoxyCompactList}\item 
\hypertarget{a00439_aa1df06a3b549bb28ba66246f9b70a0b0}{std\+::string \hyperlink{a00439_aa1df06a3b549bb28ba66246f9b70a0b0}{rules\+\_\+as\+\_\+string} (const std\+::string \&\+\_\+sep=\char`\"{} $\ast$ \char`\"{}) const }\label{a00439_aa1df06a3b549bb28ba66246f9b70a0b0}

\begin{DoxyCompactList}\small\item\em Return the sequence as string. \end{DoxyCompactList}\end{DoxyCompactItemize}
\end{Indent}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a00439_a67016440ffcea2d18c973e9b958b95f9}{const Rule\+Sequence \& \hyperlink{a00439_a67016440ffcea2d18c973e9b958b95f9}{rules} () const }\label{a00439_a67016440ffcea2d18c973e9b958b95f9}

\begin{DoxyCompactList}\small\item\em The rule sequence. \end{DoxyCompactList}\item 
\hypertarget{a00439_a773a6e846c083d83325949d2795fd17c}{\hyperlink{a03384_af706613543b0da1b097580a9dc30fc6e}{state\+\_\+t} {\bfseries generation} (\hyperlink{a03384_af706613543b0da1b097580a9dc30fc6e}{state\+\_\+t} \+\_\+s)}\label{a00439_a773a6e846c083d83325949d2795fd17c}

\item 
\hypertarget{a00439_aaf7bfe6880bebd31900bba50b75a2ce6}{\hyperlink{a03384_af706613543b0da1b097580a9dc30fc6e}{state\+\_\+t} {\bfseries generation} (V\+H \+\_\+vh)}\label{a00439_aaf7bfe6880bebd31900bba50b75a2ce6}

\item 
\hypertarget{a00439_af3ccdb29c74567d610fd22dc81fca9a4}{\hyperlink{a03384_af706613543b0da1b097580a9dc30fc6e}{state\+\_\+t} {\bfseries generation} (E\+H \+\_\+eh)}\label{a00439_af3ccdb29c74567d610fd22dc81fca9a4}

\item 
\hypertarget{a00439_aa41a3f023fd6c4296f9b570547fb6271}{\hyperlink{a03384_af706613543b0da1b097580a9dc30fc6e}{state\+\_\+t} {\bfseries generation} (F\+H \+\_\+fh)}\label{a00439_aa41a3f023fd6c4296f9b570547fb6271}

\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a00439_a8ddc5869b0069e38a891e0bec49d1a96}{\hyperlink{a01125}{Rule} $\ast$ {\bfseries t\+\_\+rule} ()}\label{a00439_a8ddc5869b0069e38a891e0bec49d1a96}

\item 
\hypertarget{a00439_a939f967996c777ce034a2de9b3ee8b9c}{\hyperlink{a01125}{Rule} $\ast$ {\bfseries f\+\_\+rule} ()}\label{a00439_a939f967996c777ce034a2de9b3ee8b9c}

\item 
\hypertarget{a00439_a434abd72686b697e6ce22eb48411968f}{\hyperlink{a01125}{Rule} $\ast$ {\bfseries l\+\_\+rule} ()}\label{a00439_a434abd72686b697e6ce22eb48411968f}

\item 
\hypertarget{a00439_a14793cfbb432731379685ff2fe2b5922}{{\bfseries Composite\+T} (const \hyperlink{a00439}{Composite\+T} \&)}\label{a00439_a14793cfbb432731379685ff2fe2b5922}

\item 
\hypertarget{a00439_a3d220748d76dbf062b34874540bb2c23}{\hyperlink{a00439}{Composite\+T} \& {\bfseries operator=} (const \hyperlink{a00439}{Composite\+T})}\label{a00439_a3d220748d76dbf062b34874540bb2c23}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a00439_a419197784b44d0951f93a6f51afe61d5}{Rule\+Sequence {\bfseries rule\+\_\+sequence\+\_\+}}\label{a00439_a419197784b44d0951f93a6f51afe61d5}

\item 
\hypertarget{a00439_a72ec78caeebd3da03388663051ae87dd}{int {\bfseries subdiv\+\_\+type\+\_\+}}\label{a00439_a72ec78caeebd3da03388663051ae87dd}

\item 
\hypertarget{a00439_a70da5f11514e868ea21386a66301c1c8}{\hyperlink{a01125}{Rule} $\ast$ {\bfseries subdiv\+\_\+rule\+\_\+}}\label{a00439_a70da5f11514e868ea21386a66301c1c8}

\item 
\hypertarget{a00439_a215e24f89fa0f8500eed9fc906c89bab}{Mesh \& {\bfseries mesh\+\_\+}}\label{a00439_a215e24f89fa0f8500eed9fc906c89bab}

\end{DoxyCompactItemize}


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

\hyperlink{a03384}{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\+G\+D 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\+S\+G 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{a01125}{Rule\+Interface\+T} and is represented out of the subdivider object by a \hyperlink{a01124}{Rule\+Handle\+T} (as usual within Open\+Mesh). You can add rules using the \hyperlink{a00439_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{a00439_a18fd11270e399c7ede5f9a45373cf193}{Composite\+T\+::initialize()}. If everything went well, use \hyperlink{a00439_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{a01125}{Rule\+Interface\+T}, \hyperlink{a01124}{Rule\+Handle\+T} 
\end{DoxySeeAlso}


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



\subsection{Member Function Documentation}
\hypertarget{a00439_a9822926fab6924d5c9d5ada7a2db366e}{\index{Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+Composite\+T@{Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+Composite\+T}!add@{add}}
\index{add@{add}!Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+Composite\+T@{Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+Composite\+T}}
\subsubsection[{add}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename M$>$ template$<$typename R $>$ {\bf Rule\+Handle\+T}$<$R$>$ {\bf Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+Composite\+T}$<$ M $>$\+::add (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{a00439_a9822926fab6924d5c9d5ada7a2db366e}
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 206 of file Composite\+T.\+hh.

\hypertarget{a00439_a748163a4a7c7f45f7714ae5ff724d014}{\index{Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+Composite\+T@{Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+Composite\+T}!add@{add}}
\index{add@{add}!Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+Composite\+T@{Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+Composite\+T}}
\subsubsection[{add}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename M$>$ template$<$typename R $>$ {\bf Rule\+Handle\+T}$<$R$>$\& {\bf Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+Composite\+T}$<$ M $>$\+::add (
\begin{DoxyParamCaption}
\item[{{\bf Rule\+Handle\+T}$<$ R $>$ \&}]{\+\_\+rh}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{a00439_a748163a4a7c7f45f7714ae5ff724d014}
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 218 of file Composite\+T.\+hh.

\hypertarget{a00439_ad80960eb4a617e8bd46fdebdf842c4f1}{\index{Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+Composite\+T@{Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+Composite\+T}!cleanup@{cleanup}}
\index{cleanup@{cleanup}!Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+Composite\+T@{Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+Composite\+T}}
\subsubsection[{cleanup}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename M$>$ void {\bf Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+Composite\+T}$<$ M $>$\+::cleanup (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{a00439_ad80960eb4a617e8bd46fdebdf842c4f1}
Reset {\ttfamily self} to state after the default constructor except of the mesh. 

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

\hypertarget{a00439_a99ff9d4f4a55f612ee10dd1c5d0aa60d}{\index{Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+Composite\+T@{Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+Composite\+T}!rule@{rule}}
\index{rule@{rule}!Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+Composite\+T@{Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+Composite\+T}}
\subsubsection[{rule}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename M$>$ template$<$typename R $>$ {\bf Rule\+Handle\+T}$<$R$>$\+::{\bf Rule}\& {\bf Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+Composite\+T}$<$ M $>$\+::rule (
\begin{DoxyParamCaption}
\item[{const {\bf Rule\+Handle\+T}$<$ R $>$ \&}]{\+\_\+rh}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{a00439_a99ff9d4f4a55f612ee10dd1c5d0aa60d}
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 229 of file Composite\+T.\+hh.

\hypertarget{a00439_a8df1c3098721d47a64c64f9bbafe5639}{\index{Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+Composite\+T@{Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+Composite\+T}!rule@{rule}}
\index{rule@{rule}!Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+Composite\+T@{Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+Composite\+T}}
\subsubsection[{rule}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename M$>$ {\bf Rule\+Interface\+T}$<$M$>$\& {\bf Open\+Mesh\+::\+Subdivider\+::\+Adaptive\+::\+Composite\+T}$<$ M $>$\+::rule (
\begin{DoxyParamCaption}
\item[{size\+\_\+t}]{\+\_\+idx}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{a00439_a8df1c3098721d47a64c64f9bbafe5639}
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 242 of file Composite\+T.\+hh.



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