\hypertarget{a01092}{\section{A\+C\+G\+:\+:Quaternion\+T$<$ Scalar $>$ Class Template Reference}
\label{a01092}\index{A\+C\+G\+::\+Quaternion\+T$<$ Scalar $>$@{A\+C\+G\+::\+Quaternion\+T$<$ Scalar $>$}}
}


{\ttfamily \#include $<$A\+C\+G/\+Math/\+Quaternion\+T.\+hh$>$}

Inheritance diagram for A\+C\+G\+:\+:Quaternion\+T$<$ Scalar $>$\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{a01092}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a01092_a795b639021ec8a98b067ec611c6ec474}{typedef \hyperlink{a01409}{Vector\+T}$<$ Scalar, 4 $>$ {\bfseries Base}}\label{a01092_a795b639021ec8a98b067ec611c6ec474}

\item 
\hypertarget{a01092_af4ecf28af0a66e95a11b21a281b1db48}{typedef \hyperlink{a01092}{Quaternion\+T}$<$ Scalar $>$ {\bfseries Quaternion}}\label{a01092_af4ecf28af0a66e95a11b21a281b1db48}

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

\item 
\hypertarget{a01092_af7eeff5888d77bf535f989f8b76a063b}{typedef \hyperlink{a01409}{Vector\+T}$<$ Scalar, 4 $>$ {\bfseries Vec4}}\label{a01092_af7eeff5888d77bf535f989f8b76a063b}

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

\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a01092_ac486fa9841074f0503fa9d20e7451078}{\hyperlink{a01092_ac486fa9841074f0503fa9d20e7451078}{Quaternion\+T} (Scalar \+\_\+w=1.\+0, Scalar \+\_\+x=0.\+0, Scalar \+\_\+y=0.\+0, Scalar \+\_\+z=0.\+0)}\label{a01092_ac486fa9841074f0503fa9d20e7451078}

\begin{DoxyCompactList}\small\item\em construct from 4 Scalars (default) \end{DoxyCompactList}\item 
\hypertarget{a01092_aa4d2a729ccb755e6245531921b1a1690}{\hyperlink{a01092_aa4d2a729ccb755e6245531921b1a1690}{Quaternion\+T} (const \hyperlink{a01409}{Vec3} \&\+\_\+p)}\label{a01092_aa4d2a729ccb755e6245531921b1a1690}

\begin{DoxyCompactList}\small\item\em construct from 3\+D point (pure imaginary quaternion) \end{DoxyCompactList}\item 
\hypertarget{a01092_a6722e4d996647141140f49fcc3b680ef}{\hyperlink{a01092_a6722e4d996647141140f49fcc3b680ef}{Quaternion\+T} (const \hyperlink{a01409}{Vec4} \&\+\_\+p)}\label{a01092_a6722e4d996647141140f49fcc3b680ef}

\begin{DoxyCompactList}\small\item\em construct from 4\+D vector \end{DoxyCompactList}\item 
\hypertarget{a01092_a7c8ae93b63d147a440eb5701201c336b}{\hyperlink{a01092_a7c8ae93b63d147a440eb5701201c336b}{Quaternion\+T} (\hyperlink{a01409}{Vec3} \+\_\+axis, Scalar \+\_\+angle)}\label{a01092_a7c8ae93b63d147a440eb5701201c336b}

\begin{DoxyCompactList}\small\item\em construct from rotation axis and angle (in radians) \end{DoxyCompactList}\item 
\hypertarget{a01092_a6d0d2243f9691090db18a1582c0353af}{{\footnotesize template$<$class Matrix\+T $>$ }\\\hyperlink{a01092_a6d0d2243f9691090db18a1582c0353af}{Quaternion\+T} (const Matrix\+T \&\+\_\+rot)}\label{a01092_a6d0d2243f9691090db18a1582c0353af}

\begin{DoxyCompactList}\small\item\em construct from rotation matrix (only valid for rotation matrices!) \end{DoxyCompactList}\item 
\hypertarget{a01092_ab78df14d5a693d532679c1434dd8978a}{void \hyperlink{a01092_ab78df14d5a693d532679c1434dd8978a}{identity} ()}\label{a01092_ab78df14d5a693d532679c1434dd8978a}

\begin{DoxyCompactList}\small\item\em identity rotation \end{DoxyCompactList}\item 
\hypertarget{a01092_afe6685d6bfae875baa84891444656f70}{\hyperlink{a01092}{Quaternion} \hyperlink{a01092_afe6685d6bfae875baa84891444656f70}{conjugate} () const }\label{a01092_afe6685d6bfae875baa84891444656f70}

\begin{DoxyCompactList}\small\item\em conjugate quaternion \end{DoxyCompactList}\item 
\hypertarget{a01092_a51a7e3c9f1504448f5a726119c6311f7}{\hyperlink{a01092}{Quaternion} \hyperlink{a01092_a51a7e3c9f1504448f5a726119c6311f7}{invert} () const }\label{a01092_a51a7e3c9f1504448f5a726119c6311f7}

\begin{DoxyCompactList}\small\item\em invert quaternion \end{DoxyCompactList}\item 
\hypertarget{a01092_a8754a047cdced3c8b5b338b1d7d1974c}{\hyperlink{a01092}{Quaternion} \hyperlink{a01092_a8754a047cdced3c8b5b338b1d7d1974c}{operator$\ast$} (const \hyperlink{a01092}{Quaternion} \&\+\_\+q) const }\label{a01092_a8754a047cdced3c8b5b338b1d7d1974c}

\begin{DoxyCompactList}\small\item\em quaternion $\ast$ quaternion \end{DoxyCompactList}\item 
\hypertarget{a01092_afb421d9404f77332fba406aa2aa8e81e}{\hyperlink{a01092}{Quaternion} \& \hyperlink{a01092_afb421d9404f77332fba406aa2aa8e81e}{operator$\ast$=} (const \hyperlink{a01092}{Quaternion} \&\+\_\+q)}\label{a01092_afb421d9404f77332fba406aa2aa8e81e}

\begin{DoxyCompactList}\small\item\em quaternion $\ast$= quaternion \end{DoxyCompactList}\item 
\hypertarget{a01092_a582d9bd5278c72da89ec20daeedaaa83}{{\footnotesize template$<$class Vec3\+T $>$ }\\Vec3\+T \hyperlink{a01092_a582d9bd5278c72da89ec20daeedaaa83}{rotate} (const Vec3\+T \&\+\_\+v) const }\label{a01092_a582d9bd5278c72da89ec20daeedaaa83}

\begin{DoxyCompactList}\small\item\em rotate vector \end{DoxyCompactList}\item 
\hypertarget{a01092_af60009f6b4efdb4ce8efa5de7d1127f1}{void \hyperlink{a01092_af60009f6b4efdb4ce8efa5de7d1127f1}{axis\+\_\+angle} (\hyperlink{a01409}{Vec3} \&\+\_\+axis, Scalar \&\+\_\+angle) const }\label{a01092_af60009f6b4efdb4ce8efa5de7d1127f1}

\begin{DoxyCompactList}\small\item\em get rotation axis and angle (only valid for unit quaternions!) \end{DoxyCompactList}\item 
\hypertarget{a01092_a62c92fd0fbbd0bbcc38fae80a8bb0f25}{\hyperlink{a00797}{Matrix} \hyperlink{a01092_a62c92fd0fbbd0bbcc38fae80a8bb0f25}{rotation\+\_\+matrix} () const }\label{a01092_a62c92fd0fbbd0bbcc38fae80a8bb0f25}

\begin{DoxyCompactList}\small\item\em cast to rotation matrix \end{DoxyCompactList}\item 
\hypertarget{a01092_a7c811b177f12d78dbc7edd67f96dcc0f}{\hyperlink{a00797}{Matrix} \hyperlink{a01092_a7c811b177f12d78dbc7edd67f96dcc0f}{right\+\_\+mult\+\_\+matrix} () const }\label{a01092_a7c811b177f12d78dbc7edd67f96dcc0f}

\begin{DoxyCompactList}\small\item\em get matrix for mult from right (p$\ast$q = Qp) \end{DoxyCompactList}\item 
\hypertarget{a01092_a3c3042f188fe379e87d00d2d4fd75421}{\hyperlink{a00797}{Matrix} \hyperlink{a01092_a3c3042f188fe379e87d00d2d4fd75421}{left\+\_\+mult\+\_\+matrix} () const }\label{a01092_a3c3042f188fe379e87d00d2d4fd75421}

\begin{DoxyCompactList}\small\item\em get matrix for mult from left (q$\ast$p = Qp) \end{DoxyCompactList}\item 
\hypertarget{a01092_a112081e9314eece859fc0289d1f31ed7}{{\footnotesize template$<$class Matrix\+T $>$ }\\void \hyperlink{a01092_a112081e9314eece859fc0289d1f31ed7}{init\+\_\+from\+\_\+matrix} (const Matrix\+T \&\+\_\+rot)}\label{a01092_a112081e9314eece859fc0289d1f31ed7}

\begin{DoxyCompactList}\small\item\em get quaternion from rotation matrix \end{DoxyCompactList}\item 
\hypertarget{a01092_a06fd6761c4198ec233468fe3db9d7ebb}{\hyperlink{a01092}{Quaternion} \hyperlink{a01092_a06fd6761c4198ec233468fe3db9d7ebb}{exponential} () const }\label{a01092_a06fd6761c4198ec233468fe3db9d7ebb}

\begin{DoxyCompactList}\small\item\em quaternion exponential (for unit quaternions) \end{DoxyCompactList}\item 
\hypertarget{a01092_a1891006194a8d144531e664d57072054}{\hyperlink{a01092}{Quaternion} \hyperlink{a01092_a1891006194a8d144531e664d57072054}{logarithm} () const }\label{a01092_a1891006194a8d144531e664d57072054}

\begin{DoxyCompactList}\small\item\em quaternion logarithm (for unit quaternions) \end{DoxyCompactList}\item 
\hypertarget{a01092_a7a4bcbf61d38326040286e28ecb2a45c}{void {\bfseries print\+\_\+info} ()}\label{a01092_a7a4bcbf61d38326040286e28ecb2a45c}

\end{DoxyCompactItemize}
\subsection*{Additional Inherited Members}


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

Quaternion class for representing rotations. 

Definition at line 81 of file Quaternion\+T.\+hh.



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