\hypertarget{a03361}{\section{Mesh\+Functions Namespace Reference}
\label{a03361}\index{Mesh\+Functions@{Mesh\+Functions}}
}


Namespace providing different Mesh editing functions.  


\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$typename Mesh\+T , typename Vector\+T $>$ }\\bool \hyperlink{a03361_a3f1e490a876f96515e15af41c3ed397f}{get\+\_\+boundary} (Mesh\+T \&\+\_\+mesh, typename Mesh\+T\+::\+Vertex\+Handle \+\_\+vh, std\+::vector$<$ std\+::pair$<$ \hyperlink{a01410}{Vector\+T}, typename Mesh\+T\+::\+Vertex\+Handle $>$ $>$ \&\+\_\+boundary)
\item 
{\footnotesize template$<$typename Mesh\+T , typename Vector\+T $>$ }\\bool \hyperlink{a03361_a228cbaa8f7d2b43fef94febd306dc1b5}{get\+\_\+boundary} (Mesh\+T \&\+\_\+mesh, std\+::vector$<$ std\+::pair$<$ \hyperlink{a01410}{Vector\+T}, typename Mesh\+T\+::\+Vertex\+Handle $>$ $>$ \&\+\_\+boundary)
\item 
{\footnotesize template$<$typename Mesh\+T , typename Vector\+T $>$ }\\void \hyperlink{a03361_a96679ecc369a5db5d56aa07e9753949f}{smooth\+\_\+boundary} (Mesh\+T \&\+\_\+mesh, typename Mesh\+T\+::\+Vertex\+Handle \+\_\+vh)
\item 
{\footnotesize template$<$typename Mesh\+T $>$ }\\bool \hyperlink{a03361_a7d041c07f895414d7aadf11da220eb0c}{neighbour} (const Mesh\+T \&\+\_\+mesh, const typename Mesh\+T\+::\+Face\+Handle \+\_\+fh1, const typename Mesh\+T\+::\+Face\+Handle \+\_\+fh2)
\item 
{\footnotesize template$<$class Mesh\+T , typename Vector\+T $>$ }\\bool \hyperlink{a03361_ae9f2d14686e176d6c10bb5b9bd945ca4}{cut\+\_\+face} (const \hyperlink{a01410}{Vector\+T} \&\+\_\+porigin, const \hyperlink{a01410}{Vector\+T} \&\+\_\+pnormal, const Mesh\+T \&\+\_\+mesh, const typename Mesh\+T\+::\+Face\+Handle \&\+\_\+fh)
\item 
{\footnotesize template$<$typename Mesh\+T $>$ }\\double \hyperlink{a03361_aee4016ea83eccc9bfe4ec45c44e7f476}{calc\+\_\+area} (const Mesh\+T \&\+\_\+mesh)
\item 
{\footnotesize template$<$typename Mesh\+T $>$ }\\double \hyperlink{a03361_aa512985c908d7ab83a30abe56c2564ec}{calc\+\_\+angle\+\_\+around} (const Mesh\+T \&\+\_\+mesh, const typename Mesh\+T\+::\+Vertex\+Handle \+\_\+vh)
\item 
{\footnotesize template$<$typename Mesh\+T $>$ }\\void \hyperlink{a03361_accf7f21e6de19f19015ed8bf64109d8b}{transform\+Mesh} (\hyperlink{a03336_a7f5dece6cb3955c9847f5455509f6147}{A\+C\+G\+::\+Matrix4x4d} \+\_\+matrix, Mesh\+T \&\+\_\+mesh)
\item 
{\footnotesize template$<$typename Mesh\+T $>$ }\\void \hyperlink{a03361_a5b31589a65b412d2aeba53492c1151c0}{transform\+Handle\+Vertices} (\hyperlink{a03336_a7f5dece6cb3955c9847f5455509f6147}{A\+C\+G\+::\+Matrix4x4d} \+\_\+matrix, Mesh\+T \&\+\_\+mesh)
\end{DoxyCompactItemize}


\subsection{Detailed Description}
Namespace providing different Mesh editing functions. 

\subsection{Function Documentation}
\hypertarget{a03361_aa512985c908d7ab83a30abe56c2564ec}{\index{Mesh\+Functions@{Mesh\+Functions}!calc\+\_\+angle\+\_\+around@{calc\+\_\+angle\+\_\+around}}
\index{calc\+\_\+angle\+\_\+around@{calc\+\_\+angle\+\_\+around}!Mesh\+Functions@{Mesh\+Functions}}
\subsubsection[{calc\+\_\+angle\+\_\+around}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Mesh\+T $>$ double Mesh\+Functions\+::calc\+\_\+angle\+\_\+around (
\begin{DoxyParamCaption}
\item[{const Mesh\+T \&}]{\+\_\+mesh, }
\item[{const typename Mesh\+T\+::\+Vertex\+Handle}]{\+\_\+vh}
\end{DoxyParamCaption}
)}}\label{a03361_aa512985c908d7ab83a30abe56c2564ec}
Get the sum of the angles around a vertex 
\begin{DoxyParams}{Parameters}
{\em \+\_\+mesh} & Mesh to work on \\
\hline
{\em \+\_\+vh} & Vertex \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Sum of angles around the vertex 
\end{DoxyReturn}


Definition at line 216 of file Mesh\+Functions.\+cc.

\hypertarget{a03361_aee4016ea83eccc9bfe4ec45c44e7f476}{\index{Mesh\+Functions@{Mesh\+Functions}!calc\+\_\+area@{calc\+\_\+area}}
\index{calc\+\_\+area@{calc\+\_\+area}!Mesh\+Functions@{Mesh\+Functions}}
\subsubsection[{calc\+\_\+area}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Mesh\+T $>$ double Mesh\+Functions\+::calc\+\_\+area (
\begin{DoxyParamCaption}
\item[{const Mesh\+T \&}]{\+\_\+mesh}
\end{DoxyParamCaption}
)}}\label{a03361_aee4016ea83eccc9bfe4ec45c44e7f476}
Get the area of a mesh ( sum over all triangle areas) 
\begin{DoxyParams}{Parameters}
{\em \+\_\+mesh} & Mesh to calculate area \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Area spanned by the mesh 
\end{DoxyReturn}


Definition at line 198 of file Mesh\+Functions.\+cc.

\hypertarget{a03361_ae9f2d14686e176d6c10bb5b9bd945ca4}{\index{Mesh\+Functions@{Mesh\+Functions}!cut\+\_\+face@{cut\+\_\+face}}
\index{cut\+\_\+face@{cut\+\_\+face}!Mesh\+Functions@{Mesh\+Functions}}
\subsubsection[{cut\+\_\+face}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Mesh\+T , typename Vector\+T $>$ bool Mesh\+Functions\+::cut\+\_\+face (
\begin{DoxyParamCaption}
\item[{const {\bf Vector\+T} \&}]{\+\_\+porigin, }
\item[{const {\bf Vector\+T} \&}]{\+\_\+pnormal, }
\item[{const Mesh\+T \&}]{\+\_\+mesh, }
\item[{const typename Mesh\+T\+::\+Face\+Handle \&}]{\+\_\+fh}
\end{DoxyParamCaption}
)}}\label{a03361_ae9f2d14686e176d6c10bb5b9bd945ca4}
Checks if plane cuts the face 
\begin{DoxyParams}{Parameters}
{\em \+\_\+porigin} & Planes origin \\
\hline
{\em \+\_\+pnormal} & \hyperlink{a00961}{Plane} normal \\
\hline
{\em \+\_\+mesh} & Mesh \\
\hline
{\em \+\_\+fh} & Facehandle of face \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
triangle cut by plane? 
\end{DoxyReturn}


Definition at line 175 of file Mesh\+Functions.\+cc.

\hypertarget{a03361_a3f1e490a876f96515e15af41c3ed397f}{\index{Mesh\+Functions@{Mesh\+Functions}!get\+\_\+boundary@{get\+\_\+boundary}}
\index{get\+\_\+boundary@{get\+\_\+boundary}!Mesh\+Functions@{Mesh\+Functions}}
\subsubsection[{get\+\_\+boundary}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Mesh\+T , typename Vector\+T $>$ bool Mesh\+Functions\+::get\+\_\+boundary (
\begin{DoxyParamCaption}
\item[{Mesh\+T \&}]{\+\_\+mesh, }
\item[{typename Mesh\+T\+::\+Vertex\+Handle}]{\+\_\+vh, }
\item[{std\+::vector$<$ std\+::pair$<$ {\bf Vector\+T}, typename Mesh\+T\+::\+Vertex\+Handle $>$ $>$ \&}]{\+\_\+boundary}
\end{DoxyParamCaption}
)}}\label{a03361_a3f1e490a876f96515e15af41c3ed397f}
get one boundary at the vertex 
\begin{DoxyParams}{Parameters}
{\em \+\_\+mesh} & Mesh \\
\hline
{\em \+\_\+vh} & Vertex handle of one vertex of the boundary \\
\hline
{\em \+\_\+boundary} & Coords and vertex handles of the boundary \\
\hline
\end{DoxyParams}


Definition at line 82 of file Mesh\+Functions.\+cc.

\hypertarget{a03361_a228cbaa8f7d2b43fef94febd306dc1b5}{\index{Mesh\+Functions@{Mesh\+Functions}!get\+\_\+boundary@{get\+\_\+boundary}}
\index{get\+\_\+boundary@{get\+\_\+boundary}!Mesh\+Functions@{Mesh\+Functions}}
\subsubsection[{get\+\_\+boundary}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Mesh\+T , typename Vector\+T $>$ bool Mesh\+Functions\+::get\+\_\+boundary (
\begin{DoxyParamCaption}
\item[{Mesh\+T \&}]{\+\_\+mesh, }
\item[{std\+::vector$<$ std\+::pair$<$ {\bf Vector\+T}, typename Mesh\+T\+::\+Vertex\+Handle $>$ $>$ \&}]{\+\_\+boundary}
\end{DoxyParamCaption}
)}}\label{a03361_a228cbaa8f7d2b43fef94febd306dc1b5}
get boundary of a mesh (assumes that there is only one boundary!! 
\begin{DoxyParams}{Parameters}
{\em \+\_\+mesh} & Mesh \\
\hline
{\em \+\_\+boundary} & Coords and vertex handles of the boundary \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Found a boundary? 
\end{DoxyReturn}


Definition at line 121 of file Mesh\+Functions.\+cc.

\hypertarget{a03361_a7d041c07f895414d7aadf11da220eb0c}{\index{Mesh\+Functions@{Mesh\+Functions}!neighbour@{neighbour}}
\index{neighbour@{neighbour}!Mesh\+Functions@{Mesh\+Functions}}
\subsubsection[{neighbour}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Mesh\+T $>$ bool Mesh\+Functions\+::neighbour (
\begin{DoxyParamCaption}
\item[{const Mesh\+T \&}]{\+\_\+mesh, }
\item[{const typename Mesh\+T\+::\+Face\+Handle}]{\+\_\+fh1, }
\item[{const typename Mesh\+T\+::\+Face\+Handle}]{\+\_\+fh2}
\end{DoxyParamCaption}
)}}\label{a03361_a7d041c07f895414d7aadf11da220eb0c}
Checks for two faces if they are adjazent 
\begin{DoxyParams}{Parameters}
{\em \+\_\+mesh} & Mesh \\
\hline
{\em \+\_\+fh1} & First Face \\
\hline
{\em \+\_\+fh2} & Second Face \\
\hline
\end{DoxyParams}


Definition at line 162 of file Mesh\+Functions.\+cc.

\hypertarget{a03361_a96679ecc369a5db5d56aa07e9753949f}{\index{Mesh\+Functions@{Mesh\+Functions}!smooth\+\_\+boundary@{smooth\+\_\+boundary}}
\index{smooth\+\_\+boundary@{smooth\+\_\+boundary}!Mesh\+Functions@{Mesh\+Functions}}
\subsubsection[{smooth\+\_\+boundary}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Mesh\+T , typename Vector\+T $>$ void Mesh\+Functions\+::smooth\+\_\+boundary (
\begin{DoxyParamCaption}
\item[{Mesh\+T \&}]{\+\_\+mesh, }
\item[{typename Mesh\+T\+::\+Vertex\+Handle}]{\+\_\+vh}
\end{DoxyParamCaption}
)}}\label{a03361_a96679ecc369a5db5d56aa07e9753949f}
function to smooth a boundary of a given mesh by moving each vertex to the mean Position of its adjazent verticies 
\begin{DoxyParams}{Parameters}
{\em \+\_\+mesh} & Mesh to work on \\
\hline
{\em \+\_\+vh} & Vertex handle on the boundary \\
\hline
\end{DoxyParams}


Definition at line 145 of file Mesh\+Functions.\+cc.

\hypertarget{a03361_a5b31589a65b412d2aeba53492c1151c0}{\index{Mesh\+Functions@{Mesh\+Functions}!transform\+Handle\+Vertices@{transform\+Handle\+Vertices}}
\index{transform\+Handle\+Vertices@{transform\+Handle\+Vertices}!Mesh\+Functions@{Mesh\+Functions}}
\subsubsection[{transform\+Handle\+Vertices}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Mesh\+T $>$ void Mesh\+Functions\+::transform\+Handle\+Vertices (
\begin{DoxyParamCaption}
\item[{{\bf A\+C\+G\+::\+Matrix4x4d}}]{\+\_\+matrix, }
\item[{Mesh\+T \&}]{\+\_\+mesh}
\end{DoxyParamCaption}
)}}\label{a03361_a5b31589a65b412d2aeba53492c1151c0}
Transform handle vertices only 
\begin{DoxyParams}{Parameters}
{\em \+\_\+matrix} & The transformation matrix \\
\hline
{\em \+\_\+mesh} & The mesh that is to be transformed \\
\hline
\end{DoxyParams}


Definition at line 275 of file Mesh\+Functions.\+cc.

\hypertarget{a03361_accf7f21e6de19f19015ed8bf64109d8b}{\index{Mesh\+Functions@{Mesh\+Functions}!transform\+Mesh@{transform\+Mesh}}
\index{transform\+Mesh@{transform\+Mesh}!Mesh\+Functions@{Mesh\+Functions}}
\subsubsection[{transform\+Mesh}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Mesh\+T $>$ void Mesh\+Functions\+::transform\+Mesh (
\begin{DoxyParamCaption}
\item[{{\bf A\+C\+G\+::\+Matrix4x4d}}]{\+\_\+matrix, }
\item[{Mesh\+T \&}]{\+\_\+mesh}
\end{DoxyParamCaption}
)}}\label{a03361_accf7f21e6de19f19015ed8bf64109d8b}
Transform geometry of the mesh using the specified transformation matrix. 
\begin{DoxyParams}{Parameters}
{\em \+\_\+matrix} & The transformation matrix \\
\hline
{\em \+\_\+mesh} & The mesh that is to be transformed \\
\hline
\end{DoxyParams}


Definition at line 237 of file Mesh\+Functions.\+cc.

