\hypertarget{a00966}{\section{A\+C\+G\+:\+:Geometry\+:\+:Plane\+T$<$ Scalar $>$ Class Template Reference}
\label{a00966}\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 
\hypertarget{a00966_aa31549b979c4cb62f40ef8aafaa58ff4}{enum {\bfseries Intersection\+Target} \{ {\bfseries Line}, 
{\bfseries Line\+Segment}, 
{\bfseries Ray}
 \}}\label{a00966_aa31549b979c4cb62f40ef8aafaa58ff4}

\item 
\hypertarget{a00966_ac69c768eaf72f34fc0864cea89b9d716}{typedef \hyperlink{a01409}{Vector\+T}$<$ Scalar, 3 $>$ \hyperlink{a00966_ac69c768eaf72f34fc0864cea89b9d716}{Vec3}}\label{a00966_ac69c768eaf72f34fc0864cea89b9d716}

\begin{DoxyCompactList}\small\item\em typedefs \end{DoxyCompactList}\item 
\hypertarget{a00966_a3fd29c5b7519f589253753405a7350b1}{typedef \hyperlink{a01409}{Vector\+T}$<$ Scalar, 4 $>$ {\bfseries Vec4}}\label{a00966_a3fd29c5b7519f589253753405a7350b1}

\item 
\hypertarget{a00966_a95d23717d6d49dd31aa268dc17b308ab}{typedef \hyperlink{a00797}{Matrix4x4\+T}$<$ Scalar $>$ {\bfseries Mat4x4}}\label{a00966_a95d23717d6d49dd31aa268dc17b308ab}

\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a00966_a657baa8c05efb85c996a65231557f26f}{\hyperlink{a00966_a657baa8c05efb85c996a65231557f26f}{Plane\+T} (Scalar \+\_\+a=0, Scalar \+\_\+b=0, Scalar \+\_\+c=0, Scalar \+\_\+d=0)}\label{a00966_a657baa8c05efb85c996a65231557f26f}

\begin{DoxyCompactList}\small\item\em constructor\+: coefficients \end{DoxyCompactList}\item 
\hypertarget{a00966_a2d6d9c7a2afb4d5d3b4b2948b14ec424}{\hyperlink{a00966_a2d6d9c7a2afb4d5d3b4b2948b14ec424}{Plane\+T} (const \hyperlink{a00966_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \&\+\_\+o, const \hyperlink{a00966_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \&\+\_\+n)}\label{a00966_a2d6d9c7a2afb4d5d3b4b2948b14ec424}

\begin{DoxyCompactList}\small\item\em constructor\+: origin and normal \end{DoxyCompactList}\item 
\hypertarget{a00966_ab9703f64cffb2d1c60520278c3477a5e}{\hyperlink{a00966_ab9703f64cffb2d1c60520278c3477a5e}{Plane\+T} (const \hyperlink{a00966_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \&\+\_\+v0, const \hyperlink{a00966_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \&\+\_\+v1, const \hyperlink{a00966_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \&\+\_\+v2)}\label{a00966_ab9703f64cffb2d1c60520278c3477a5e}

\begin{DoxyCompactList}\small\item\em constructor\+: 3 points \end{DoxyCompactList}\item 
\hypertarget{a00966_a5f8c8ed34159ba233fcc7d753939c419}{\hyperlink{a00966_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \hyperlink{a00966_a5f8c8ed34159ba233fcc7d753939c419}{normal} () const }\label{a00966_a5f8c8ed34159ba233fcc7d753939c419}

\begin{DoxyCompactList}\small\item\em normal vector \end{DoxyCompactList}\item 
\hypertarget{a00966_af9c4f608ec23a1e38d64711474f440c0}{const \hyperlink{a01409}{Vec4} \& \hyperlink{a00966_af9c4f608ec23a1e38d64711474f440c0}{coeffs} () const }\label{a00966_af9c4f608ec23a1e38d64711474f440c0}

\begin{DoxyCompactList}\small\item\em coeffitients \end{DoxyCompactList}\item 
\hypertarget{a00966_a61d892517f73a1756ab56e50c5f7fe1c}{Scalar \hyperlink{a00966_a61d892517f73a1756ab56e50c5f7fe1c}{distance} (const \hyperlink{a00966_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \&\+\_\+v) const }\label{a00966_a61d892517f73a1756ab56e50c5f7fe1c}

\begin{DoxyCompactList}\small\item\em signed distance point-\/plane \end{DoxyCompactList}\item 
\hypertarget{a00966_a6009ff8916559f3e10ee037e4bf7fe5f}{bool \hyperlink{a00966_a6009ff8916559f3e10ee037e4bf7fe5f}{operator()} (const \hyperlink{a00966_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \&\+\_\+v) const }\label{a00966_a6009ff8916559f3e10ee037e4bf7fe5f}

\begin{DoxyCompactList}\small\item\em predicate\+: above plane \end{DoxyCompactList}\item 
\hypertarget{a00966_ac5a8a3d0bfa4f9e51d6abccc9a05247e}{bool {\bfseries intersect\+\_\+line} (const \hyperlink{a00966_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \&\+\_\+v0, const \hyperlink{a00966_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \&\+\_\+v1, \hyperlink{a00966_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \&\+\_\+v, Scalar \&\+\_\+t) const }\label{a00966_ac5a8a3d0bfa4f9e51d6abccc9a05247e}

\item 
\hypertarget{a00966_a8bc4d6443787acbca3c6f0e3fcf7b185}{bool {\bfseries intersect\+\_\+ray} (const \hyperlink{a00966_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \&\+\_\+v0, const \hyperlink{a00966_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \&\+\_\+v1, \hyperlink{a00966_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \&\+\_\+v, Scalar \&\+\_\+t) const }\label{a00966_a8bc4d6443787acbca3c6f0e3fcf7b185}

\item 
\hypertarget{a00966_a6bc0e94a29df5d211636f14ec16e7fc7}{bool {\bfseries intersect\+\_\+linesegment} (const \hyperlink{a00966_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \&\+\_\+v0, const \hyperlink{a00966_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \&\+\_\+v1, \hyperlink{a00966_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \&\+\_\+v, Scalar \&\+\_\+t) const }\label{a00966_a6bc0e94a29df5d211636f14ec16e7fc7}

\item 
bool \hyperlink{a00966_add37b35ebc8fa00f965d23546ff29de8}{intersect} (const \hyperlink{a00966_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \&\+\_\+v0, const \hyperlink{a00966_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \&\+\_\+v1, \hyperlink{a00966_ac69c768eaf72f34fc0864cea89b9d716}{Vec3} \&\+\_\+v, Scalar \&\+\_\+t, Intersection\+Target \+\_\+target) const 
\begin{DoxyCompactList}\small\item\em General intersection function. \end{DoxyCompactList}\item 
\hypertarget{a00966_a9a38e1a5ef00b72d535fdacb3eca7bde}{bool \hyperlink{a00966_a9a38e1a5ef00b72d535fdacb3eca7bde}{affine\+\_\+transformation} (const \hyperlink{a00797}{Mat4x4} \&\+\_\+\+M)}\label{a00966_a9a38e1a5ef00b72d535fdacb3eca7bde}

\begin{DoxyCompactList}\small\item\em affine transformation of the plane \end{DoxyCompactList}\item 
\hypertarget{a00966_a0a62c5cd137e79e69fb946a608c2d297}{void \hyperlink{a00966_a0a62c5cd137e79e69fb946a608c2d297}{affine\+\_\+transformation\+\_\+precomp} (const \hyperlink{a00797}{Mat4x4} \&\+\_\+\+M\+\_\+inverse\+Transposed)}\label{a00966_a0a62c5cd137e79e69fb946a608c2d297}

\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 
\hypertarget{a00966_a52a8f9027e989a04faf6c4d2032c19c5}{void {\bfseries H\+N\+F} ()}\label{a00966_a52a8f9027e989a04faf6c4d2032c19c5}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a00966_a33be23055b8ed3a1253da4de6d6697a6}{\hyperlink{a01409}{Vec4} {\bfseries coeffs\+\_\+}}\label{a00966_a33be23055b8ed3a1253da4de6d6697a6}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$typename Scalar$>$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 88 of file Plane\+T.\+hh.



\subsection{Member Function Documentation}
\hypertarget{a00966_add37b35ebc8fa00f965d23546ff29de8}{\index{A\+C\+G\+::\+Geometry\+::\+Plane\+T@{A\+C\+G\+::\+Geometry\+::\+Plane\+T}!intersect@{intersect}}
\index{intersect@{intersect}!A\+C\+G\+::\+Geometry\+::\+Plane\+T@{A\+C\+G\+::\+Geometry\+::\+Plane\+T}}
\subsubsection[{intersect}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Scalar $>$ bool {\bf A\+C\+G\+::\+Geometry\+::\+Plane\+T}$<$ Scalar $>$\+::intersect (
\begin{DoxyParamCaption}
\item[{const {\bf Vec3} \&}]{\+\_\+v0, }
\item[{const {\bf Vec3} \&}]{\+\_\+v1, }
\item[{{\bf Vec3} \&}]{\+\_\+v, }
\item[{Scalar \&}]{\+\_\+t, }
\item[{Intersection\+Target}]{\+\_\+target}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}}\label{a00966_add37b35ebc8fa00f965d23546ff29de8}


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 170 of file Plane\+T.\+hh.



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