\hypertarget{a07196}{}\section{Triangle\+B\+S\+P\+CoreT$<$ B\+S\+P\+Traits $>$ Class Template Reference}
\label{a07196}\index{Triangle\+B\+S\+P\+Core\+T$<$ B\+S\+P\+Traits $>$@{Triangle\+B\+S\+P\+Core\+T$<$ B\+S\+P\+Traits $>$}}
Inheritance diagram for Triangle\+B\+S\+P\+CoreT$<$ B\+S\+P\+Traits $>$\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3.000000cm]{a07196}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a07196_aaabd25ea6f49abda72a5db3bde880eeb}\label{a07196_aaabd25ea6f49abda72a5db3bde880eeb}} 
typedef B\+S\+P\+Traits {\bfseries Traits}
\item 
\mbox{\Hypertarget{a07196_ae7072c4f755b39fd9ddcdef15f3cf1b5}\label{a07196_ae7072c4f755b39fd9ddcdef15f3cf1b5}} 
typedef B\+S\+P\+Traits\+::\+Point {\bfseries Point}
\item 
\mbox{\Hypertarget{a07196_a0478fd26b19ced22a2823bdaa49a8873}\label{a07196_a0478fd26b19ced22a2823bdaa49a8873}} 
typedef B\+S\+P\+Traits\+::\+Handle {\bfseries Handle}
\item 
\mbox{\Hypertarget{a07196_ae34b8edf69432ac45571dd51db988316}\label{a07196_ae34b8edf69432ac45571dd51db988316}} 
typedef B\+S\+P\+Traits\+::\+Node {\bfseries Node}
\item 
\mbox{\Hypertarget{a07196_a2e6e7e0fccaf9dc2b9801c88987ea273}\label{a07196_a2e6e7e0fccaf9dc2b9801c88987ea273}} 
typedef Point\+::value\+\_\+type {\bfseries Scalar}
\item 
\mbox{\Hypertarget{a07196_a20527c6b063183acff0488aeb4219bf0}\label{a07196_a20527c6b063183acff0488aeb4219bf0}} 
typedef \hyperlink{a07260}{A\+C\+G\+::\+Geometry\+::\+PlaneT}$<$ Scalar $>$ {\bfseries Plane}
\item 
\mbox{\Hypertarget{a07196_aee5f88bd344c3236f44b4509b883df05}\label{a07196_aee5f88bd344c3236f44b4509b883df05}} 
typedef std\+::vector$<$ Handle $>$ {\bfseries Handles}
\item 
\mbox{\Hypertarget{a07196_a5ab718288a87ae164c46d0f2c1990caa}\label{a07196_a5ab718288a87ae164c46d0f2c1990caa}} 
typedef Handles\+::iterator {\bfseries Handle\+Iter}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{a07196_a3df42c4ef8987709ecc6bb403b2cc573}{Triangle\+B\+S\+P\+CoreT} (const B\+S\+P\+Traits \&\+\_\+traits)
\item 
\mbox{\Hypertarget{a07196_a0e1414c16055d3e9e6ab5d11e497991f}\label{a07196_a0e1414c16055d3e9e6ab5d11e497991f}} 
\hyperlink{a07196_a0e1414c16055d3e9e6ab5d11e497991f}{$\sim$\+Triangle\+B\+S\+P\+CoreT} ()
\begin{DoxyCompactList}\small\item\em Destructor. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07196_aec48cfc42a7aaa45d7023876fda60c15}\label{a07196_aec48cfc42a7aaa45d7023876fda60c15}} 
void \hyperlink{a07196_aec48cfc42a7aaa45d7023876fda60c15}{reserve} (size\+\_\+t \+\_\+n)
\begin{DoxyCompactList}\small\item\em Reserve memory for \+\_\+n entries. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07196_ac53e7d1cc31f797273cfae3055385d3d}\label{a07196_ac53e7d1cc31f797273cfae3055385d3d}} 
void \hyperlink{a07196_ac53e7d1cc31f797273cfae3055385d3d}{push\+\_\+back} (Handle \+\_\+h)
\begin{DoxyCompactList}\small\item\em Add a handle to the B\+SP. \end{DoxyCompactList}\item 
bool \hyperlink{a07196_a41f447903c024b3447c38d747b7e225a}{empty} ()
\item 
size\+\_\+t \hyperlink{a07196_a1360c94c3c07a7ffa3b3e00cc4216ff4}{size} ()
\item 
void \hyperlink{a07196_a8b1dc19fee411c5c5ece02148e5dd8ba}{build} (unsigned int \+\_\+max\+\_\+handles, unsigned int \+\_\+max\+\_\+depth)
\item 
{\footnotesize template$<$typename MeshT $>$ }\\void \hyperlink{a07196_ac87565b0eeec82b977d4016a11deff09}{visualize\+Tree} (MeshT $\ast$\+\_\+object, int \+\_\+max\+\_\+depth)
\begin{DoxyCompactList}\small\item\em Create a Poly\+Mesh object that visualizes the bounding boxes of the B\+SP tree. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a07196_a0c7451683398efbb474d027fc16b9e62}\label{a07196_a0c7451683398efbb474d027fc16b9e62}} 
B\+S\+P\+Traits {\bfseries traits\+\_\+}
\item 
\mbox{\Hypertarget{a07196_ac5f519de63ffd6f52cff8bb9af0c0dfe}\label{a07196_ac5f519de63ffd6f52cff8bb9af0c0dfe}} 
Handles {\bfseries handles\+\_\+}
\item 
\mbox{\Hypertarget{a07196_adc462a4e593792177ccb2b2426566a77}\label{a07196_adc462a4e593792177ccb2b2426566a77}} 
Node $\ast$ {\bfseries root\+\_\+}
\item 
\mbox{\Hypertarget{a07196_ac71ac8146f4f3288ce99b391d9408776}\label{a07196_ac71ac8146f4f3288ce99b391d9408776}} 
int {\bfseries nodes}
\item 
\mbox{\Hypertarget{a07196_aabf7ab261eb027cffca9e71934985212}\label{a07196_aabf7ab261eb027cffca9e71934985212}} 
int {\bfseries n\+\_\+triangles}
\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a07196_a6aaa8cfa7addbf511d6e965aa6fa8838}\label{a07196_a6aaa8cfa7addbf511d6e965aa6fa8838}} 
{\bfseries Triangle\+B\+S\+P\+CoreT} (const \hyperlink{a07196}{Triangle\+B\+S\+P\+CoreT} \&rhs)
\item 
\mbox{\Hypertarget{a07196_af6ea59ed713f5d92ac2746dda51df58b}\label{a07196_af6ea59ed713f5d92ac2746dda51df58b}} 
\hyperlink{a07196}{Triangle\+B\+S\+P\+CoreT} \& {\bfseries operator=} (const \hyperlink{a07196}{Triangle\+B\+S\+P\+CoreT} \&rhs)
\item 
\mbox{\Hypertarget{a07196_ab27237d095ae7c46911ae144eafd9404}\label{a07196_ab27237d095ae7c46911ae144eafd9404}} 
void {\bfseries \+\_\+build} (Node $\ast$\+\_\+node, unsigned int \+\_\+max\+\_\+handles, unsigned int \+\_\+depth)
\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$class B\+S\+P\+Traits$>$\newline
class Triangle\+B\+S\+P\+Core\+T$<$ B\+S\+P\+Traits $>$}



Definition at line 67 of file Triangle\+B\+S\+P\+Core\+T.\+hh.



\subsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{a07196_a3df42c4ef8987709ecc6bb403b2cc573}\label{a07196_a3df42c4ef8987709ecc6bb403b2cc573}} 
\index{Triangle\+B\+S\+P\+CoreT@{Triangle\+B\+S\+P\+CoreT}!Triangle\+B\+S\+P\+CoreT@{Triangle\+B\+S\+P\+CoreT}}
\index{Triangle\+B\+S\+P\+CoreT@{Triangle\+B\+S\+P\+CoreT}!Triangle\+B\+S\+P\+CoreT@{Triangle\+B\+S\+P\+CoreT}}
\subsubsection{\texorpdfstring{Triangle\+B\+S\+P\+Core\+T()}{TriangleBSPCoreT()}}
{\footnotesize\ttfamily template$<$class B\+S\+P\+Traits$>$ \\
\hyperlink{a07196}{Triangle\+B\+S\+P\+CoreT}$<$ B\+S\+P\+Traits $>$\+::\hyperlink{a07196}{Triangle\+B\+S\+P\+CoreT} (\begin{DoxyParamCaption}\item[{const B\+S\+P\+Traits \&}]{\+\_\+traits }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [explicit]}}

Constructor\+: need traits that define the types and give us the points by traits\+\_\+.\+point(\+Point\+Handle) 

Definition at line 86 of file Triangle\+B\+S\+P\+Core\+T.\+hh.



\subsection{Member Function Documentation}
\mbox{\Hypertarget{a07196_a8b1dc19fee411c5c5ece02148e5dd8ba}\label{a07196_a8b1dc19fee411c5c5ece02148e5dd8ba}} 
\index{Triangle\+B\+S\+P\+CoreT@{Triangle\+B\+S\+P\+CoreT}!build@{build}}
\index{build@{build}!Triangle\+B\+S\+P\+CoreT@{Triangle\+B\+S\+P\+CoreT}}
\subsubsection{\texorpdfstring{build()}{build()}}
{\footnotesize\ttfamily template$<$class B\+S\+P\+Traits $>$ \\
void \hyperlink{a07196}{Triangle\+B\+S\+P\+CoreT}$<$ B\+S\+P\+Traits $>$\+::build (\begin{DoxyParamCaption}\item[{unsigned int}]{\+\_\+max\+\_\+handles,  }\item[{unsigned int}]{\+\_\+max\+\_\+depth }\end{DoxyParamCaption})}

Build the tree.


\begin{DoxyParams}{Parameters}
{\em \+\_\+max\+\_\+handles} & Maximum number of vertices per leaf. \\
\hline
{\em \+\_\+max\+\_\+depth} & Maximum depth. \\
\hline
\end{DoxyParams}


Definition at line 63 of file Triangle\+B\+S\+P\+Core\+T\+\_\+impl.\+hh.

\mbox{\Hypertarget{a07196_a41f447903c024b3447c38d747b7e225a}\label{a07196_a41f447903c024b3447c38d747b7e225a}} 
\index{Triangle\+B\+S\+P\+CoreT@{Triangle\+B\+S\+P\+CoreT}!empty@{empty}}
\index{empty@{empty}!Triangle\+B\+S\+P\+CoreT@{Triangle\+B\+S\+P\+CoreT}}
\subsubsection{\texorpdfstring{empty()}{empty()}}
{\footnotesize\ttfamily template$<$class B\+S\+P\+Traits$>$ \\
bool \hyperlink{a07196}{Triangle\+B\+S\+P\+CoreT}$<$ B\+S\+P\+Traits $>$\+::empty (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}

\begin{DoxyReturn}{Returns}
\hyperlink{a07196_a1360c94c3c07a7ffa3b3e00cc4216ff4}{size()} == 0 
\end{DoxyReturn}


Definition at line 102 of file Triangle\+B\+S\+P\+Core\+T.\+hh.

\mbox{\Hypertarget{a07196_a1360c94c3c07a7ffa3b3e00cc4216ff4}\label{a07196_a1360c94c3c07a7ffa3b3e00cc4216ff4}} 
\index{Triangle\+B\+S\+P\+CoreT@{Triangle\+B\+S\+P\+CoreT}!size@{size}}
\index{size@{size}!Triangle\+B\+S\+P\+CoreT@{Triangle\+B\+S\+P\+CoreT}}
\subsubsection{\texorpdfstring{size()}{size()}}
{\footnotesize\ttfamily template$<$class B\+S\+P\+Traits$>$ \\
size\+\_\+t \hyperlink{a07196}{Triangle\+B\+S\+P\+CoreT}$<$ B\+S\+P\+Traits $>$\+::size (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}

\begin{DoxyReturn}{Returns}
The number of triangles contained in the tree. 
\end{DoxyReturn}


Definition at line 107 of file Triangle\+B\+S\+P\+Core\+T.\+hh.

\mbox{\Hypertarget{a07196_ac87565b0eeec82b977d4016a11deff09}\label{a07196_ac87565b0eeec82b977d4016a11deff09}} 
\index{Triangle\+B\+S\+P\+CoreT@{Triangle\+B\+S\+P\+CoreT}!visualize\+Tree@{visualize\+Tree}}
\index{visualize\+Tree@{visualize\+Tree}!Triangle\+B\+S\+P\+CoreT@{Triangle\+B\+S\+P\+CoreT}}
\subsubsection{\texorpdfstring{visualize\+Tree()}{visualizeTree()}}
{\footnotesize\ttfamily template$<$class B\+S\+P\+Traits$>$ \\
template$<$typename MeshT $>$ \\
void \hyperlink{a07196}{Triangle\+B\+S\+P\+CoreT}$<$ B\+S\+P\+Traits $>$\+::visualize\+Tree (\begin{DoxyParamCaption}\item[{MeshT $\ast$}]{\+\_\+object,  }\item[{int}]{\+\_\+max\+\_\+depth }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Create a Poly\+Mesh object that visualizes the bounding boxes of the B\+SP tree. 


\begin{DoxyParams}{Parameters}
{\em \+\_\+object} & The output mesh which the tree will be written into \\
\hline
{\em \+\_\+max\+\_\+depth} & The maximal depth that will be visualized \\
\hline
\end{DoxyParams}


Definition at line 122 of file Triangle\+B\+S\+P\+Core\+T.\+hh.



The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
Open\+Flipper/libs\+\_\+required/\+A\+C\+G/\+Geometry/bsp/Triangle\+B\+S\+P\+Core\+T.\+hh\item 
Open\+Flipper/libs\+\_\+required/\+A\+C\+G/\+Geometry/bsp/Triangle\+B\+S\+P\+Core\+T\+\_\+impl.\+hh\end{DoxyCompactItemize}
