\hypertarget{a07260}{}\section{A\+CG\+:\+:Geometry\+:\+:PlaneT$<$ Scalar $>$ Class Template Reference}
\label{a07260}\index{A\+C\+G\+::\+Geometry\+::\+Plane\+T$<$ Scalar $>$@{A\+C\+G\+::\+Geometry\+::\+Plane\+T$<$ Scalar $>$}}


{\ttfamily \#include $<$A\+C\+G/\+Geometry/\+Types/\+Plane.\+hh$>$}

\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a07260_aa31549b979c4cb62f40ef8aafaa58ff4}\label{a07260_aa31549b979c4cb62f40ef8aafaa58ff4}} 
enum {\bfseries Intersection\+Target} \{ {\bfseries Line}, 
{\bfseries Line\+Segment}, 
{\bfseries Ray}
 \}
\item 
\mbox{\Hypertarget{a07260_ac69c768eaf72f34fc0864cea89b9d716}\label{a07260_ac69c768eaf72f34fc0864cea89b9d716}} 
typedef \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \hyperlink{a07260_ac69c768eaf72f34fc0864cea89b9d716}{Vec3}
\begin{DoxyCompactList}\small\item\em typedefs \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07260_a3fd29c5b7519f589253753405a7350b1}\label{a07260_a3fd29c5b7519f589253753405a7350b1}} 
typedef \hyperlink{a08448}{VectorT}$<$ Scalar, 4 $>$ {\bfseries Vec4}
\item 
\mbox{\Hypertarget{a07260_a95d23717d6d49dd31aa268dc17b308ab}\label{a07260_a95d23717d6d49dd31aa268dc17b308ab}} 
typedef \hyperlink{a07616}{Matrix4x4T}$<$ Scalar $>$ {\bfseries Mat4x4}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a07260_a657baa8c05efb85c996a65231557f26f}\label{a07260_a657baa8c05efb85c996a65231557f26f}} 
\hyperlink{a07260_a657baa8c05efb85c996a65231557f26f}{PlaneT} (Scalar \+\_\+a=0, Scalar \+\_\+b=0, Scalar \+\_\+c=0, Scalar \+\_\+d=0)
\begin{DoxyCompactList}\small\item\em constructor\+: coefficients \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07260_a2d6d9c7a2afb4d5d3b4b2948b14ec424}\label{a07260_a2d6d9c7a2afb4d5d3b4b2948b14ec424}} 
\hyperlink{a07260_a2d6d9c7a2afb4d5d3b4b2948b14ec424}{PlaneT} (const \hyperlink{a07260_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \&\+\_\+o, const \hyperlink{a07260_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \&\+\_\+n)
\begin{DoxyCompactList}\small\item\em constructor\+: origin and normal \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07260_ab9703f64cffb2d1c60520278c3477a5e}\label{a07260_ab9703f64cffb2d1c60520278c3477a5e}} 
\hyperlink{a07260_ab9703f64cffb2d1c60520278c3477a5e}{PlaneT} (const \hyperlink{a07260_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \&\+\_\+v0, const \hyperlink{a07260_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \&\+\_\+v1, const \hyperlink{a07260_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \&\+\_\+v2)
\begin{DoxyCompactList}\small\item\em constructor\+: 3 points \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07260_a93302536e57a85ee85902e76e675e94c}\label{a07260_a93302536e57a85ee85902e76e675e94c}} 
\hyperlink{a07260_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \hyperlink{a07260_a93302536e57a85ee85902e76e675e94c}{normal} () const
\begin{DoxyCompactList}\small\item\em normal vector \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07260_a3a95a56c0cdd78a1ffc9cf56e45cedf7}\label{a07260_a3a95a56c0cdd78a1ffc9cf56e45cedf7}} 
const \hyperlink{a08448}{Vec4} \& \hyperlink{a07260_a3a95a56c0cdd78a1ffc9cf56e45cedf7}{coeffs} () const
\begin{DoxyCompactList}\small\item\em coeffitients \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07260_a28ac5e97f062f6db165ddf9db06bbba3}\label{a07260_a28ac5e97f062f6db165ddf9db06bbba3}} 
Scalar \hyperlink{a07260_a28ac5e97f062f6db165ddf9db06bbba3}{distance} (const \hyperlink{a07260_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \&\+\_\+v) const
\begin{DoxyCompactList}\small\item\em signed distance point-\/plane \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07260_aac1887ddee24e9e7f409eb1877f18e86}\label{a07260_aac1887ddee24e9e7f409eb1877f18e86}} 
bool \hyperlink{a07260_aac1887ddee24e9e7f409eb1877f18e86}{operator()} (const \hyperlink{a07260_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \&\+\_\+v) const
\begin{DoxyCompactList}\small\item\em predicate\+: above plane \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07260_a17f4ada902bb5f9a0b8fe9d96dbe72b1}\label{a07260_a17f4ada902bb5f9a0b8fe9d96dbe72b1}} 
bool {\bfseries intersect\+\_\+line} (const \hyperlink{a07260_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \&\+\_\+v0, const \hyperlink{a07260_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \&\+\_\+v1, \hyperlink{a07260_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \&\+\_\+v, Scalar \&\+\_\+t) const
\item 
\mbox{\Hypertarget{a07260_a17c2016a97d7ff68c34fc892124e1804}\label{a07260_a17c2016a97d7ff68c34fc892124e1804}} 
bool {\bfseries intersect\+\_\+ray} (const \hyperlink{a07260_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \&\+\_\+v0, const \hyperlink{a07260_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \&\+\_\+v1, \hyperlink{a07260_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \&\+\_\+v, Scalar \&\+\_\+t) const
\item 
\mbox{\Hypertarget{a07260_aae825453afdb50afc533067f9e4ce4ff}\label{a07260_aae825453afdb50afc533067f9e4ce4ff}} 
bool {\bfseries intersect\+\_\+linesegment} (const \hyperlink{a07260_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \&\+\_\+v0, const \hyperlink{a07260_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \&\+\_\+v1, \hyperlink{a07260_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \&\+\_\+v, Scalar \&\+\_\+t) const
\item 
bool \hyperlink{a07260_a34d95f64221440fca772845b172236aa}{intersect} (const \hyperlink{a07260_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \&\+\_\+v0, const \hyperlink{a07260_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \&\+\_\+v1, \hyperlink{a07260_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \&\+\_\+v, Scalar \&\+\_\+t, Intersection\+Target \+\_\+target) const
\begin{DoxyCompactList}\small\item\em General intersection function. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07260_a9a38e1a5ef00b72d535fdacb3eca7bde}\label{a07260_a9a38e1a5ef00b72d535fdacb3eca7bde}} 
bool \hyperlink{a07260_a9a38e1a5ef00b72d535fdacb3eca7bde}{affine\+\_\+transformation} (const \hyperlink{a07616}{Mat4x4} \&\+\_\+M)
\begin{DoxyCompactList}\small\item\em affine transformation of the plane \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07260_a0a62c5cd137e79e69fb946a608c2d297}\label{a07260_a0a62c5cd137e79e69fb946a608c2d297}} 
void \hyperlink{a07260_a0a62c5cd137e79e69fb946a608c2d297}{affine\+\_\+transformation\+\_\+precomp} (const \hyperlink{a07616}{Mat4x4} \&\+\_\+\+M\+\_\+inverse\+Transposed)
\begin{DoxyCompactList}\small\item\em affine transformation of the plane (M$^\wedge$\{-\/T\} precomputed) \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a07260_a52a8f9027e989a04faf6c4d2032c19c5}\label{a07260_a52a8f9027e989a04faf6c4d2032c19c5}} 
void {\bfseries H\+NF} ()
\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a07260_a33be23055b8ed3a1253da4de6d6697a6}\label{a07260_a33be23055b8ed3a1253da4de6d6697a6}} 
\hyperlink{a08448}{Vec4} {\bfseries coeffs\+\_\+}
\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$typename Scalar$>$\newline
class A\+C\+G\+::\+Geometry\+::\+Plane\+T$<$ Scalar $>$}

This class stores a plane in normal form and provides useful algorithms for left/right test, itersection, and so on. 

Definition at line 78 of file Plane\+T.\+hh.



\subsection{Member Function Documentation}
\mbox{\Hypertarget{a07260_a34d95f64221440fca772845b172236aa}\label{a07260_a34d95f64221440fca772845b172236aa}} 
\index{A\+C\+G\+::\+Geometry\+::\+PlaneT@{A\+C\+G\+::\+Geometry\+::\+PlaneT}!intersect@{intersect}}
\index{intersect@{intersect}!A\+C\+G\+::\+Geometry\+::\+PlaneT@{A\+C\+G\+::\+Geometry\+::\+PlaneT}}
\subsubsection{\texorpdfstring{intersect()}{intersect()}}
{\footnotesize\ttfamily template$<$typename Scalar $>$ \\
bool \hyperlink{a07260}{A\+C\+G\+::\+Geometry\+::\+PlaneT}$<$ Scalar $>$\+::intersect (\begin{DoxyParamCaption}\item[{const \hyperlink{a07260_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \&}]{\+\_\+v0,  }\item[{const \hyperlink{a07260_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \&}]{\+\_\+v1,  }\item[{\hyperlink{a07260_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \&}]{\+\_\+v,  }\item[{Scalar \&}]{\+\_\+t,  }\item[{Intersection\+Target}]{\+\_\+target }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



General intersection function. 

General intersection between a line/ray and the plane.


\begin{DoxyParams}{Parameters}
{\em \+\_\+v0} & start vector of the ray \\
\hline
{\em \+\_\+v1} & end vector of the ray \\
\hline
{\em \+\_\+v} & returned intersection point \\
\hline
{\em \+\_\+t} & returned relative distance from the interection to \+\_\+v0 compared to \+\_\+v1 \\
\hline
{\em \+\_\+target} & type of intersection to test \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if an intersection was found 
\end{DoxyReturn}


Definition at line 160 of file Plane\+T.\+hh.



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
Open\+Flipper/libs\+\_\+required/\+A\+C\+G/\+Geometry/\+Types/Plane\+T.\+hh\end{DoxyCompactItemize}
