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


{\ttfamily \#include $<$Open\+Flipper/libs\+\_\+required/\+A\+C\+G/\+Math/\+Quaternion\+T.\+hh$>$}

Inheritance diagram for A\+CG\+:\+:QuaternionT$<$ Scalar $>$\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{a07620}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a07620_a795b639021ec8a98b067ec611c6ec474}\label{a07620_a795b639021ec8a98b067ec611c6ec474}} 
typedef \hyperlink{a08448}{VectorT}$<$ Scalar, 4 $>$ {\bfseries Base}
\item 
\mbox{\Hypertarget{a07620_af4ecf28af0a66e95a11b21a281b1db48}\label{a07620_af4ecf28af0a66e95a11b21a281b1db48}} 
typedef \hyperlink{a07620}{QuaternionT}$<$ Scalar $>$ {\bfseries Quaternion}
\item 
\mbox{\Hypertarget{a07620_a5fbdb36fac070ea6bfb96f018b5d3e65}\label{a07620_a5fbdb36fac070ea6bfb96f018b5d3e65}} 
typedef \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ {\bfseries Vec3}
\item 
\mbox{\Hypertarget{a07620_af7eeff5888d77bf535f989f8b76a063b}\label{a07620_af7eeff5888d77bf535f989f8b76a063b}} 
typedef \hyperlink{a08448}{VectorT}$<$ Scalar, 4 $>$ {\bfseries Vec4}
\item 
\mbox{\Hypertarget{a07620_a06a59a6bfc1547274872d371493ca7c0}\label{a07620_a06a59a6bfc1547274872d371493ca7c0}} 
typedef \hyperlink{a07616}{Matrix4x4T}$<$ Scalar $>$ {\bfseries Matrix}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a07620_ac486fa9841074f0503fa9d20e7451078}\label{a07620_ac486fa9841074f0503fa9d20e7451078}} 
\hyperlink{a07620_ac486fa9841074f0503fa9d20e7451078}{QuaternionT} (Scalar \+\_\+w=1.\+0, Scalar \+\_\+x=0.\+0, Scalar \+\_\+y=0.\+0, Scalar \+\_\+z=0.\+0)
\begin{DoxyCompactList}\small\item\em construct from 4 Scalars (default) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07620_aa4d2a729ccb755e6245531921b1a1690}\label{a07620_aa4d2a729ccb755e6245531921b1a1690}} 
\hyperlink{a07620_aa4d2a729ccb755e6245531921b1a1690}{QuaternionT} (const \hyperlink{a08448}{Vec3} \&\+\_\+p)
\begin{DoxyCompactList}\small\item\em construct from 3D point (pure imaginary quaternion) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07620_a6722e4d996647141140f49fcc3b680ef}\label{a07620_a6722e4d996647141140f49fcc3b680ef}} 
\hyperlink{a07620_a6722e4d996647141140f49fcc3b680ef}{QuaternionT} (const \hyperlink{a08448}{Vec4} \&\+\_\+p)
\begin{DoxyCompactList}\small\item\em construct from 4D vector \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07620_a7c8ae93b63d147a440eb5701201c336b}\label{a07620_a7c8ae93b63d147a440eb5701201c336b}} 
\hyperlink{a07620_a7c8ae93b63d147a440eb5701201c336b}{QuaternionT} (\hyperlink{a08448}{Vec3} \+\_\+axis, Scalar \+\_\+angle)
\begin{DoxyCompactList}\small\item\em construct from rotation axis and angle (in radians) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07620_a6d0d2243f9691090db18a1582c0353af}\label{a07620_a6d0d2243f9691090db18a1582c0353af}} 
{\footnotesize template$<$class MatrixT $>$ }\\\hyperlink{a07620_a6d0d2243f9691090db18a1582c0353af}{QuaternionT} (const MatrixT \&\+\_\+rot)
\begin{DoxyCompactList}\small\item\em construct from rotation matrix (only valid for rotation matrices!) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07620_ab78df14d5a693d532679c1434dd8978a}\label{a07620_ab78df14d5a693d532679c1434dd8978a}} 
void \hyperlink{a07620_ab78df14d5a693d532679c1434dd8978a}{identity} ()
\begin{DoxyCompactList}\small\item\em identity rotation \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07620_a8850915273b279b195894d0396d38fb6}\label{a07620_a8850915273b279b195894d0396d38fb6}} 
\hyperlink{a07620}{Quaternion} \hyperlink{a07620_a8850915273b279b195894d0396d38fb6}{conjugate} () const
\begin{DoxyCompactList}\small\item\em conjugate quaternion \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07620_aa7c33e8e91d3234db099665c764a3786}\label{a07620_aa7c33e8e91d3234db099665c764a3786}} 
\hyperlink{a07620}{Quaternion} \hyperlink{a07620_aa7c33e8e91d3234db099665c764a3786}{invert} () const
\begin{DoxyCompactList}\small\item\em invert quaternion \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07620_a0df941b78d998883fddce35731fb5ab7}\label{a07620_a0df941b78d998883fddce35731fb5ab7}} 
\hyperlink{a07620}{Quaternion} \hyperlink{a07620_a0df941b78d998883fddce35731fb5ab7}{operator$\ast$} (const \hyperlink{a07620}{Quaternion} \&\+\_\+q) const
\begin{DoxyCompactList}\small\item\em quaternion $\ast$ quaternion \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07620_afb421d9404f77332fba406aa2aa8e81e}\label{a07620_afb421d9404f77332fba406aa2aa8e81e}} 
\hyperlink{a07620}{Quaternion} \& \hyperlink{a07620_afb421d9404f77332fba406aa2aa8e81e}{operator$\ast$=} (const \hyperlink{a07620}{Quaternion} \&\+\_\+q)
\begin{DoxyCompactList}\small\item\em quaternion $\ast$= quaternion \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07620_a60a8bdcbf11925a8b59127878c33519e}\label{a07620_a60a8bdcbf11925a8b59127878c33519e}} 
{\footnotesize template$<$class Vec3T $>$ }\\Vec3T \hyperlink{a07620_a60a8bdcbf11925a8b59127878c33519e}{rotate} (const Vec3T \&\+\_\+v) const
\begin{DoxyCompactList}\small\item\em rotate vector \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07620_a53e46f71b0dc89fe928b10ad93f32417}\label{a07620_a53e46f71b0dc89fe928b10ad93f32417}} 
void \hyperlink{a07620_a53e46f71b0dc89fe928b10ad93f32417}{axis\+\_\+angle} (\hyperlink{a08448}{Vec3} \&\+\_\+axis, Scalar \&\+\_\+angle) const
\begin{DoxyCompactList}\small\item\em get rotation axis and angle (only valid for unit quaternions!) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07620_ae20916b79f259f90c2284884555dfad2}\label{a07620_ae20916b79f259f90c2284884555dfad2}} 
\hyperlink{a07616}{Matrix} \hyperlink{a07620_ae20916b79f259f90c2284884555dfad2}{rotation\+\_\+matrix} () const
\begin{DoxyCompactList}\small\item\em cast to rotation matrix \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07620_a2371df20d71edfdf44684659967bafde}\label{a07620_a2371df20d71edfdf44684659967bafde}} 
\hyperlink{a07616}{Matrix} \hyperlink{a07620_a2371df20d71edfdf44684659967bafde}{right\+\_\+mult\+\_\+matrix} () const
\begin{DoxyCompactList}\small\item\em get matrix for mult from right (p$\ast$q = Qp) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07620_af29773fb720f90ecf25ecdaeb6b23cbd}\label{a07620_af29773fb720f90ecf25ecdaeb6b23cbd}} 
\hyperlink{a07616}{Matrix} \hyperlink{a07620_af29773fb720f90ecf25ecdaeb6b23cbd}{left\+\_\+mult\+\_\+matrix} () const
\begin{DoxyCompactList}\small\item\em get matrix for mult from left (q$\ast$p = Qp) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07620_a112081e9314eece859fc0289d1f31ed7}\label{a07620_a112081e9314eece859fc0289d1f31ed7}} 
{\footnotesize template$<$class MatrixT $>$ }\\void \hyperlink{a07620_a112081e9314eece859fc0289d1f31ed7}{init\+\_\+from\+\_\+matrix} (const MatrixT \&\+\_\+rot)
\begin{DoxyCompactList}\small\item\em get quaternion from rotation matrix \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07620_adb511d2c0dee65eb3f6e5d3f9255143e}\label{a07620_adb511d2c0dee65eb3f6e5d3f9255143e}} 
\hyperlink{a07620}{Quaternion} \hyperlink{a07620_adb511d2c0dee65eb3f6e5d3f9255143e}{exponential} () const
\begin{DoxyCompactList}\small\item\em quaternion exponential (for unit quaternions) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07620_a86e37aa2020183fea1cfd3aab35a9cd2}\label{a07620_a86e37aa2020183fea1cfd3aab35a9cd2}} 
\hyperlink{a07620}{Quaternion} \hyperlink{a07620_a86e37aa2020183fea1cfd3aab35a9cd2}{logarithm} () const
\begin{DoxyCompactList}\small\item\em quaternion logarithm (for unit quaternions) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07620_a7a4bcbf61d38326040286e28ecb2a45c}\label{a07620_a7a4bcbf61d38326040286e28ecb2a45c}} 
void {\bfseries print\+\_\+info} ()
\end{DoxyCompactItemize}
\subsection*{Additional Inherited Members}


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

Quaternion class for representing rotations. 

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



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