\hypertarget{a06186}{}\section{A\+CG\+:\+:Geometry Namespace Reference}
\label{a06186}\index{A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}}
\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \hyperlink{a07264}{Plane}
\item 
class \hyperlink{a07260}{PlaneT}
\item 
class \hyperlink{a07268}{QuadricT}
\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a06186_ac7bbecb0cf8d671fd00f9f14549a4c5a}\label{a06186_ac7bbecb0cf8d671fd00f9f14549a4c5a}} 
typedef \hyperlink{a07260}{PlaneT}$<$ float $>$ {\bfseries Planef}
\item 
\mbox{\Hypertarget{a06186_a6e5ace3888c5c8f6f8c0aad4fc8f11dd}\label{a06186_a6e5ace3888c5c8f6f8c0aad4fc8f11dd}} 
typedef \hyperlink{a07260}{PlaneT}$<$ double $>$ {\bfseries Planed}
\item 
\mbox{\Hypertarget{a06186_af20308c452143eb4cb8c794e2929c33d}\label{a06186_af20308c452143eb4cb8c794e2929c33d}} 
typedef \hyperlink{a07268}{QuadricT}$<$ float $>$ \hyperlink{a06186_af20308c452143eb4cb8c794e2929c33d}{Quadricf}
\begin{DoxyCompactList}\small\item\em Quadric using floats. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a06186_ab0096d1cdb8c0b93f07560f9d9f0ad72}\label{a06186_ab0096d1cdb8c0b93f07560f9d9f0ad72}} 
typedef \hyperlink{a07268}{QuadricT}$<$ double $>$ \hyperlink{a06186_ab0096d1cdb8c0b93f07560f9d9f0ad72}{Quadricd}
\begin{DoxyCompactList}\small\item\em Quadric using double. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$typename Scalar $>$ }\\bool \hyperlink{a06186_a3a7dca53b00ae6eeabb41e910f11ecca}{edge\+Convex\+Polygon\+Intersection} (std\+::vector$<$ \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ $>$ \+\_\+polygon\+\_\+points, \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \+\_\+v0, \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \+\_\+v1, \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+result)
\begin{DoxyCompactList}\small\item\em Get intersection point of a ray and a convex polygon. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a06186_a356c29e5977c94c2b6a17198e9c50f89}\label{a06186_a356c29e5977c94c2b6a17198e9c50f89}} 
{\footnotesize template$<$class Vec $>$ }\\Vec\+::value\+\_\+type {\bfseries dist\+Point\+Triangle\+Squared} (const Vec \&\+\_\+p, const Vec \&\+\_\+v0, const Vec \&\+\_\+v1, const Vec \&\+\_\+v2, Vec \&\+\_\+nearest\+Point, bool \+\_\+stable)
\item 
{\footnotesize template$<$typename Scalar $>$ }\\bool \hyperlink{a06186_a67ed02ee6bb8eeeca6757e1787fbe3c0}{rotation\+Of\+Two\+Vectors} (const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v0, const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v1, \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+axis, Scalar \&\+\_\+angle, bool \+\_\+degree=true)
\begin{DoxyCompactList}\small\item\em Get rotation axis and signed angle of rotation between two vectors. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a06186_a9f489203726d044f13f461d56796347d}\label{a06186_a9f489203726d044f13f461d56796347d}} 
{\footnotesize template$<$typename Scalar $>$ }\\bool \hyperlink{a06186_a9f489203726d044f13f461d56796347d}{circum\+Center} (const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v0, const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v1, const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v2, const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v3, \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+result)
\begin{DoxyCompactList}\small\item\em return circumcenter of tetrahedron (\+\_\+v0,\+\_\+v1,\+\_\+v2,\+\_\+v3) \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Scalar $>$ }\\\hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \hyperlink{a06186_aa812bac009f4ed7111d1a4951bb20a4f}{perpendicular} (const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v)
\begin{DoxyCompactList}\small\item\em find a vector that\textquotesingle{}s perpendicular to \+\_\+v \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a06186_ac68005c10b6c82d62a49345a26c294f2}\label{a06186_ac68005c10b6c82d62a49345a26c294f2}} 
{\footnotesize template$<$typename Scalar $>$ }\\bool \hyperlink{a06186_ac68005c10b6c82d62a49345a26c294f2}{line\+Intersection} (const \hyperlink{a08448}{VectorT}$<$ Scalar, 2 $>$ \&\+\_\+v0, const \hyperlink{a08448}{VectorT}$<$ Scalar, 2 $>$ \&\+\_\+v1, const \hyperlink{a08448}{VectorT}$<$ Scalar, 2 $>$ \&\+\_\+v2, const \hyperlink{a08448}{VectorT}$<$ Scalar, 2 $>$ \&\+\_\+v3, Scalar \&\+\_\+t1, Scalar \&\+\_\+t2)
\begin{DoxyCompactList}\small\item\em intersect two line segments (\+\_\+v0,\+\_\+v1) and (\+\_\+v2,\+\_\+v3) \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Vec $>$ }\\bool \hyperlink{a06186_a7c0267304e480500caa5289f985f7068}{triangle\+Intersection} (const Vec \&\+\_\+o, const Vec \&\+\_\+dir, const Vec \&\+\_\+v0, const Vec \&\+\_\+v1, const Vec \&\+\_\+v2, typename Vec\+::value\+\_\+type \&\+\_\+t, typename Vec\+::value\+\_\+type \&\+\_\+u, typename Vec\+::value\+\_\+type \&\+\_\+v)
\begin{DoxyCompactList}\small\item\em Intersect a ray and a triangle. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Vec $>$ }\\bool \hyperlink{a06186_ab3bd1d5f1d6155767dfdfee654db0eb6}{axis\+Aligned\+B\+B\+Intersection} (const Vec \&\+\_\+o, const Vec \&\+\_\+dir, const Vec \&\+\_\+bbmin, const Vec \&\+\_\+bbmax, typename Vec\+::value\+\_\+type \&\+\_\+t0, typename Vec\+::value\+\_\+type \&\+\_\+t1)
\begin{DoxyCompactList}\small\item\em Intersect a ray and an axis aligned bounding box. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a06186_a8c4fa77c2948124c1272021b72b1091e}\label{a06186_a8c4fa77c2948124c1272021b72b1091e}} 
{\footnotesize template$<$typename Scalar $>$ }\\Scalar \hyperlink{a06186_a8c4fa77c2948124c1272021b72b1091e}{circum\+Radius\+Squared} (const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v0, const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v1, const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v2, const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v3)
\begin{DoxyCompactList}\small\item\em return squared radius of circumcircle of tetrahedron (\+\_\+v0,\+\_\+v1,\+\_\+v2,\+\_\+v3) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a06186_af31b79c94cc7415229fcc9254a9f3848}\label{a06186_af31b79c94cc7415229fcc9254a9f3848}} 
{\footnotesize template$<$typename Scalar $>$ }\\Scalar \hyperlink{a06186_af31b79c94cc7415229fcc9254a9f3848}{circum\+Radius} (const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v0, const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v1, const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v2, const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v3)
\begin{DoxyCompactList}\small\item\em return radius of circumcircle of tetrahedron (\+\_\+v0,\+\_\+v1,\+\_\+v2,\+\_\+v3) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a06186_aa202b81bcef9a4dae4a08daa9946296c}\label{a06186_aa202b81bcef9a4dae4a08daa9946296c}} 
{\footnotesize template$<$typename Scalar $>$ }\\Scalar \hyperlink{a06186_aa202b81bcef9a4dae4a08daa9946296c}{point\+Line\+Orientation} (const \hyperlink{a08448}{VectorT}$<$ Scalar, 2 $>$ \&\+\_\+p, const \hyperlink{a08448}{VectorT}$<$ Scalar, 2 $>$ \&\+\_\+v0, const \hyperlink{a08448}{VectorT}$<$ Scalar, 2 $>$ \&\+\_\+v1)
\begin{DoxyCompactList}\small\item\em orientation of point \+\_\+p w.\+r.\+t. line through \+\_\+v0,\+\_\+v1 in 2D \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a06186_ac9c44c84f553597be6419f206f014bdf}\label{a06186_ac9c44c84f553597be6419f206f014bdf}} 
{\footnotesize template$<$typename Scalar $>$ }\\bool \hyperlink{a06186_ac9c44c84f553597be6419f206f014bdf}{is\+C\+CW} (const \hyperlink{a08448}{VectorT}$<$ Scalar, 2 $>$ \&\+\_\+v0, const \hyperlink{a08448}{VectorT}$<$ Scalar, 2 $>$ \&\+\_\+v1, const \hyperlink{a08448}{VectorT}$<$ Scalar, 2 $>$ \&\+\_\+v2)
\begin{DoxyCompactList}\small\item\em are 3 vertices in counterclockwise order? in 2D \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a06186_a4867f76373bba3f342813334b14e4933}\label{a06186_a4867f76373bba3f342813334b14e4933}} 
{\footnotesize template$<$typename Scalar $>$ }\\bool \hyperlink{a06186_a4867f76373bba3f342813334b14e4933}{is\+CW} (const \hyperlink{a08448}{VectorT}$<$ Scalar, 2 $>$ \&\+\_\+v0, const \hyperlink{a08448}{VectorT}$<$ Scalar, 2 $>$ \&\+\_\+v1, const \hyperlink{a08448}{VectorT}$<$ Scalar, 2 $>$ \&\+\_\+v2)
\begin{DoxyCompactList}\small\item\em are 3 vertices in clockwise order? in 2D \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a06186_ad9498133776dff39552133a45bbe106b}\label{a06186_ad9498133776dff39552133a45bbe106b}} 
{\footnotesize template$<$typename Vector $>$ }\\\hyperlink{a00188_a7932a926ab17fabe9f4a0ee1b498526c}{Vector} {\bfseries closest\+Point\+Line\+Segment} (\hyperlink{a00188_a7932a926ab17fabe9f4a0ee1b498526c}{Vector} x, \hyperlink{a00188_a7932a926ab17fabe9f4a0ee1b498526c}{Vector} p1, \hyperlink{a00188_a7932a926ab17fabe9f4a0ee1b498526c}{Vector} p2)
\item 
\mbox{\Hypertarget{a06186_a589edcdef9019b8d89b47133a8fd19ba}\label{a06186_a589edcdef9019b8d89b47133a8fd19ba}} 
{\footnotesize template$<$typename Vector $>$ }\\\hyperlink{a00188_a7932a926ab17fabe9f4a0ee1b498526c}{Vector} {\bfseries closest\+Point\+Tri} (\hyperlink{a00188_a7932a926ab17fabe9f4a0ee1b498526c}{Vector} p, \hyperlink{a00188_a7932a926ab17fabe9f4a0ee1b498526c}{Vector} a, \hyperlink{a00188_a7932a926ab17fabe9f4a0ee1b498526c}{Vector} b, \hyperlink{a00188_a7932a926ab17fabe9f4a0ee1b498526c}{Vector} c)
\item 
{\footnotesize template$<$typename VectorT , typename ValueT $>$ }\\ValueT \hyperlink{a06186_a89efec5779875bccfb0853dee57d0ff2}{get\+Fullangle} (\hyperlink{a08448}{VectorT} \+\_\+vector1, \hyperlink{a08448}{VectorT} \+\_\+vector2, const \hyperlink{a08448}{VectorT} \&\+\_\+normal, bool \&\+\_\+skip)
\item 
{\footnotesize template$<$typename ValueT $>$ }\\ValueT \hyperlink{a06186_ae369f7463dd22a3ba082a499c58940a8}{angle\+Dist} (const ValueT \&angle0, const ValueT \&angle1)
\item 
{\footnotesize template$<$typename ValueT $>$ }\\ValueT \hyperlink{a06186_a17bfb5000a1fc5b72fabd6686d492556}{get\+Angle} (const ValueT \&\+\_\+cos, const ValueT \&\+\_\+sin)
\item 
{\footnotesize template$<$typename ValueT $>$ }\\ValueT \hyperlink{a06186_a7b2719c6eff8b3356114bc0dea3aa9b4}{rad\+To\+Deg} (const ValueT \&\+\_\+angle)
\item 
{\footnotesize template$<$typename ValueT $>$ }\\ValueT \hyperlink{a06186_ac38517428254f796b48abd8819a09775}{deg\+To\+Rad} (const ValueT \&\+\_\+angle)
\item 
\mbox{\Hypertarget{a06186_a9e86cb3af66bc78903eac8e9f2f4391a}\label{a06186_a9e86cb3af66bc78903eac8e9f2f4391a}} 
bool \hyperlink{a06186_a9e86cb3af66bc78903eac8e9f2f4391a}{is\+Nan} (double x)
\begin{DoxyCompactList}\small\item\em Return false if x is not a number. \end{DoxyCompactList}\end{DoxyCompactItemize}
\begin{Indent}\textbf{ Triangle Functions 3-\/\+Dimensional}\par
\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$typename Scalar $>$ }\\bool \hyperlink{a06186_a2f86cd7636d8dd8e9d0b7b39d4cae980}{bary\+Coord} (const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+p, const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+u, const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v, const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+w, \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+result)
\item 
\mbox{\Hypertarget{a06186_a106ca265eac771657a82173ed58abd54}\label{a06186_a106ca265eac771657a82173ed58abd54}} 
{\footnotesize template$<$typename Scalar $>$ }\\bool \hyperlink{a06186_a106ca265eac771657a82173ed58abd54}{circum\+Center} (const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v0, const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v1, const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v2, \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+result)
\begin{DoxyCompactList}\small\item\em return circumcenter of triangle (\+\_\+v0,\+\_\+v1,\+\_\+v2) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a06186_ae95580f66ac7953998d8792dc21e646c}\label{a06186_ae95580f66ac7953998d8792dc21e646c}} 
{\footnotesize template$<$typename Scalar $>$ }\\Scalar \hyperlink{a06186_ae95580f66ac7953998d8792dc21e646c}{circum\+Radius\+Squared} (const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v0, const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v1, const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v2)
\begin{DoxyCompactList}\small\item\em return squared radius of circumcircle of triangle (\+\_\+v0,\+\_\+v1,\+\_\+v2) \end{DoxyCompactList}\item 
{\footnotesize template$<$class VectorT $>$ }\\int \hyperlink{a06186_af4ae48d9544087add067420a116e42d2}{is\+Obtuse} (const \hyperlink{a08448}{VectorT} \&\+\_\+p0, const \hyperlink{a08448}{VectorT} \&\+\_\+p1, const \hyperlink{a08448}{VectorT} \&\+\_\+p2)
\item 
\mbox{\Hypertarget{a06186_afb76b9ca9eede4ce5dbfaa62204358c6}\label{a06186_afb76b9ca9eede4ce5dbfaa62204358c6}} 
{\footnotesize template$<$typename Scalar $>$ }\\bool \hyperlink{a06186_afb76b9ca9eede4ce5dbfaa62204358c6}{min\+Sphere} (const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v0, const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v1, const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v2, \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+center, Scalar \&\+\_\+radius)
\begin{DoxyCompactList}\small\item\em construct min. enclosing sphere \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a06186_a02b90f565ea69094cfa5342b33fe9f0a}\label{a06186_a02b90f565ea69094cfa5342b33fe9f0a}} 
{\footnotesize template$<$typename Scalar $>$ }\\Scalar \hyperlink{a06186_a02b90f565ea69094cfa5342b33fe9f0a}{min\+Radius\+Squared} (const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v0, const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v1, const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v2)
\begin{DoxyCompactList}\small\item\em return squared radius of min. enclosing circle of triangle (\+\_\+v0,\+\_\+v1,\+\_\+v2) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a06186_a0af7220f215840c9479dcb03cff0b74f}\label{a06186_a0af7220f215840c9479dcb03cff0b74f}} 
{\footnotesize template$<$typename Scalar $>$ }\\Scalar \hyperlink{a06186_a0af7220f215840c9479dcb03cff0b74f}{min\+Radius} (const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v0, const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v1, const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v2)
\begin{DoxyCompactList}\small\item\em return radius of min. enclosing circle of triangle (\+\_\+v0,\+\_\+v1,\+\_\+v2) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a06186_aeabda7866e3d8cf988327091421502c2}\label{a06186_aeabda7866e3d8cf988327091421502c2}} 
{\footnotesize template$<$typename Scalar $>$ }\\Scalar \hyperlink{a06186_aeabda7866e3d8cf988327091421502c2}{circum\+Radius} (const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v0, const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v1, const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v2)
\begin{DoxyCompactList}\small\item\em return radius of circumcircle of triangle (\+\_\+v0,\+\_\+v1,\+\_\+v2) \end{DoxyCompactList}\end{DoxyCompactItemize}
\end{Indent}
\begin{Indent}\textbf{ Triangle Functions N-\/\+Dimensional}\par
\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$class Vec $>$ }\\Vec\+::value\+\_\+type \hyperlink{a06186_a537690ba68006ae501cec6d9940bf392}{triangle\+Area\+Squared} (const Vec \&\+\_\+v0, const Vec \&\+\_\+v1, const Vec \&\+\_\+v2)
\begin{DoxyCompactList}\small\item\em return squared area of triangle (\+\_\+v0, \+\_\+v1, \+\_\+v2) \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Scalar , int N$>$ }\\Scalar \hyperlink{a06186_a150f88dbc41704f1ef7c06e9c2f23c23}{aspect\+Ratio} (const \hyperlink{a08448}{VectorT}$<$ Scalar, N $>$ \&\+\_\+v0, const \hyperlink{a08448}{VectorT}$<$ Scalar, N $>$ \&\+\_\+v1, const \hyperlink{a08448}{VectorT}$<$ Scalar, N $>$ \&\+\_\+v2)
\begin{DoxyCompactList}\small\item\em return aspect ratio (length/height) of triangle \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Scalar , int N$>$ }\\Scalar \hyperlink{a06186_a5a3bd3e60c79490f26a9c0e430348d57}{roundness} (const \hyperlink{a08448}{VectorT}$<$ Scalar, N $>$ \&\+\_\+v0, const \hyperlink{a08448}{VectorT}$<$ Scalar, N $>$ \&\+\_\+v1, const \hyperlink{a08448}{VectorT}$<$ Scalar, N $>$ \&\+\_\+v2)
\begin{DoxyCompactList}\small\item\em return roundness of triangle\+: 1=equilateral, 0=colinear \end{DoxyCompactList}\item 
{\footnotesize template$<$class Vec $>$ }\\Vec\+::value\+\_\+type \hyperlink{a06186_ab21ef55bc454e2781dc9d6f92cacfdfa}{triangle\+Area} (const Vec \&\+\_\+v0, const Vec \&\+\_\+v1, const Vec \&\+\_\+v2)
\begin{DoxyCompactList}\small\item\em return area of triangle (\+\_\+v0, \+\_\+v1, \+\_\+v2) \end{DoxyCompactList}\end{DoxyCompactItemize}
\end{Indent}
\begin{Indent}\textbf{ Distance Functions ( N-\/\+Dimensional )}\par
\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$class Vec $>$ }\\Vec\+::value\+\_\+type \hyperlink{a06186_a560dba84f00f6c036e47b4cfb9b0526e}{dist\+Point\+Line\+Squared} (const Vec \&\+\_\+p, const Vec \&\+\_\+v0, const Vec \&\+\_\+v1, Vec $\ast$\+\_\+min\+\_\+v=0)
\begin{DoxyCompactList}\small\item\em squared distance from point \+\_\+p to line segment (\+\_\+v0,\+\_\+v1) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a06186_aeda91cebd6a78a8347b0fe7186c70552}\label{a06186_aeda91cebd6a78a8347b0fe7186c70552}} 
{\footnotesize template$<$class Vec $>$ }\\Vec\+::value\+\_\+type \hyperlink{a06186_aeda91cebd6a78a8347b0fe7186c70552}{dist\+Point\+Triangle\+Squared} (const Vec \&\+\_\+p, const Vec \&\+\_\+v0, const Vec \&\+\_\+v1, const Vec \&\+\_\+v2, Vec \&\+\_\+nearest\+Point)
\begin{DoxyCompactList}\small\item\em squared distance from point \+\_\+p to triangle (\+\_\+v0, \+\_\+v1, \+\_\+v2) \end{DoxyCompactList}\item 
{\footnotesize template$<$class Vec $>$ }\\Vec\+::value\+\_\+type \hyperlink{a06186_a583296fc0b2752369272ba87f2515ca6}{dist\+Point\+Triangle\+Squared\+Stable} (const Vec \&\+\_\+p, const Vec \&\+\_\+v0, const Vec \&\+\_\+v1, const Vec \&\+\_\+v2, Vec \&\+\_\+nearest\+Point)
\begin{DoxyCompactList}\small\item\em squared distance from point \+\_\+p to triangle (\+\_\+v0, \+\_\+v1, \+\_\+v2) \end{DoxyCompactList}\item 
{\footnotesize template$<$typename VectorT , typename ValueT $>$ }\\ValueT \hyperlink{a06186_ae49658a2060381546aaa0ddd5ab85089}{dist\+Point\+Plane} (const \hyperlink{a08448}{VectorT} \&\+\_\+porigin, const \hyperlink{a08448}{VectorT} \&\+\_\+pnormal, const \hyperlink{a08448}{VectorT} \&\+\_\+point)
\begin{DoxyCompactList}\small\item\em Checks the distance from a point to a plane. \end{DoxyCompactList}\item 
{\footnotesize template$<$class Vec $>$ }\\Vec\+::value\+\_\+type \hyperlink{a06186_ad4010bdb0c0f56e987d95bf2373874fd}{dist\+Point\+Line} (const Vec \&\+\_\+p, const Vec \&\+\_\+v0, const Vec \&\+\_\+v1, Vec $\ast$\+\_\+min\+\_\+v=0)
\begin{DoxyCompactList}\small\item\em Compute distance from point to line segment. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a06186_acaf3ab86aeedda054d50e3144f9f69df}\label{a06186_acaf3ab86aeedda054d50e3144f9f69df}} 
{\footnotesize template$<$class Vec $>$ }\\Vec\+::value\+\_\+type \hyperlink{a06186_acaf3ab86aeedda054d50e3144f9f69df}{dist\+Point\+Triangle} (const Vec \&\+\_\+p, const Vec \&\+\_\+v0, const Vec \&\+\_\+v1, const Vec \&\+\_\+v2, Vec \&\+\_\+nearest\+Point)
\begin{DoxyCompactList}\small\item\em distance from point \+\_\+p to triangle (\+\_\+v0, \+\_\+v1, \+\_\+v2) \end{DoxyCompactList}\item 
{\footnotesize template$<$class Vec $>$ }\\Vec\+::value\+\_\+type \hyperlink{a06186_af593a7ef11562d74fecf2693ccaa365a}{dist\+Point\+Triangle\+Stable} (const Vec \&\+\_\+p, const Vec \&\+\_\+v0, const Vec \&\+\_\+v1, const Vec \&\+\_\+v2, Vec \&\+\_\+nearest\+Point)
\begin{DoxyCompactList}\small\item\em distance from point \+\_\+p to triangle (\+\_\+v0, \+\_\+v1, \+\_\+v2) \end{DoxyCompactList}\end{DoxyCompactItemize}
\end{Indent}
\begin{Indent}\textbf{ Distance Functions ( 3-\/\+Dimensional )}\par
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a06186_a6b89191833fbd6a2f1dd3f43f5503606}\label{a06186_a6b89191833fbd6a2f1dd3f43f5503606}} 
{\footnotesize template$<$typename Scalar $>$ }\\Scalar \hyperlink{a06186_a6b89191833fbd6a2f1dd3f43f5503606}{dist\+Line\+Line\+Squared} (const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v00, const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v01, const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v10, const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v11, \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ $\ast$\+\_\+min\+\_\+v0=0, \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ $\ast$\+\_\+min\+\_\+v1=0, bool \+\_\+fast\+Approx=false)
\begin{DoxyCompactList}\small\item\em squared distance of lines (\+\_\+v00, \+\_\+v01) and (\+\_\+v10, \+\_\+v11) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a06186_a1c1827229a2e96a255a27eb48414a39c}\label{a06186_a1c1827229a2e96a255a27eb48414a39c}} 
{\footnotesize template$<$typename Scalar $>$ }\\Scalar \hyperlink{a06186_a1c1827229a2e96a255a27eb48414a39c}{dist\+Line\+Line} (const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v00, const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v01, const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v10, const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+v11, \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ $\ast$\+\_\+min\+\_\+v0=0, \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ $\ast$\+\_\+min\+\_\+v1=0)
\begin{DoxyCompactList}\small\item\em distance of lines (\+\_\+v00, \+\_\+v01) and (\+\_\+v10, \+\_\+v11) \end{DoxyCompactList}\end{DoxyCompactItemize}
\end{Indent}
\begin{Indent}\textbf{ Projection Functions ( N-\/\+Dimensional )}\par
\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$typename VectorT $>$ }\\\hyperlink{a08448}{VectorT} \hyperlink{a06186_ae77ecc6067e035747777a768176cf0c7}{project\+To\+Edge} (const \hyperlink{a08448}{VectorT} \&\+\_\+start, const \hyperlink{a08448}{VectorT} \&\+\_\+end, const \hyperlink{a08448}{VectorT} \&\+\_\+point)
\item 
{\footnotesize template$<$typename VectorT $>$ }\\\hyperlink{a08448}{VectorT} \hyperlink{a06186_a8bea840b0bcbe698a50f0e64fa8b2a6b}{project\+To\+Plane} (const \hyperlink{a08448}{VectorT} \&\+\_\+porigin, const \hyperlink{a08448}{VectorT} \&\+\_\+pnormal, const \hyperlink{a08448}{VectorT} \&\+\_\+point)
\begin{DoxyCompactList}\small\item\em projects a point to a plane \end{DoxyCompactList}\end{DoxyCompactItemize}
\end{Indent}
\begin{Indent}\textbf{ Triangle Functions (2D Only!!)}\par
\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$typename Scalar $>$ }\\bool \hyperlink{a06186_adde55d8caa14ddc327401a673adedd7a}{bary\+Coord} (const \hyperlink{a08448}{VectorT}$<$ Scalar, 2 $>$ \&\+\_\+p, const \hyperlink{a08448}{VectorT}$<$ Scalar, 2 $>$ \&\+\_\+u, const \hyperlink{a08448}{VectorT}$<$ Scalar, 2 $>$ \&\+\_\+v, const \hyperlink{a08448}{VectorT}$<$ Scalar, 2 $>$ \&\+\_\+w, \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&\+\_\+result)
\begin{DoxyCompactList}\small\item\em return circumcenter of triangle (\+\_\+v0,\+\_\+v1,\+\_\+v2) \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Scalar $>$ }\\bool \hyperlink{a06186_a8e789fb183b8bca56a5f71e844b898ac}{circum\+Center} (const \hyperlink{a08448}{VectorT}$<$ Scalar, 2 $>$ \&\+\_\+v0, const \hyperlink{a08448}{VectorT}$<$ Scalar, 2 $>$ \&\+\_\+v1, const \hyperlink{a08448}{VectorT}$<$ Scalar, 2 $>$ \&\+\_\+v2, \hyperlink{a08448}{VectorT}$<$ Scalar, 2 $>$ \&\+\_\+result)
\begin{DoxyCompactList}\small\item\em return circumcenter of triangle (\+\_\+v0,\+\_\+v1,\+\_\+v2) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a06186_a541b3ceaf403369f655da2f99fb4e595}\label{a06186_a541b3ceaf403369f655da2f99fb4e595}} 
{\footnotesize template$<$typename Scalar $>$ }\\bool \hyperlink{a06186_a541b3ceaf403369f655da2f99fb4e595}{is\+In\+Triangle} (const \hyperlink{a08448}{VectorT}$<$ Scalar, 2 $>$ \&\+\_\+p, const \hyperlink{a08448}{VectorT}$<$ Scalar, 2 $>$ \&\+\_\+u, const \hyperlink{a08448}{VectorT}$<$ Scalar, 2 $>$ \&\+\_\+v, const \hyperlink{a08448}{VectorT}$<$ Scalar, 2 $>$ \&\+\_\+w)
\begin{DoxyCompactList}\small\item\em is point \+\_\+p in triangle (\+\_\+v0,\+\_\+v1,\+\_\+v2) in 2D \end{DoxyCompactList}\end{DoxyCompactItemize}
\end{Indent}


\subsection{Detailed Description}
This namespace holds some geometric types as well as geometry algorithms. 

\subsection{Function Documentation}
\mbox{\Hypertarget{a06186_ae369f7463dd22a3ba082a499c58940a8}\label{a06186_ae369f7463dd22a3ba082a499c58940a8}} 
\index{A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}!angle\+Dist@{angle\+Dist}}
\index{angle\+Dist@{angle\+Dist}!A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}}
\subsubsection{\texorpdfstring{angle\+Dist()}{angleDist()}}
{\footnotesize\ttfamily template$<$typename ValueT $>$ \\
ValueT A\+C\+G\+::\+Geometry\+::angle\+Dist (\begin{DoxyParamCaption}\item[{const ValueT \&}]{angle0,  }\item[{const ValueT \&}]{angle1 }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}

Calculate the difference between two angles ( minimum distance ) 
\begin{DoxyParams}{Parameters}
{\em angle0} & angle1 \\
\hline
{\em angle1} & angle2 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The difference between the angles (0..PI) 
\end{DoxyReturn}


Definition at line 113 of file Algorithms\+Angle\+T\+\_\+impl.\+hh.

\mbox{\Hypertarget{a06186_a150f88dbc41704f1ef7c06e9c2f23c23}\label{a06186_a150f88dbc41704f1ef7c06e9c2f23c23}} 
\index{A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}!aspect\+Ratio@{aspect\+Ratio}}
\index{aspect\+Ratio@{aspect\+Ratio}!A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}}
\subsubsection{\texorpdfstring{aspect\+Ratio()}{aspectRatio()}}
{\footnotesize\ttfamily template$<$typename Scalar , int N$>$ \\
Scalar A\+C\+G\+::\+Geometry\+::aspect\+Ratio (\begin{DoxyParamCaption}\item[{const \hyperlink{a08448}{VectorT}$<$ Scalar, N $>$ \&}]{\+\_\+v0,  }\item[{const \hyperlink{a08448}{VectorT}$<$ Scalar, N $>$ \&}]{\+\_\+v1,  }\item[{const \hyperlink{a08448}{VectorT}$<$ Scalar, N $>$ \&}]{\+\_\+v2 }\end{DoxyParamCaption})}



return aspect ratio (length/height) of triangle 


\begin{DoxyParams}{Parameters}
{\em \+\_\+v0} & First point of triangle \\
\hline
{\em \+\_\+v1} & Second point of triangle \\
\hline
{\em \+\_\+v2} & Third point of triangl \\
\hline
\end{DoxyParams}


Definition at line 1256 of file Algorithms.\+cc.

\mbox{\Hypertarget{a06186_ab3bd1d5f1d6155767dfdfee654db0eb6}\label{a06186_ab3bd1d5f1d6155767dfdfee654db0eb6}} 
\index{A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}!axis\+Aligned\+B\+B\+Intersection@{axis\+Aligned\+B\+B\+Intersection}}
\index{axis\+Aligned\+B\+B\+Intersection@{axis\+Aligned\+B\+B\+Intersection}!A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}}
\subsubsection{\texorpdfstring{axis\+Aligned\+B\+B\+Intersection()}{axisAlignedBBIntersection()}}
{\footnotesize\ttfamily template$<$typename Vec $>$ \\
bool A\+C\+G\+::\+Geometry\+::axis\+Aligned\+B\+B\+Intersection (\begin{DoxyParamCaption}\item[{const Vec \&}]{\+\_\+o,  }\item[{const Vec \&}]{\+\_\+dir,  }\item[{const Vec \&}]{\+\_\+bbmin,  }\item[{const Vec \&}]{\+\_\+bbmax,  }\item[{typename Vec\+::value\+\_\+type \&}]{\+\_\+t0,  }\item[{typename Vec\+::value\+\_\+type \&}]{\+\_\+t1 }\end{DoxyParamCaption})}



Intersect a ray and an axis aligned bounding box. 

Computes the intersection point between a ray and an axis aligned bounding box


\begin{DoxyParams}{Parameters}
{\em \+\_\+o} & Origin of the ray \\
\hline
{\em \+\_\+dir} & direction vector of the ray \\
\hline
{\em \+\_\+bbmin} & lower left front corner of the bounding box \\
\hline
{\em \+\_\+bbmax} & upper right back corner of the bounding box \\
\hline
{\em \+\_\+t0} & if there was an intersection, this value marks the entry point \\
\hline
{\em \+\_\+t1} & if there was an intersection, this value marks the exit point \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if an intersection was found 
\end{DoxyReturn}


Definition at line 1359 of file Algorithms.\+cc.

\mbox{\Hypertarget{a06186_a2f86cd7636d8dd8e9d0b7b39d4cae980}\label{a06186_a2f86cd7636d8dd8e9d0b7b39d4cae980}} 
\index{A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}!bary\+Coord@{bary\+Coord}}
\index{bary\+Coord@{bary\+Coord}!A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}}
\subsubsection{\texorpdfstring{bary\+Coord()}{baryCoord()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily template$<$typename Scalar $>$ \\
bool A\+C\+G\+::\+Geometry\+::bary\+Coord (\begin{DoxyParamCaption}\item[{const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&}]{\+\_\+p,  }\item[{const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&}]{\+\_\+u,  }\item[{const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&}]{\+\_\+v,  }\item[{const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&}]{\+\_\+w,  }\item[{\hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&}]{\+\_\+result }\end{DoxyParamCaption})}

barycentric coord of \+\_\+p w.\+r.\+t. (\+\_\+u,\+\_\+v,\+\_\+w) in 3D \+\_\+p has to lie in plane (\+\_\+u,\+\_\+v,\+\_\+w) 

Definition at line 83 of file Algorithms.\+cc.

\mbox{\Hypertarget{a06186_adde55d8caa14ddc327401a673adedd7a}\label{a06186_adde55d8caa14ddc327401a673adedd7a}} 
\index{A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}!bary\+Coord@{bary\+Coord}}
\index{bary\+Coord@{bary\+Coord}!A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}}
\subsubsection{\texorpdfstring{bary\+Coord()}{baryCoord()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily template$<$typename Scalar $>$ \\
bool A\+C\+G\+::\+Geometry\+::bary\+Coord (\begin{DoxyParamCaption}\item[{const \hyperlink{a08448}{VectorT}$<$ Scalar, 2 $>$ \&}]{\+\_\+p,  }\item[{const \hyperlink{a08448}{VectorT}$<$ Scalar, 2 $>$ \&}]{\+\_\+u,  }\item[{const \hyperlink{a08448}{VectorT}$<$ Scalar, 2 $>$ \&}]{\+\_\+v,  }\item[{const \hyperlink{a08448}{VectorT}$<$ Scalar, 2 $>$ \&}]{\+\_\+w,  }\item[{\hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&}]{\+\_\+result }\end{DoxyParamCaption})}



return circumcenter of triangle (\+\_\+v0,\+\_\+v1,\+\_\+v2) 

barycentric coord of \+\_\+p w.\+r.\+t. (\+\_\+u,\+\_\+v,\+\_\+w) in 2D 

Definition at line 1173 of file Algorithms.\+cc.

\mbox{\Hypertarget{a06186_a8e789fb183b8bca56a5f71e844b898ac}\label{a06186_a8e789fb183b8bca56a5f71e844b898ac}} 
\index{A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}!circum\+Center@{circum\+Center}}
\index{circum\+Center@{circum\+Center}!A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}}
\subsubsection{\texorpdfstring{circum\+Center()}{circumCenter()}}
{\footnotesize\ttfamily template$<$typename Scalar $>$ \\
bool A\+C\+G\+::\+Geometry\+::circum\+Center (\begin{DoxyParamCaption}\item[{const \hyperlink{a08448}{VectorT}$<$ Scalar, 2 $>$ \&}]{\+\_\+v0,  }\item[{const \hyperlink{a08448}{VectorT}$<$ Scalar, 2 $>$ \&}]{\+\_\+v1,  }\item[{const \hyperlink{a08448}{VectorT}$<$ Scalar, 2 $>$ \&}]{\+\_\+v2,  }\item[{\hyperlink{a08448}{VectorT}$<$ Scalar, 2 $>$ \&}]{\+\_\+result }\end{DoxyParamCaption})}



return circumcenter of triangle (\+\_\+v0,\+\_\+v1,\+\_\+v2) 

barycentric coord of \+\_\+p w.\+r.\+t. (\+\_\+u,\+\_\+v,\+\_\+w) in 2D 

Definition at line 1226 of file Algorithms.\+cc.

\mbox{\Hypertarget{a06186_ac38517428254f796b48abd8819a09775}\label{a06186_ac38517428254f796b48abd8819a09775}} 
\index{A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}!deg\+To\+Rad@{deg\+To\+Rad}}
\index{deg\+To\+Rad@{deg\+To\+Rad}!A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}}
\subsubsection{\texorpdfstring{deg\+To\+Rad()}{degToRad()}}
{\footnotesize\ttfamily template$<$typename ValueT $>$ \\
ValueT A\+C\+G\+::\+Geometry\+::deg\+To\+Rad (\begin{DoxyParamCaption}\item[{const ValueT \&}]{\+\_\+angle }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}

Convert angle from degree to radians 
\begin{DoxyParams}{Parameters}
{\em \+\_\+angle} & in degree \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
angle in radians 
\end{DoxyReturn}


Definition at line 152 of file Algorithms\+Angle\+T\+\_\+impl.\+hh.

\mbox{\Hypertarget{a06186_ad4010bdb0c0f56e987d95bf2373874fd}\label{a06186_ad4010bdb0c0f56e987d95bf2373874fd}} 
\index{A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}!dist\+Point\+Line@{dist\+Point\+Line}}
\index{dist\+Point\+Line@{dist\+Point\+Line}!A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}}
\subsubsection{\texorpdfstring{dist\+Point\+Line()}{distPointLine()}}
{\footnotesize\ttfamily template$<$class Vec $>$ \\
Vec\+::value\+\_\+type A\+C\+G\+::\+Geometry\+::dist\+Point\+Line (\begin{DoxyParamCaption}\item[{const Vec \&}]{\+\_\+p,  }\item[{const Vec \&}]{\+\_\+v0,  }\item[{const Vec \&}]{\+\_\+v1,  }\item[{Vec $\ast$}]{\+\_\+min\+\_\+v = {\ttfamily 0} }\end{DoxyParamCaption})}



Compute distance from point to line segment. 

Compute the distance from a point p to a line segment and possibly return closest point on segment


\begin{DoxyParams}{Parameters}
{\em \+\_\+p} & Point to test \\
\hline
{\em \+\_\+v0} & Start of line segment \\
\hline
{\em \+\_\+v1} & End of line segment \\
\hline
{\em \+\_\+min\+\_\+v} & Pointer to vector, to get the closest point or 0 if it\textquotesingle{}s not required \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Distance to line segment 
\end{DoxyReturn}


Definition at line 288 of file Algorithms.\+hh.

\mbox{\Hypertarget{a06186_a560dba84f00f6c036e47b4cfb9b0526e}\label{a06186_a560dba84f00f6c036e47b4cfb9b0526e}} 
\index{A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}!dist\+Point\+Line\+Squared@{dist\+Point\+Line\+Squared}}
\index{dist\+Point\+Line\+Squared@{dist\+Point\+Line\+Squared}!A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}}
\subsubsection{\texorpdfstring{dist\+Point\+Line\+Squared()}{distPointLineSquared()}}
{\footnotesize\ttfamily template$<$class Vec $>$ \\
Vec\+::value\+\_\+type A\+C\+G\+::\+Geometry\+::dist\+Point\+Line\+Squared (\begin{DoxyParamCaption}\item[{const Vec \&}]{\+\_\+p,  }\item[{const Vec \&}]{\+\_\+v0,  }\item[{const Vec \&}]{\+\_\+v1,  }\item[{Vec $\ast$}]{\+\_\+min\+\_\+v = {\ttfamily 0} }\end{DoxyParamCaption})}



squared distance from point \+\_\+p to line segment (\+\_\+v0,\+\_\+v1) 


\begin{DoxyParams}{Parameters}
{\em \+\_\+p} & Point to test \\
\hline
{\em \+\_\+v0} & Start of line segment \\
\hline
{\em \+\_\+v1} & End of line segment \\
\hline
{\em \+\_\+min\+\_\+v} & Pointer to vector, to get the closest point or 0 if it\textquotesingle{}s not required \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Distance to line segment 
\end{DoxyReturn}


Definition at line 290 of file Algorithms.\+cc.

\mbox{\Hypertarget{a06186_ae49658a2060381546aaa0ddd5ab85089}\label{a06186_ae49658a2060381546aaa0ddd5ab85089}} 
\index{A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}!dist\+Point\+Plane@{dist\+Point\+Plane}}
\index{dist\+Point\+Plane@{dist\+Point\+Plane}!A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}}
\subsubsection{\texorpdfstring{dist\+Point\+Plane()}{distPointPlane()}}
{\footnotesize\ttfamily template$<$typename VectorT , typename ValueT $>$ \\
ValueT A\+C\+G\+::\+Geometry\+::dist\+Point\+Plane (\begin{DoxyParamCaption}\item[{const \hyperlink{a08448}{VectorT} \&}]{\+\_\+porigin,  }\item[{const \hyperlink{a08448}{VectorT} \&}]{\+\_\+pnormal,  }\item[{const \hyperlink{a08448}{VectorT} \&}]{\+\_\+point }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Checks the distance from a point to a plane. 


\begin{DoxyParams}{Parameters}
{\em \+\_\+porigin} & Planes origin \\
\hline
{\em \+\_\+pnormal} & \hyperlink{a07264}{Plane} normal ( has to be normalized!) \\
\hline
{\em \+\_\+point} & point to test \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
distance 
\end{DoxyReturn}


Definition at line 862 of file Algorithms.\+cc.

\mbox{\Hypertarget{a06186_a583296fc0b2752369272ba87f2515ca6}\label{a06186_a583296fc0b2752369272ba87f2515ca6}} 
\index{A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}!dist\+Point\+Triangle\+Squared\+Stable@{dist\+Point\+Triangle\+Squared\+Stable}}
\index{dist\+Point\+Triangle\+Squared\+Stable@{dist\+Point\+Triangle\+Squared\+Stable}!A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}}
\subsubsection{\texorpdfstring{dist\+Point\+Triangle\+Squared\+Stable()}{distPointTriangleSquaredStable()}}
{\footnotesize\ttfamily template$<$class Vec $>$ \\
Vec\+::value\+\_\+type A\+C\+G\+::\+Geometry\+::dist\+Point\+Triangle\+Squared\+Stable (\begin{DoxyParamCaption}\item[{const Vec \&}]{\+\_\+p,  }\item[{const Vec \&}]{\+\_\+v0,  }\item[{const Vec \&}]{\+\_\+v1,  }\item[{const Vec \&}]{\+\_\+v2,  }\item[{Vec \&}]{\+\_\+nearest\+Point }\end{DoxyParamCaption})}



squared distance from point \+\_\+p to triangle (\+\_\+v0, \+\_\+v1, \+\_\+v2) 

In the stable version the distance to the longest edge is returned if the triangle is degenerate.


\begin{DoxyParams}{Parameters}
{\em \+\_\+p} & point to test against triangle \\
\hline
{\em \+\_\+v0} & First point of triangle \\
\hline
{\em \+\_\+v1} & Second point of triangle \\
\hline
{\em \+\_\+v2} & Third point of triangle \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Computed distance 
\end{DoxyReturn}


Definition at line 466 of file Algorithms.\+cc.

\mbox{\Hypertarget{a06186_af593a7ef11562d74fecf2693ccaa365a}\label{a06186_af593a7ef11562d74fecf2693ccaa365a}} 
\index{A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}!dist\+Point\+Triangle\+Stable@{dist\+Point\+Triangle\+Stable}}
\index{dist\+Point\+Triangle\+Stable@{dist\+Point\+Triangle\+Stable}!A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}}
\subsubsection{\texorpdfstring{dist\+Point\+Triangle\+Stable()}{distPointTriangleStable()}}
{\footnotesize\ttfamily template$<$class Vec $>$ \\
Vec\+::value\+\_\+type A\+C\+G\+::\+Geometry\+::dist\+Point\+Triangle\+Stable (\begin{DoxyParamCaption}\item[{const Vec \&}]{\+\_\+p,  }\item[{const Vec \&}]{\+\_\+v0,  }\item[{const Vec \&}]{\+\_\+v1,  }\item[{const Vec \&}]{\+\_\+v2,  }\item[{Vec \&}]{\+\_\+nearest\+Point }\end{DoxyParamCaption})}



distance from point \+\_\+p to triangle (\+\_\+v0, \+\_\+v1, \+\_\+v2) 

In the stable version the distance to the longest edge is returned if the triangle is degenerate.


\begin{DoxyParams}{Parameters}
{\em \+\_\+v0} & First point of triangle \\
\hline
{\em \+\_\+v1} & Second point of triangle \\
\hline
{\em \+\_\+v2} & Third point of triangle \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Computed distance 
\end{DoxyReturn}


Definition at line 345 of file Algorithms.\+hh.

\mbox{\Hypertarget{a06186_a3a7dca53b00ae6eeabb41e910f11ecca}\label{a06186_a3a7dca53b00ae6eeabb41e910f11ecca}} 
\index{A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}!edge\+Convex\+Polygon\+Intersection@{edge\+Convex\+Polygon\+Intersection}}
\index{edge\+Convex\+Polygon\+Intersection@{edge\+Convex\+Polygon\+Intersection}!A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}}
\subsubsection{\texorpdfstring{edge\+Convex\+Polygon\+Intersection()}{edgeConvexPolygonIntersection()}}
{\footnotesize\ttfamily template$<$typename Scalar $>$ \\
bool A\+C\+G\+::\+Geometry\+::edge\+Convex\+Polygon\+Intersection (\begin{DoxyParamCaption}\item[{std\+::vector$<$ \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ $>$}]{\+\_\+polygon\+\_\+points,  }\item[{\hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$}]{\+\_\+v0,  }\item[{\hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$}]{\+\_\+v1,  }\item[{\hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&}]{\+\_\+result }\end{DoxyParamCaption})}



Get intersection point of a ray and a convex polygon. 

Gets two vertices, \+\_\+v0 and \+\_\+v1, and a convex polygon defined by its vertices stored in \+\_\+polygon\+\_\+points Computes the intersection point of the ray defined by \+\_\+v0 and \+\_\+v1 and stores it to \+\_\+result Returns true if the intersection point lies inside the polygon


\begin{DoxyParams}{Parameters}
{\em \+\_\+v0} & The first vertex of a ray \\
\hline
{\em \+\_\+v1} & The second vertex if a ray \\
\hline
{\em \+\_\+polygon\+\_\+points} & vector of the points bounding the polygon \\
\hline
{\em \+\_\+result} & contains the intersection point after the computation \\
\hline
\end{DoxyParams}


Definition at line 172 of file Algorithms.\+cc.

\mbox{\Hypertarget{a06186_a17bfb5000a1fc5b72fabd6686d492556}\label{a06186_a17bfb5000a1fc5b72fabd6686d492556}} 
\index{A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}!get\+Angle@{get\+Angle}}
\index{get\+Angle@{get\+Angle}!A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}}
\subsubsection{\texorpdfstring{get\+Angle()}{getAngle()}}
{\footnotesize\ttfamily template$<$typename ValueT $>$ \\
ValueT A\+C\+G\+::\+Geometry\+::get\+Angle (\begin{DoxyParamCaption}\item[{const ValueT \&}]{\+\_\+cos,  }\item[{const ValueT \&}]{\+\_\+sin }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}

Calculate the correct 2D angle if cos and sin of the angle are given This function calculates based on the signs of the acos and asin of the given angles, in which quadrant the angle is and returns the full angle in radians 
\begin{DoxyParams}{Parameters}
{\em \+\_\+cos} & cos of angle \\
\hline
{\em \+\_\+sin} & sin of angle \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
angle 
\end{DoxyReturn}


Definition at line 121 of file Algorithms\+Angle\+T\+\_\+impl.\+hh.

\mbox{\Hypertarget{a06186_a89efec5779875bccfb0853dee57d0ff2}\label{a06186_a89efec5779875bccfb0853dee57d0ff2}} 
\index{A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}!get\+Fullangle@{get\+Fullangle}}
\index{get\+Fullangle@{get\+Fullangle}!A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}}
\subsubsection{\texorpdfstring{get\+Fullangle()}{getFullangle()}}
{\footnotesize\ttfamily template$<$typename VectorT , typename ValueT $>$ \\
ValueT A\+C\+G\+::\+Geometry\+::get\+Fullangle (\begin{DoxyParamCaption}\item[{\hyperlink{a08448}{VectorT}}]{\+\_\+vector1,  }\item[{\hyperlink{a08448}{VectorT}}]{\+\_\+vector2,  }\item[{const \hyperlink{a08448}{VectorT} \&}]{\+\_\+normal,  }\item[{bool \&}]{\+\_\+skip }\end{DoxyParamCaption})}

Return a fully parametrized angle 
\begin{DoxyParams}{Parameters}
{\em \+\_\+vector1} & vector pointing away from center, angle = 0 \\
\hline
{\em \+\_\+vector2} & vector for which the angle should be calculated \\
\hline
{\em \+\_\+normal} & the normal used to compute if vector2 is left or right of vecor1 \\
\hline
{\em \+\_\+skip} & Flag to catch nan. If true nan occurred and value should not be used \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the angle (0 .. 2 $\ast$ PI) 
\end{DoxyReturn}


Definition at line 76 of file Algorithms\+Angle\+T\+\_\+impl.\+hh.

\mbox{\Hypertarget{a06186_af4ae48d9544087add067420a116e42d2}\label{a06186_af4ae48d9544087add067420a116e42d2}} 
\index{A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}!is\+Obtuse@{is\+Obtuse}}
\index{is\+Obtuse@{is\+Obtuse}!A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}}
\subsubsection{\texorpdfstring{is\+Obtuse()}{isObtuse()}}
{\footnotesize\ttfamily template$<$class VectorT $>$ \\
int A\+C\+G\+::\+Geometry\+::is\+Obtuse (\begin{DoxyParamCaption}\item[{const \hyperlink{a08448}{VectorT} \&}]{\+\_\+p0,  }\item[{const \hyperlink{a08448}{VectorT} \&}]{\+\_\+p1,  }\item[{const \hyperlink{a08448}{VectorT} \&}]{\+\_\+p2 }\end{DoxyParamCaption})}

test angles in triangle return 0 if all smaller than 90? return 1 if angle at \+\_\+p0 ist greater than 90? return 2 if angle at \+\_\+p1 ist greater than 90? return 3 if angle at \+\_\+p2 ist greater than 90? 

Definition at line 1003 of file Algorithms.\+cc.

\mbox{\Hypertarget{a06186_aa812bac009f4ed7111d1a4951bb20a4f}\label{a06186_aa812bac009f4ed7111d1a4951bb20a4f}} 
\index{A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}!perpendicular@{perpendicular}}
\index{perpendicular@{perpendicular}!A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}}
\subsubsection{\texorpdfstring{perpendicular()}{perpendicular()}}
{\footnotesize\ttfamily template$<$typename Scalar $>$ \\
\hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ A\+C\+G\+::\+Geometry\+::perpendicular (\begin{DoxyParamCaption}\item[{const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&}]{\+\_\+v }\end{DoxyParamCaption})}



find a vector that\textquotesingle{}s perpendicular to \+\_\+v 

This function takes a vector and generates a new arbitrary vector that is perpendicular to the input vector.


\begin{DoxyParams}{Parameters}
{\em \+\_\+v} & Input vector \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Perpendicular vector 
\end{DoxyReturn}


Definition at line 1152 of file Algorithms.\+cc.

\mbox{\Hypertarget{a06186_ae77ecc6067e035747777a768176cf0c7}\label{a06186_ae77ecc6067e035747777a768176cf0c7}} 
\index{A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}!project\+To\+Edge@{project\+To\+Edge}}
\index{project\+To\+Edge@{project\+To\+Edge}!A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}}
\subsubsection{\texorpdfstring{project\+To\+Edge()}{projectToEdge()}}
{\footnotesize\ttfamily template$<$typename VectorT $>$ \\
\hyperlink{a08448}{VectorT} A\+C\+G\+::\+Geometry\+::project\+To\+Edge (\begin{DoxyParamCaption}\item[{const \hyperlink{a08448}{VectorT} \&}]{\+\_\+start,  }\item[{const \hyperlink{a08448}{VectorT} \&}]{\+\_\+end,  }\item[{const \hyperlink{a08448}{VectorT} \&}]{\+\_\+point }\end{DoxyParamCaption})}

project one point to an edge. If its projection is not on the edge itself, the start or the endpoint is returned 
\begin{DoxyParams}{Parameters}
{\em \+\_\+start} & beginning of edge \\
\hline
{\em \+\_\+end} & end of the edge \\
\hline
{\em \+\_\+point} & point to be projected \\
\hline
\end{DoxyParams}


Definition at line 874 of file Algorithms.\+cc.

\mbox{\Hypertarget{a06186_a8bea840b0bcbe698a50f0e64fa8b2a6b}\label{a06186_a8bea840b0bcbe698a50f0e64fa8b2a6b}} 
\index{A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}!project\+To\+Plane@{project\+To\+Plane}}
\index{project\+To\+Plane@{project\+To\+Plane}!A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}}
\subsubsection{\texorpdfstring{project\+To\+Plane()}{projectToPlane()}}
{\footnotesize\ttfamily template$<$typename VectorT $>$ \\
\hyperlink{a08448}{VectorT} A\+C\+G\+::\+Geometry\+::project\+To\+Plane (\begin{DoxyParamCaption}\item[{const \hyperlink{a08448}{VectorT} \&}]{\+\_\+porigin,  }\item[{const \hyperlink{a08448}{VectorT} \&}]{\+\_\+pnormal,  }\item[{const \hyperlink{a08448}{VectorT} \&}]{\+\_\+point }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



projects a point to a plane 


\begin{DoxyParams}{Parameters}
{\em \+\_\+porigin} & Planes origin \\
\hline
{\em \+\_\+pnormal} & \hyperlink{a07264}{Plane} normal ( has to be normalized! ) \\
\hline
{\em \+\_\+point} & point to project \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
projected point 
\end{DoxyReturn}


Definition at line 894 of file Algorithms.\+cc.

\mbox{\Hypertarget{a06186_a7b2719c6eff8b3356114bc0dea3aa9b4}\label{a06186_a7b2719c6eff8b3356114bc0dea3aa9b4}} 
\index{A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}!rad\+To\+Deg@{rad\+To\+Deg}}
\index{rad\+To\+Deg@{rad\+To\+Deg}!A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}}
\subsubsection{\texorpdfstring{rad\+To\+Deg()}{radToDeg()}}
{\footnotesize\ttfamily template$<$typename ValueT $>$ \\
ValueT A\+C\+G\+::\+Geometry\+::rad\+To\+Deg (\begin{DoxyParamCaption}\item[{const ValueT \&}]{\+\_\+angle }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}

Convert angle from radians to degree 
\begin{DoxyParams}{Parameters}
{\em \+\_\+angle} & in radians \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
angle in degree 
\end{DoxyReturn}


Definition at line 145 of file Algorithms\+Angle\+T\+\_\+impl.\+hh.

\mbox{\Hypertarget{a06186_a67ed02ee6bb8eeeca6757e1787fbe3c0}\label{a06186_a67ed02ee6bb8eeeca6757e1787fbe3c0}} 
\index{A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}!rotation\+Of\+Two\+Vectors@{rotation\+Of\+Two\+Vectors}}
\index{rotation\+Of\+Two\+Vectors@{rotation\+Of\+Two\+Vectors}!A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}}
\subsubsection{\texorpdfstring{rotation\+Of\+Two\+Vectors()}{rotationOfTwoVectors()}}
{\footnotesize\ttfamily template$<$typename Scalar $>$ \\
bool A\+C\+G\+::\+Geometry\+::rotation\+Of\+Two\+Vectors (\begin{DoxyParamCaption}\item[{const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&}]{\+\_\+v0,  }\item[{const \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&}]{\+\_\+v1,  }\item[{\hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \&}]{\+\_\+axis,  }\item[{Scalar \&}]{\+\_\+angle,  }\item[{bool}]{\+\_\+degree = {\ttfamily true} }\end{DoxyParamCaption})}



Get rotation axis and signed angle of rotation between two vectors. 

Get two vectors, \+\_\+v0 and \+\_\+v1, and compute rotation axis \+\_\+v0 \% \+\_\+v1 as well the angle between \+\_\+v0 and \+\_\+v1. Note that the angle is always negative. We consider the rotation to be performed from \+\_\+v0 to \+\_\+v1. The angle is given in degree if not explicitly demanded in radiant (pass false as fifth parameter).


\begin{DoxyParams}{Parameters}
{\em \+\_\+v0} & The first vector \\
\hline
{\em \+\_\+v1} & The second vector \\
\hline
{\em \+\_\+axis} & A reference to a vector in which the rotation axis is stored \\
\hline
{\em \+\_\+angle} & A reference to a scalar type in which the signed angle is stored ( in degree) \\
\hline
{\em \+\_\+degree} & Indicates whether the angle should be given in degree or radiant \\
\hline
\end{DoxyParams}


Definition at line 963 of file Algorithms.\+cc.

\mbox{\Hypertarget{a06186_a5a3bd3e60c79490f26a9c0e430348d57}\label{a06186_a5a3bd3e60c79490f26a9c0e430348d57}} 
\index{A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}!roundness@{roundness}}
\index{roundness@{roundness}!A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}}
\subsubsection{\texorpdfstring{roundness()}{roundness()}}
{\footnotesize\ttfamily template$<$typename Scalar , int N$>$ \\
Scalar A\+C\+G\+::\+Geometry\+::roundness (\begin{DoxyParamCaption}\item[{const \hyperlink{a08448}{VectorT}$<$ Scalar, N $>$ \&}]{\+\_\+v0,  }\item[{const \hyperlink{a08448}{VectorT}$<$ Scalar, N $>$ \&}]{\+\_\+v1,  }\item[{const \hyperlink{a08448}{VectorT}$<$ Scalar, N $>$ \&}]{\+\_\+v2 }\end{DoxyParamCaption})}



return roundness of triangle\+: 1=equilateral, 0=colinear 


\begin{DoxyParams}{Parameters}
{\em \+\_\+v0} & First point of triangle \\
\hline
{\em \+\_\+v1} & Second point of triangle \\
\hline
{\em \+\_\+v2} & Third point of triangl \\
\hline
\end{DoxyParams}


Definition at line 1292 of file Algorithms.\+cc.

\mbox{\Hypertarget{a06186_ab21ef55bc454e2781dc9d6f92cacfdfa}\label{a06186_ab21ef55bc454e2781dc9d6f92cacfdfa}} 
\index{A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}!triangle\+Area@{triangle\+Area}}
\index{triangle\+Area@{triangle\+Area}!A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}}
\subsubsection{\texorpdfstring{triangle\+Area()}{triangleArea()}}
{\footnotesize\ttfamily template$<$class Vec $>$ \\
Vec\+::value\+\_\+type A\+C\+G\+::\+Geometry\+::triangle\+Area (\begin{DoxyParamCaption}\item[{const Vec \&}]{\+\_\+v0,  }\item[{const Vec \&}]{\+\_\+v1,  }\item[{const Vec \&}]{\+\_\+v2 }\end{DoxyParamCaption})}



return area of triangle (\+\_\+v0, \+\_\+v1, \+\_\+v2) 


\begin{DoxyParams}{Parameters}
{\em \+\_\+v0} & First point of triangle \\
\hline
{\em \+\_\+v1} & Second point of triangle \\
\hline
{\em \+\_\+v2} & Third point of triangl \\
\hline
\end{DoxyParams}


Definition at line 595 of file Algorithms.\+hh.

\mbox{\Hypertarget{a06186_a537690ba68006ae501cec6d9940bf392}\label{a06186_a537690ba68006ae501cec6d9940bf392}} 
\index{A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}!triangle\+Area\+Squared@{triangle\+Area\+Squared}}
\index{triangle\+Area\+Squared@{triangle\+Area\+Squared}!A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}}
\subsubsection{\texorpdfstring{triangle\+Area\+Squared()}{triangleAreaSquared()}}
{\footnotesize\ttfamily template$<$class Vec $>$ \\
Vec\+::value\+\_\+type A\+C\+G\+::\+Geometry\+::triangle\+Area\+Squared (\begin{DoxyParamCaption}\item[{const Vec \&}]{\+\_\+v0,  }\item[{const Vec \&}]{\+\_\+v1,  }\item[{const Vec \&}]{\+\_\+v2 }\end{DoxyParamCaption})}



return squared area of triangle (\+\_\+v0, \+\_\+v1, \+\_\+v2) 


\begin{DoxyParams}{Parameters}
{\em \+\_\+v0} & First point of triangle \\
\hline
{\em \+\_\+v1} & Second point of triangle \\
\hline
{\em \+\_\+v2} & Third point of triangl \\
\hline
\end{DoxyParams}


Definition at line 163 of file Algorithms.\+cc.

\mbox{\Hypertarget{a06186_a7c0267304e480500caa5289f985f7068}\label{a06186_a7c0267304e480500caa5289f985f7068}} 
\index{A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}!triangle\+Intersection@{triangle\+Intersection}}
\index{triangle\+Intersection@{triangle\+Intersection}!A\+C\+G\+::\+Geometry@{A\+C\+G\+::\+Geometry}}
\subsubsection{\texorpdfstring{triangle\+Intersection()}{triangleIntersection()}}
{\footnotesize\ttfamily template$<$typename Vec $>$ \\
bool A\+C\+G\+::\+Geometry\+::triangle\+Intersection (\begin{DoxyParamCaption}\item[{const Vec \&}]{\+\_\+o,  }\item[{const Vec \&}]{\+\_\+dir,  }\item[{const Vec \&}]{\+\_\+v0,  }\item[{const Vec \&}]{\+\_\+v1,  }\item[{const Vec \&}]{\+\_\+v2,  }\item[{typename Vec\+::value\+\_\+type \&}]{\+\_\+t,  }\item[{typename Vec\+::value\+\_\+type \&}]{\+\_\+u,  }\item[{typename Vec\+::value\+\_\+type \&}]{\+\_\+v }\end{DoxyParamCaption})}



Intersect a ray and a triangle. 

Computes the intersection point between a ray and a triangle. The orientation of the triangle does not matter. The distance returned in t will be negative if the triangle is not in the direction given but in the opposite direction.


\begin{DoxyParams}{Parameters}
{\em \+\_\+o} & origin of the ray \\
\hline
{\em \+\_\+dir} & direction vector of the ray \\
\hline
{\em \+\_\+v0} & first point of the triangle \\
\hline
{\em \+\_\+v1} & second point of the triangle \\
\hline
{\em \+\_\+v2} & third point of the triangle \\
\hline
{\em \+\_\+t} & returned distance from the origin to the intersection, in units of \+\_\+dir ( negative if before origin!) \\
\hline
{\em \+\_\+u} & returned first barycentric coordinate of the intersection point in the triangle \\
\hline
{\em \+\_\+v} & returned second barycentric coordinate of the intersection point in the triangle \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if an intersection was found 
\end{DoxyReturn}


Definition at line 1307 of file Algorithms.\+cc.

