\section{gear\-:\-:Vector3\-D Class Reference}
\label{classgear_1_1Vector3D}\index{gear\-::\-Vector3\-D@{gear\-::\-Vector3\-D}}


Simple three dimensional vector providing the components for cartesian, cylindrical and spherical coordinate systems -\/ internal reperesentation is cartesian.  




{\ttfamily \#include $<$Vector3\-D.\-h$>$}

\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct {\bf Cartesian}
\item 
struct {\bf Cylindrical}
\item 
struct {\bf Spherical}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
{\bf Vector3\-D} ()\label{classgear_1_1Vector3D_a879fd688ef0415800606daa602442519}

\begin{DoxyCompactList}\small\item\em Default c'tor -\/ zero vector. \end{DoxyCompactList}\item 
{\bf Vector3\-D} (const float $\ast$v)
\begin{DoxyCompactList}\small\item\em Constructor for float array. \end{DoxyCompactList}\item 
{\bf Vector3\-D} (const double $\ast$v)
\begin{DoxyCompactList}\small\item\em Constructor for double array. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\{\bf Vector3\-D} (double {\bf x}, double {\bf y}, double {\bf z}, T(\&)())\label{classgear_1_1Vector3D_a5969adb69cdfc87397011d68c520457f}

\begin{DoxyCompactList}\small\item\em Templated c'tor -\/ allows to have overloaded c'tors for different coordinates. \end{DoxyCompactList}\item 
{\bf Vector3\-D} (double xx, double yy, double zz)\label{classgear_1_1Vector3D_a2ac798b95bb867ebf4e34b66c6a2935b}

\begin{DoxyCompactList}\small\item\em Default corrdinate system for initialization is cartesian. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\{\bf Vector3\-D} (const T \&t)\label{classgear_1_1Vector3D_ae3f70dbad04d4c3843f7fdf3b4e8173d}

\begin{DoxyCompactList}\small\item\em Copy c'tor for three vectors from other packages -\/ requires T\-::x(),T\-::y(), T\-::z(). \end{DoxyCompactList}\item 
double {\bf x} () const \label{classgear_1_1Vector3D_a5f1db394d6be405e2fd4b901162b3fe2}

\begin{DoxyCompactList}\small\item\em \doxyref{Cartesian}{p.}{structgear_1_1Vector3D_1_1Cartesian} x coordinate. \end{DoxyCompactList}\item 
double {\bf y} () const \label{classgear_1_1Vector3D_a2d02a3af763fa4a4b0408f5de5391786}

\begin{DoxyCompactList}\small\item\em \doxyref{Cartesian}{p.}{structgear_1_1Vector3D_1_1Cartesian} y coordinate. \end{DoxyCompactList}\item 
double {\bf z} ()\label{classgear_1_1Vector3D_a7d956a5f41fc90ea4c9b63dbe96b2417}

\begin{DoxyCompactList}\small\item\em \doxyref{Cartesian}{p.}{structgear_1_1Vector3D_1_1Cartesian} cartesian z coordinate. \end{DoxyCompactList}\item 
double {\bf x} ()\label{classgear_1_1Vector3D_a9823d745d597733828acf36685f7ef95}

\begin{DoxyCompactList}\small\item\em Assign to cartesian x coordinate. \end{DoxyCompactList}\item 
double {\bf y} ()\label{classgear_1_1Vector3D_ac75b0c88dc1e6c8b6ec18f6e88b6e471}

\begin{DoxyCompactList}\small\item\em Assign to cartesian y coordinate. \end{DoxyCompactList}\item 
double {\bf z} () const \label{classgear_1_1Vector3D_a291a9390f0a03519dcf07ed16f42f5d2}

\begin{DoxyCompactList}\small\item\em Assign to cartesian z coordinate. \end{DoxyCompactList}\item 
double {\bf operator[$\,$]} (int i) const \label{classgear_1_1Vector3D_abc5ae6ea6b09717d02775b1b8f201022}

\begin{DoxyCompactList}\small\item\em Accessing x,y,z with bracket operator. \end{DoxyCompactList}\item 
double \& {\bf operator[$\,$]} (int i)\label{classgear_1_1Vector3D_aa3067206229fe10309fe799175640007}

\begin{DoxyCompactList}\small\item\em Accessing x,y,z with bracket operator for assignment. \end{DoxyCompactList}\item 
double {\bf phi} () const \label{classgear_1_1Vector3D_a1cc648b1c00e8a2abbfcf3e9477e98d3}

\begin{DoxyCompactList}\small\item\em Azimuthal angle -\/ cylindrical and spherical. \end{DoxyCompactList}\item 
double {\bf rho} () const \label{classgear_1_1Vector3D_aa2f7c5527412aef43e351bef1fe9ef24}

\begin{DoxyCompactList}\small\item\em Transversal component -\/ cylindrical 'r'. \end{DoxyCompactList}\item 
double {\bf trans} () const \label{classgear_1_1Vector3D_ac3c6309e4331a9a78256d6c49d663f2c}

\begin{DoxyCompactList}\small\item\em Transversal component. \end{DoxyCompactList}\item 
double {\bf trans2} () const \label{classgear_1_1Vector3D_ab30368ff278ef01904b7874aeaa66727}

\begin{DoxyCompactList}\small\item\em Transversal component squared. \end{DoxyCompactList}\item 
double {\bf r} () const \label{classgear_1_1Vector3D_a9d6859f0a1367a065b87b3ee16b89328}

\begin{DoxyCompactList}\small\item\em \doxyref{Spherical}{p.}{structgear_1_1Vector3D_1_1Spherical} r/magnitude. \end{DoxyCompactList}\item 
double {\bf r2} () const \label{classgear_1_1Vector3D_a90690e75ca8aa80a5e247f57729cd62b}

\begin{DoxyCompactList}\small\item\em \doxyref{Spherical}{p.}{structgear_1_1Vector3D_1_1Spherical} r/magnitude, squared. \end{DoxyCompactList}\item 
double {\bf theta} () const \label{classgear_1_1Vector3D_adeb83cb724aa18e2147106d9bf24c848}

\begin{DoxyCompactList}\small\item\em Polar angle -\/ spherical. \end{DoxyCompactList}\item 
double {\bf dot} (const {\bf Vector3\-D} \&v)\label{classgear_1_1Vector3D_a71fac7dd3b08197abab36292e9f8f5ac}

\begin{DoxyCompactList}\small\item\em Scalar product. \end{DoxyCompactList}\item 
{\bf Vector3\-D} {\bf cross} (const {\bf Vector3\-D} \&v)\label{classgear_1_1Vector3D_a98bc09a006ef8814ad466c95e19f5899}

\begin{DoxyCompactList}\small\item\em Vector product. \end{DoxyCompactList}\item 
{\bf Vector3\-D} {\bf unit} ()\label{classgear_1_1Vector3D_acdd200dc790c96feb8a185e42796cbef}

\begin{DoxyCompactList}\small\item\em Parallel unit vector. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\{\bf operator T} ()
\begin{DoxyCompactList}\small\item\em Implicit templated conversion to anything that has a c'tor T(x,y,z) and accessor functions \doxyref{x()}{p.}{classgear_1_1Vector3D_a9823d745d597733828acf36685f7ef95},\doxyref{y()}{p.}{classgear_1_1Vector3D_ac75b0c88dc1e6c8b6ec18f6e88b6e471},\doxyref{z()}{p.}{classgear_1_1Vector3D_a7d956a5f41fc90ea4c9b63dbe96b2417}. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\T {\bf to} ()
\begin{DoxyCompactList}\small\item\em Explicit, unchecked conversion to anything that has a c'tor T(x,y,z). \end{DoxyCompactList}\item 
{\footnotesize template$<$$>$ }\\{\bf Vector3\-D} (double xx, double yy, double zz, {\bf Vector3\-D\-::\-Cartesian}(\&)())
\begin{DoxyCompactList}\small\item\em \doxyref{Cartesian}{p.}{structgear_1_1Vector3D_1_1Cartesian} c'tor -\/ example\-: \par
 \doxyref{Vector3\-D}{p.}{classgear_1_1Vector3D} v( x, y, c , Vector3\-D\-::cartesian ) ;. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static {\bf Cartesian} {\bfseries cartesian} ()\label{classgear_1_1Vector3D_af53d199eedb8a9f7f6bfd962016355e4}

\item 
static {\bf Cylindrical} {\bfseries cylindrical} ()\label{classgear_1_1Vector3D_a0687c48644bba3790361b38b1d2e1ec5}

\item 
static {\bf Spherical} {\bfseries spherical} ()\label{classgear_1_1Vector3D_a2dc688cb1cf5e910f778af75a0441670}

\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
double {\bfseries \-\_\-x}\label{classgear_1_1Vector3D_a4aae7bf5e0d9c92c486b2f813b5a4b5c}

\item 
double {\bfseries \-\_\-y}\label{classgear_1_1Vector3D_a06d530aaa5e4cee5cbdec3226ba75837}

\item 
double {\bfseries \-\_\-z}\label{classgear_1_1Vector3D_a103df9ef6e145a631c0751902741b4d6}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
Simple three dimensional vector providing the components for cartesian, cylindrical and spherical coordinate systems -\/ internal reperesentation is cartesian. 

\begin{DoxyAuthor}{Author}
F. Gaede, D\-E\-S\-Y 
\end{DoxyAuthor}
\begin{DoxyVersion}{Version}

\end{DoxyVersion}
\begin{DoxyParagraph}{Id\-:}
\doxyref{Vector3\-D.\-h}{p.}{Vector3D_8h_source} 536 2015-\/11-\/27 11\-:00\-:27\-Z gaede 
\end{DoxyParagraph}


Definition at line 18 of file Vector3\-D.\-h.



\subsection{Constructor \& Destructor Documentation}
\index{gear\-::\-Vector3\-D@{gear\-::\-Vector3\-D}!Vector3\-D@{Vector3\-D}}
\index{Vector3\-D@{Vector3\-D}!gear::Vector3D@{gear\-::\-Vector3\-D}}
\subsubsection[{Vector3\-D}]{\setlength{\rightskip}{0pt plus 5cm}gear\-::\-Vector3\-D\-::\-Vector3\-D (
\begin{DoxyParamCaption}
\item[{const float $\ast$}]{v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\label{classgear_1_1Vector3D_a274d6f2d5a056920a72f7b0d3450efc0}


Constructor for float array. 



Definition at line 27 of file Vector3\-D.\-h.

\index{gear\-::\-Vector3\-D@{gear\-::\-Vector3\-D}!Vector3\-D@{Vector3\-D}}
\index{Vector3\-D@{Vector3\-D}!gear::Vector3D@{gear\-::\-Vector3\-D}}
\subsubsection[{Vector3\-D}]{\setlength{\rightskip}{0pt plus 5cm}gear\-::\-Vector3\-D\-::\-Vector3\-D (
\begin{DoxyParamCaption}
\item[{const double $\ast$}]{v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\label{classgear_1_1Vector3D_a979741ac42993bd41db2ec0d3332e4bd}


Constructor for double array. 



Definition at line 30 of file Vector3\-D.\-h.

\index{gear\-::\-Vector3\-D@{gear\-::\-Vector3\-D}!Vector3\-D@{Vector3\-D}}
\index{Vector3\-D@{Vector3\-D}!gear::Vector3D@{gear\-::\-Vector3\-D}}
\subsubsection[{Vector3\-D}]{\setlength{\rightskip}{0pt plus 5cm}gear\-::\-Vector3\-D\-::\-Vector3\-D (
\begin{DoxyParamCaption}
\item[{double}]{xx, }
\item[{double}]{yy, }
\item[{double}]{zz, }
\item[{Vector3\-D\-::}]{Cartesian\&)(}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\label{classgear_1_1Vector3D_a74291f4f4bc842eeadf004350af307ab}


\doxyref{Cartesian}{p.}{structgear_1_1Vector3D_1_1Cartesian} c'tor -\/ example\-: \par
 \doxyref{Vector3\-D}{p.}{classgear_1_1Vector3D} v( x, y, c , Vector3\-D\-::cartesian ) ;. 

\doxyref{Spherical}{p.}{structgear_1_1Vector3D_1_1Spherical} c'tor -\/ example\-: \par
 \doxyref{Vector3\-D}{p.}{classgear_1_1Vector3D} v( r, phi, theta , Vector3\-D\-::spherical ) ;.

\doxyref{Cylindrical}{p.}{structgear_1_1Vector3D_1_1Cylindrical} c'tor -\/ example\-: \par
 \doxyref{Vector3\-D}{p.}{classgear_1_1Vector3D} v( rho, phi, z , Vector3\-D\-::cylindrical ) ;. 

Definition at line 237 of file Vector3\-D.\-h.



\subsection{Member Function Documentation}
\index{gear\-::\-Vector3\-D@{gear\-::\-Vector3\-D}!operator T@{operator T}}
\index{operator T@{operator T}!gear::Vector3D@{gear\-::\-Vector3\-D}}
\subsubsection[{operator T}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class T $>$ gear\-::\-Vector3\-D\-::operator T (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\label{classgear_1_1Vector3D_a023187e09b91ac59a5d1be3b07965fdc}


Implicit templated conversion to anything that has a c'tor T(x,y,z) and accessor functions \doxyref{x()}{p.}{classgear_1_1Vector3D_a9823d745d597733828acf36685f7ef95},\doxyref{y()}{p.}{classgear_1_1Vector3D_ac75b0c88dc1e6c8b6ec18f6e88b6e471},\doxyref{z()}{p.}{classgear_1_1Vector3D_a7d956a5f41fc90ea4c9b63dbe96b2417}. 

For safety the result is checked which causes a small performance penalty. \begin{DoxySeeAlso}{See Also}
\doxyref{to()}{p.}{classgear_1_1Vector3D_ad3eef170f119a00b203e98bf76fc3280} 
\end{DoxySeeAlso}


Definition at line 165 of file Vector3\-D.\-h.

\index{gear\-::\-Vector3\-D@{gear\-::\-Vector3\-D}!to@{to}}
\index{to@{to}!gear::Vector3D@{gear\-::\-Vector3\-D}}
\subsubsection[{to}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class T $>$ T gear\-::\-Vector3\-D\-::to (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\label{classgear_1_1Vector3D_ad3eef170f119a00b203e98bf76fc3280}


Explicit, unchecked conversion to anything that has a c'tor T(x,y,z). 

Example\-: C\-L\-H\-E\-P\-::\-Vector3\-D clhv = v.\-to$<$ C\-L\-H\-E\-P\-::\-Vector3\-D$>$() ; \begin{DoxySeeAlso}{See Also}
operator T() 
\end{DoxySeeAlso}


Definition at line 183 of file Vector3\-D.\-h.



The documentation for this class was generated from the following file\-:\begin{DoxyCompactItemize}
\item 
Vector3\-D.\-h\end{DoxyCompactItemize}
