\hypertarget{a07172}{}\section{B\+S\+P\+ImplT$<$ B\+S\+P\+Core $>$ Class Template Reference}
\label{a07172}\index{B\+S\+P\+Impl\+T$<$ B\+S\+P\+Core $>$@{B\+S\+P\+Impl\+T$<$ B\+S\+P\+Core $>$}}
Inheritance diagram for B\+S\+P\+ImplT$<$ B\+S\+P\+Core $>$\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{a07172}
\end{center}
\end{figure}
\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{a07188}{less\+\_\+pair\+\_\+second}
\item 
struct \hyperlink{a07176}{Nearest\+Neighbor}
\begin{DoxyCompactList}\small\item\em Store nearest neighbor information. \end{DoxyCompactList}\item 
struct \hyperlink{a07180}{Nearest\+Neighbor\+Data}
\begin{DoxyCompactList}\small\item\em Store nearest neighbor information. \end{DoxyCompactList}\item 
struct \hyperlink{a07184}{Ray\+Collision\+Data}
\begin{DoxyCompactList}\small\item\em Store ray collide information. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a07172_ac9fd4b82175ccf363a98475c4c5dd177}\label{a07172_ac9fd4b82175ccf363a98475c4c5dd177}} 
typedef B\+S\+P\+Core\+::\+Traits {\bfseries Traits}
\item 
\mbox{\Hypertarget{a07172_ae71507e7b200f995c769d9ebed28fa3d}\label{a07172_ae71507e7b200f995c769d9ebed28fa3d}} 
typedef B\+S\+P\+Core\+::\+Handle {\bfseries Handle}
\item 
\mbox{\Hypertarget{a07172_a660d68d2b5f445176449f388bee09f44}\label{a07172_a660d68d2b5f445176449f388bee09f44}} 
typedef B\+S\+P\+Core\+::\+Point {\bfseries Point}
\item 
\mbox{\Hypertarget{a07172_a131e04889ac752d3a8a9b794579f44c2}\label{a07172_a131e04889ac752d3a8a9b794579f44c2}} 
typedef B\+S\+P\+Core\+::\+Scalar {\bfseries Scalar}
\item 
\mbox{\Hypertarget{a07172_afee4f978c7cf308c1c8f75df2c0dd139}\label{a07172_afee4f978c7cf308c1c8f75df2c0dd139}} 
typedef B\+S\+P\+Core\+::\+Node {\bfseries Node}
\item 
\mbox{\Hypertarget{a07172_a5a3c8f365e59630b95fb7ea57eb297f3}\label{a07172_a5a3c8f365e59630b95fb7ea57eb297f3}} 
typedef B\+S\+P\+Core\+::\+Handles {\bfseries Handles}
\item 
\mbox{\Hypertarget{a07172_ab6d243e7301f7acfc4ed00a15115c172}\label{a07172_ab6d243e7301f7acfc4ed00a15115c172}} 
typedef B\+S\+P\+Core\+::\+Handle\+Iter {\bfseries Handle\+Iter}
\item 
\mbox{\Hypertarget{a07172_a01c23244c319ff903a4deb3f56422dc2}\label{a07172_a01c23244c319ff903a4deb3f56422dc2}} 
typedef std\+::vector$<$ std\+::pair$<$ Handle, Scalar $>$ $>$ \hyperlink{a07172_a01c23244c319ff903a4deb3f56422dc2}{Ray\+Collision}
\begin{DoxyCompactList}\small\item\em Store nearest neighbor information. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a07172_aa3c617e6ba107789b7558fe30115a466}\label{a07172_aa3c617e6ba107789b7558fe30115a466}} 
{\bfseries B\+S\+P\+ImplT} (const Traits \&\+\_\+traits, const Scalar \&\+\_\+infinity=std\+::numeric\+\_\+limits$<$ Scalar $>$\+::infinity())
\item 
\mbox{\Hypertarget{a07172_aa328495bd59c638da68b91a6b231cbfc}\label{a07172_aa328495bd59c638da68b91a6b231cbfc}} 
\hyperlink{a07176}{Nearest\+Neighbor} \hyperlink{a07172_aa328495bd59c638da68b91a6b231cbfc}{nearest} (const Point \&\+\_\+p) const
\begin{DoxyCompactList}\small\item\em Return handle of the nearest neighbor face. \end{DoxyCompactList}\item 
\hyperlink{a07172_a01c23244c319ff903a4deb3f56422dc2}{Ray\+Collision} \hyperlink{a07172_ac18778f442b2e5d93ca485341f06a83f}{raycollision} (const Point \&\+\_\+p, const Point \&\+\_\+r) const
\begin{DoxyCompactList}\small\item\em intersect mesh with ray \end{DoxyCompactList}\item 
\hyperlink{a07172_a01c23244c319ff903a4deb3f56422dc2}{Ray\+Collision} \hyperlink{a07172_a6d23f2ab3d5bb0a423229f7e33b00a4d}{directional\+Raycollision} (const Point \&\+\_\+p, const Point \&\+\_\+r) const
\begin{DoxyCompactList}\small\item\em intersect mesh with ray \end{DoxyCompactList}\item 
\hyperlink{a07172_a01c23244c319ff903a4deb3f56422dc2}{Ray\+Collision} \hyperlink{a07172_a9bbdc6704a9b3f5bf38c73b653606f9d}{nearest\+Raycollision} (const Point \&\+\_\+p, const Point \&\+\_\+r) const
\begin{DoxyCompactList}\small\item\em intersect mesh with ray \end{DoxyCompactList}\item 
{\footnotesize template$<$class Callback $>$ }\\void \hyperlink{a07172_a62fb6a7709aa94495c33203181f06301}{intersect\+Ball} (const Point \&\+\_\+c, Scalar \+\_\+r, Callback \+\_\+callback) const
\begin{DoxyCompactList}\small\item\em intersect mesh with open ball \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a07172_abbb721dd737e19fdd3c82b81da2317ab}\label{a07172_abbb721dd737e19fdd3c82b81da2317ab}} 
void {\bfseries \+\_\+nearest} (Node $\ast$\+\_\+node, \hyperlink{a07180}{Nearest\+Neighbor\+Data} \&\+\_\+data) const
\item 
void \hyperlink{a07172_a202781fccfdb821d51027416ce17ea08}{\+\_\+raycollision\+\_\+non\+\_\+directional} (Node $\ast$\+\_\+node, \hyperlink{a07184}{Ray\+Collision\+Data} \&\+\_\+data) const
\begin{DoxyCompactList}\small\item\em recursive part of \hyperlink{a07172_ac18778f442b2e5d93ca485341f06a83f}{raycollision()} \end{DoxyCompactList}\item 
void \hyperlink{a07172_a8a0ef1cf946d0d41a63d65350b8f5a2c}{\+\_\+raycollision\+\_\+directional} (Node $\ast$\+\_\+node, \hyperlink{a07184}{Ray\+Collision\+Data} \&\+\_\+data) const
\begin{DoxyCompactList}\small\item\em recursive part of \hyperlink{a07172_a6d23f2ab3d5bb0a423229f7e33b00a4d}{directional\+Raycollision()} \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07172_a30fff7f606f05ffd328c99dc6feb8a93}\label{a07172_a30fff7f606f05ffd328c99dc6feb8a93}} 
void {\bfseries \+\_\+raycollision\+\_\+nearest\+\_\+directional} (Node $\ast$\+\_\+node, \hyperlink{a07184}{Ray\+Collision\+Data} \&\+\_\+data) const
\item 
\mbox{\Hypertarget{a07172_a0940cc92f4d5a1829c70e48dd1bc53dc}\label{a07172_a0940cc92f4d5a1829c70e48dd1bc53dc}} 
{\footnotesize template$<$class Callback $>$ }\\void {\bfseries \+\_\+intersect\+\_\+ball} (const Node \&\+\_\+node, const Point \&\+\_\+c, Scalar \+\_\+r, Callback \+\_\+callback) const
\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a07172_a2c986a7e6ecc99eb02367766d705604c}\label{a07172_a2c986a7e6ecc99eb02367766d705604c}} 
const Scalar {\bfseries infinity\+\_\+}
\end{DoxyCompactItemize}


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



Definition at line 64 of file B\+S\+P\+Impl\+T.\+hh.



\subsection{Member Function Documentation}
\mbox{\Hypertarget{a07172_a8a0ef1cf946d0d41a63d65350b8f5a2c}\label{a07172_a8a0ef1cf946d0d41a63d65350b8f5a2c}} 
\index{B\+S\+P\+ImplT@{B\+S\+P\+ImplT}!\+\_\+raycollision\+\_\+directional@{\+\_\+raycollision\+\_\+directional}}
\index{\+\_\+raycollision\+\_\+directional@{\+\_\+raycollision\+\_\+directional}!B\+S\+P\+ImplT@{B\+S\+P\+ImplT}}
\subsubsection{\texorpdfstring{\+\_\+raycollision\+\_\+directional()}{\_raycollision\_directional()}}
{\footnotesize\ttfamily template$<$class B\+S\+P\+Core $>$ \\
void \hyperlink{a07172}{B\+S\+P\+ImplT}$<$ B\+S\+P\+Core $>$\+::\+\_\+raycollision\+\_\+directional (\begin{DoxyParamCaption}\item[{Node $\ast$}]{\+\_\+node,  }\item[{\hyperlink{a07184}{Ray\+Collision\+Data} \&}]{\+\_\+data }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [private]}}



recursive part of \hyperlink{a07172_a6d23f2ab3d5bb0a423229f7e33b00a4d}{directional\+Raycollision()} 


\begin{DoxyParams}{Parameters}
{\em \+\_\+node} & The current node in the tree \\
\hline
{\em \+\_\+data} & Data pointer, used to collect the collision information \\
\hline
\end{DoxyParams}


Definition at line 229 of file B\+S\+P\+Impl\+T\+\_\+impl.\+hh.

\mbox{\Hypertarget{a07172_a202781fccfdb821d51027416ce17ea08}\label{a07172_a202781fccfdb821d51027416ce17ea08}} 
\index{B\+S\+P\+ImplT@{B\+S\+P\+ImplT}!\+\_\+raycollision\+\_\+non\+\_\+directional@{\+\_\+raycollision\+\_\+non\+\_\+directional}}
\index{\+\_\+raycollision\+\_\+non\+\_\+directional@{\+\_\+raycollision\+\_\+non\+\_\+directional}!B\+S\+P\+ImplT@{B\+S\+P\+ImplT}}
\subsubsection{\texorpdfstring{\+\_\+raycollision\+\_\+non\+\_\+directional()}{\_raycollision\_non\_directional()}}
{\footnotesize\ttfamily template$<$class B\+S\+P\+Core $>$ \\
void \hyperlink{a07172}{B\+S\+P\+ImplT}$<$ B\+S\+P\+Core $>$\+::\+\_\+raycollision\+\_\+non\+\_\+directional (\begin{DoxyParamCaption}\item[{Node $\ast$}]{\+\_\+node,  }\item[{\hyperlink{a07184}{Ray\+Collision\+Data} \&}]{\+\_\+data }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [private]}}



recursive part of \hyperlink{a07172_ac18778f442b2e5d93ca485341f06a83f}{raycollision()} 


\begin{DoxyParams}{Parameters}
{\em \+\_\+node} & The current node in the tree \\
\hline
{\em \+\_\+data} & Data pointer, used to collect the collision information \\
\hline
\end{DoxyParams}


Definition at line 191 of file B\+S\+P\+Impl\+T\+\_\+impl.\+hh.

\mbox{\Hypertarget{a07172_a6d23f2ab3d5bb0a423229f7e33b00a4d}\label{a07172_a6d23f2ab3d5bb0a423229f7e33b00a4d}} 
\index{B\+S\+P\+ImplT@{B\+S\+P\+ImplT}!directional\+Raycollision@{directional\+Raycollision}}
\index{directional\+Raycollision@{directional\+Raycollision}!B\+S\+P\+ImplT@{B\+S\+P\+ImplT}}
\subsubsection{\texorpdfstring{directional\+Raycollision()}{directionalRaycollision()}}
{\footnotesize\ttfamily template$<$class B\+S\+P\+Core $>$ \\
\hyperlink{a07172}{B\+S\+P\+ImplT}$<$ B\+S\+P\+Core $>$\+::\hyperlink{a07172_a01c23244c319ff903a4deb3f56422dc2}{Ray\+Collision} \hyperlink{a07172}{B\+S\+P\+ImplT}$<$ B\+S\+P\+Core $>$\+::directional\+Raycollision (\begin{DoxyParamCaption}\item[{const Point \&}]{\+\_\+p,  }\item[{const Point \&}]{\+\_\+r }\end{DoxyParamCaption}) const}



intersect mesh with ray 

This function shots a ray through the mesh and collects all intersected triangles and the handle of the closest face ( directional, so the ray direction is taken into account!).

Only hits with a distance $>$ 0.\+0 to the point p will be collected (\+\_\+p will be skipped!)


\begin{DoxyParams}{Parameters}
{\em \+\_\+p} & Start point of the ray \\
\hline
{\em \+\_\+r} & Ray direction \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Collision information 
\end{DoxyReturn}


Definition at line 144 of file B\+S\+P\+Impl\+T\+\_\+impl.\+hh.

\mbox{\Hypertarget{a07172_a62fb6a7709aa94495c33203181f06301}\label{a07172_a62fb6a7709aa94495c33203181f06301}} 
\index{B\+S\+P\+ImplT@{B\+S\+P\+ImplT}!intersect\+Ball@{intersect\+Ball}}
\index{intersect\+Ball@{intersect\+Ball}!B\+S\+P\+ImplT@{B\+S\+P\+ImplT}}
\subsubsection{\texorpdfstring{intersect\+Ball()}{intersectBall()}}
{\footnotesize\ttfamily template$<$class B\+S\+P\+Core $>$ \\
template$<$class Callback $>$ \\
void \hyperlink{a07172}{B\+S\+P\+ImplT}$<$ B\+S\+P\+Core $>$\+::intersect\+Ball (\begin{DoxyParamCaption}\item[{const Point \&}]{\+\_\+c,  }\item[{Scalar}]{\+\_\+r,  }\item[{Callback}]{\+\_\+callback }\end{DoxyParamCaption}) const}



intersect mesh with open ball 

All triangles that have at least one vertex (!) inside the ball are given to the Callback, triangles which have no vertex inside the ball but intersect it M\+AY be returned. (T\+O\+DO) Each triangle can be returned up to three times, make sure to handle this, e.\+g. by putting the values into an std\+:\+:(unordered\+\_\+)set.


\begin{DoxyParams}{Parameters}
{\em \+\_\+c} & Center of the ball \\
\hline
{\em \+\_\+r} & Radius of the ball \\
\hline
{\em \+\_\+callback} & Callable that accepts Handle or const Handle\&, e.\+g. (const Handle \&h) -\/$>$ void \\
\hline
\end{DoxyParams}


Definition at line 179 of file B\+S\+P\+Impl\+T\+\_\+impl.\+hh.

\mbox{\Hypertarget{a07172_a9bbdc6704a9b3f5bf38c73b653606f9d}\label{a07172_a9bbdc6704a9b3f5bf38c73b653606f9d}} 
\index{B\+S\+P\+ImplT@{B\+S\+P\+ImplT}!nearest\+Raycollision@{nearest\+Raycollision}}
\index{nearest\+Raycollision@{nearest\+Raycollision}!B\+S\+P\+ImplT@{B\+S\+P\+ImplT}}
\subsubsection{\texorpdfstring{nearest\+Raycollision()}{nearestRaycollision()}}
{\footnotesize\ttfamily template$<$class B\+S\+P\+Core $>$ \\
\hyperlink{a07172}{B\+S\+P\+ImplT}$<$ B\+S\+P\+Core $>$\+::\hyperlink{a07172_a01c23244c319ff903a4deb3f56422dc2}{Ray\+Collision} \hyperlink{a07172}{B\+S\+P\+ImplT}$<$ B\+S\+P\+Core $>$\+::nearest\+Raycollision (\begin{DoxyParamCaption}\item[{const Point \&}]{\+\_\+p,  }\item[{const Point \&}]{\+\_\+r }\end{DoxyParamCaption}) const}



intersect mesh with ray 

This function shots a ray through the mesh and determines the first intersected triangle and the handle of the closest face ( directional, so the ray direction is taken into account!).

Only hits with a distance $>$ 0.\+0 to the point p will be collected (\+\_\+p will be skipped!). Note that for compatibility reasons the return type is still a vector of collisions.


\begin{DoxyParams}{Parameters}
{\em \+\_\+p} & Start point of the ray \\
\hline
{\em \+\_\+r} & Ray direction \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Collision information 
\end{DoxyReturn}


Definition at line 162 of file B\+S\+P\+Impl\+T\+\_\+impl.\+hh.

\mbox{\Hypertarget{a07172_ac18778f442b2e5d93ca485341f06a83f}\label{a07172_ac18778f442b2e5d93ca485341f06a83f}} 
\index{B\+S\+P\+ImplT@{B\+S\+P\+ImplT}!raycollision@{raycollision}}
\index{raycollision@{raycollision}!B\+S\+P\+ImplT@{B\+S\+P\+ImplT}}
\subsubsection{\texorpdfstring{raycollision()}{raycollision()}}
{\footnotesize\ttfamily template$<$class B\+S\+P\+Core $>$ \\
\hyperlink{a07172}{B\+S\+P\+ImplT}$<$ B\+S\+P\+Core $>$\+::\hyperlink{a07172_a01c23244c319ff903a4deb3f56422dc2}{Ray\+Collision} \hyperlink{a07172}{B\+S\+P\+ImplT}$<$ B\+S\+P\+Core $>$\+::raycollision (\begin{DoxyParamCaption}\item[{const Point \&}]{\+\_\+p,  }\item[{const Point \&}]{\+\_\+r }\end{DoxyParamCaption}) const}



intersect mesh with ray 

This function shots a ray through the mesh and collects all intersected triangles and the handle of the closest face ( non-\/directional, so no matter of the ray direction, the closest face handle is returned in either direction)


\begin{DoxyParams}{Parameters}
{\em \+\_\+p} & Start point of the ray \\
\hline
{\em \+\_\+r} & Ray direction \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Collision information 
\end{DoxyReturn}


Definition at line 127 of file B\+S\+P\+Impl\+T\+\_\+impl.\+hh.



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