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


Dual\+Quaternion class for representing rigid motions in 3d.  




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

\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a07604_ad0db328b33fa13bc5263c4d72c784df1}\label{a07604_ad0db328b33fa13bc5263c4d72c784df1}} 
typedef \hyperlink{a07620}{QuaternionT}$<$ Scalar $>$ {\bfseries Quaternion}
\item 
\mbox{\Hypertarget{a07604_a316ecfc985aef0f40c774a7862698b3c}\label{a07604_a316ecfc985aef0f40c774a7862698b3c}} 
typedef \hyperlink{a07604}{Dual\+QuaternionT}$<$ Scalar $>$ {\bfseries Dual\+Quaternion}
\item 
\mbox{\Hypertarget{a07604_aabd978e0bdd05dfd8b2bf15fbe670bd0}\label{a07604_aabd978e0bdd05dfd8b2bf15fbe670bd0}} 
typedef \hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ {\bfseries Vec3}
\item 
\mbox{\Hypertarget{a07604_a961cef033a7475ececac785541aa95d6}\label{a07604_a961cef033a7475ececac785541aa95d6}} 
typedef \hyperlink{a08448}{VectorT}$<$ Scalar, 4 $>$ {\bfseries Vec4}
\item 
\mbox{\Hypertarget{a07604_afb3a6ceef6a97b92aeb7d37b702b2172}\label{a07604_afb3a6ceef6a97b92aeb7d37b702b2172}} 
typedef \hyperlink{a07616}{Matrix4x4T}$<$ Scalar $>$ {\bfseries Matrix}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a07604_af8267145deec4291d418740760da882f}\label{a07604_af8267145deec4291d418740760da882f}} 
\hyperlink{a07604_af8267145deec4291d418740760da882f}{Dual\+QuaternionT} ()
\begin{DoxyCompactList}\small\item\em Default constructor ( constructs an identity dual quaternion ) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07604_a564925c67820de78487aeb14dfc842b7}\label{a07604_a564925c67820de78487aeb14dfc842b7}} 
\hyperlink{a07604_a564925c67820de78487aeb14dfc842b7}{Dual\+QuaternionT} (const \hyperlink{a07604}{Dual\+Quaternion} \&\+\_\+other)
\begin{DoxyCompactList}\small\item\em Copy constructor. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07604_ab797ac34094c770c414b4194a26b1668}\label{a07604_ab797ac34094c770c414b4194a26b1668}} 
\hyperlink{a07604_ab797ac34094c770c414b4194a26b1668}{Dual\+QuaternionT} (const \hyperlink{a07620}{Quaternion} \&\+\_\+real, const \hyperlink{a07620}{Quaternion} \&\+\_\+dual)
\begin{DoxyCompactList}\small\item\em Construct from given real,dual parts. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07604_aa2bd54bae9d4d0c98be4e7c7f1f940fa}\label{a07604_aa2bd54bae9d4d0c98be4e7c7f1f940fa}} 
\hyperlink{a07604_aa2bd54bae9d4d0c98be4e7c7f1f940fa}{Dual\+QuaternionT} (Scalar \+\_\+\+Rw, Scalar \+\_\+\+Rx, Scalar \+\_\+\+Ry, Scalar \+\_\+\+Rz, Scalar \+\_\+\+Dw, Scalar \+\_\+\+Dx, Scalar \+\_\+\+Dy, Scalar \+\_\+\+Dz)
\begin{DoxyCompactList}\small\item\em Construct from 8 scalars. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07604_a85ece38ff0d5244ee4538d2ab2f9d5d8}\label{a07604_a85ece38ff0d5244ee4538d2ab2f9d5d8}} 
\hyperlink{a07604_a85ece38ff0d5244ee4538d2ab2f9d5d8}{Dual\+QuaternionT} (\hyperlink{a07620}{Quaternion} \+\_\+rotation)
\begin{DoxyCompactList}\small\item\em Construct from a rotation given as quaternion. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07604_a828cede9a0b659dcfb28f8ff56f54c76}\label{a07604_a828cede9a0b659dcfb28f8ff56f54c76}} 
\hyperlink{a07604_a828cede9a0b659dcfb28f8ff56f54c76}{Dual\+QuaternionT} (const \hyperlink{a08448}{Vec3} \&\+\_\+translation)
\begin{DoxyCompactList}\small\item\em Construct from a translatation given as a vector. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07604_aa9421c6f9bfd9b0eeaac6e4cdd784534}\label{a07604_aa9421c6f9bfd9b0eeaac6e4cdd784534}} 
\hyperlink{a07604_aa9421c6f9bfd9b0eeaac6e4cdd784534}{Dual\+QuaternionT} (const \hyperlink{a08448}{Vec3} \&\+\_\+translation, const \hyperlink{a07620}{Quaternion} \&\+\_\+rotation)
\begin{DoxyCompactList}\small\item\em Construct from a translation+rotation. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07604_aeb24ab21217fbeacf3a1253f298788b6}\label{a07604_aeb24ab21217fbeacf3a1253f298788b6}} 
\hyperlink{a07604_aeb24ab21217fbeacf3a1253f298788b6}{Dual\+QuaternionT} (const \hyperlink{a07616}{Matrix} \&\+\_\+transformation)
\begin{DoxyCompactList}\small\item\em Construct from a rigid transformation given as matrix. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07604_a4c58285a51e3226da00750c6b67e617b}\label{a07604_a4c58285a51e3226da00750c6b67e617b}} 
\hyperlink{a07604}{Dual\+Quaternion} \hyperlink{a07604_a4c58285a51e3226da00750c6b67e617b}{conjugate} () const
\begin{DoxyCompactList}\small\item\em conjugate dual quaternion \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07604_a3288e80dfeefe8bf3f54cd6c384fabb7}\label{a07604_a3288e80dfeefe8bf3f54cd6c384fabb7}} 
\hyperlink{a07604}{Dual\+Quaternion} \hyperlink{a07604_a3288e80dfeefe8bf3f54cd6c384fabb7}{invert} () const
\begin{DoxyCompactList}\small\item\em invert dual quaternion \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07604_a82d5783542883eb7e9dcbea66d3fb8bf}\label{a07604_a82d5783542883eb7e9dcbea66d3fb8bf}} 
void \hyperlink{a07604_a82d5783542883eb7e9dcbea66d3fb8bf}{normalize} ()
\begin{DoxyCompactList}\small\item\em normalize dual quaternion \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07604_abb39b0ec5f96970090b831c2ed91f1c6}\label{a07604_abb39b0ec5f96970090b831c2ed91f1c6}} 
bool \hyperlink{a07604_abb39b0ec5f96970090b831c2ed91f1c6}{operator==} (const \hyperlink{a07604}{Dual\+Quaternion} \&\+\_\+other) const
\begin{DoxyCompactList}\small\item\em dual quaternion comparison \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07604_aad2b58410534336606aeec05bf1d19a4}\label{a07604_aad2b58410534336606aeec05bf1d19a4}} 
bool \hyperlink{a07604_aad2b58410534336606aeec05bf1d19a4}{operator!=} (const \hyperlink{a07604}{Dual\+Quaternion} \&\+\_\+other) const
\begin{DoxyCompactList}\small\item\em dual quaternion comparison \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07604_aa5d15ad921614c9292d0bd3148cdd477}\label{a07604_aa5d15ad921614c9292d0bd3148cdd477}} 
\hyperlink{a07604}{Dual\+Quaternion} \hyperlink{a07604_aa5d15ad921614c9292d0bd3148cdd477}{operator+} (const \hyperlink{a07604}{Dual\+Quaternion} \&\+\_\+other) const
\begin{DoxyCompactList}\small\item\em addition \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07604_aae6481dbacf3f58032deaa7e57bb8821}\label{a07604_aae6481dbacf3f58032deaa7e57bb8821}} 
\hyperlink{a07604}{Dual\+Quaternion} \& \hyperlink{a07604_aae6481dbacf3f58032deaa7e57bb8821}{operator+=} (const \hyperlink{a07604}{Dual\+Quaternion} \&\+\_\+other)
\begin{DoxyCompactList}\small\item\em addition \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07604_a5d4b2b60b750ba0d49093892eef75c7e}\label{a07604_a5d4b2b60b750ba0d49093892eef75c7e}} 
\hyperlink{a07604}{Dual\+Quaternion} \hyperlink{a07604_a5d4b2b60b750ba0d49093892eef75c7e}{operator-\/} (const \hyperlink{a07604}{Dual\+Quaternion} \&\+\_\+other) const
\begin{DoxyCompactList}\small\item\em substraction \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07604_a2f9cb9058573ceb9a9134599ebbca33c}\label{a07604_a2f9cb9058573ceb9a9134599ebbca33c}} 
\hyperlink{a07604}{Dual\+Quaternion} \& \hyperlink{a07604_a2f9cb9058573ceb9a9134599ebbca33c}{operator-\/=} (const \hyperlink{a07604}{Dual\+Quaternion} \&\+\_\+other)
\begin{DoxyCompactList}\small\item\em substraction \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07604_a0f0ef48bd301fec638b03ffc823629cf}\label{a07604_a0f0ef48bd301fec638b03ffc823629cf}} 
\hyperlink{a07604}{Dual\+Quaternion} \hyperlink{a07604_a0f0ef48bd301fec638b03ffc823629cf}{operator$\ast$} (const \hyperlink{a07604}{Dual\+Quaternion} \&\+\_\+q) const
\begin{DoxyCompactList}\small\item\em dual\+Quaternion $\ast$ dual\+Quaternion \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07604_a08ec625693413aa45e5f576fef185515}\label{a07604_a08ec625693413aa45e5f576fef185515}} 
\hyperlink{a07604}{Dual\+Quaternion} \hyperlink{a07604_a08ec625693413aa45e5f576fef185515}{operator$\ast$} (const Scalar \&\+\_\+scalar) const
\begin{DoxyCompactList}\small\item\em dual\+Quaternion $\ast$ scalar \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07604_a7460050f48c2abbbb9faea3bcd3ba7f9}\label{a07604_a7460050f48c2abbbb9faea3bcd3ba7f9}} 
\hyperlink{a07604}{Dual\+Quaternion} \& \hyperlink{a07604_a7460050f48c2abbbb9faea3bcd3ba7f9}{operator$\ast$=} (const \hyperlink{a07604}{Dual\+Quaternion} \&\+\_\+q)
\begin{DoxyCompactList}\small\item\em dual\+Quaternion $\ast$= dual\+Quaternion \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07604_ac60c90ce0a99705d9d4467cdd1203e6b}\label{a07604_ac60c90ce0a99705d9d4467cdd1203e6b}} 
Scalar \& \hyperlink{a07604_ac60c90ce0a99705d9d4467cdd1203e6b}{operator\mbox{[}$\,$\mbox{]}} (const unsigned int \&b)
\begin{DoxyCompactList}\small\item\em Access as one big vector. \end{DoxyCompactList}\item 
\hyperlink{a08448}{Vec3} \hyperlink{a07604_a37281725e1fb57a2c3763fc27c5108f0}{transform\+\_\+point} (const \hyperlink{a08448}{Vec3} \&\+\_\+point) const
\begin{DoxyCompactList}\small\item\em Transform a point with the dual quaternion. \end{DoxyCompactList}\item 
\hyperlink{a08448}{Vec3} \hyperlink{a07604_a73ad67bee985be5ca07a79d20d3b042b}{transform\+\_\+vector} (const \hyperlink{a08448}{Vec3} \&\+\_\+point) const
\begin{DoxyCompactList}\small\item\em Transform a vector with the dual quaternion. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07604_a8e052f79c6f37d4a2ef704c27bff0fd7}\label{a07604_a8e052f79c6f37d4a2ef704c27bff0fd7}} 
void \hyperlink{a07604_a8e052f79c6f37d4a2ef704c27bff0fd7}{print\+Info} ()
\begin{DoxyCompactList}\small\item\em print some info about the DQ \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07604_a41162874f9ff08cb66ba46f117e47429}\label{a07604_a41162874f9ff08cb66ba46f117e47429}} 
{\footnotesize template$<$typename Vector\+Type $>$ }\\\hyperlink{a07604}{Dual\+QuaternionT}$<$ Scalar $>$ \hyperlink{a07604_a41162874f9ff08cb66ba46f117e47429}{interpolate} (Vector\+Type \&\+\_\+weights, const std\+::vector$<$ \hyperlink{a07604}{Dual\+Quaternion} $>$ \&\+\_\+dual\+Quaternions)
\begin{DoxyCompactList}\small\item\em linear interpolation of dual quaternions. Result is normalized afterwards. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a07604_a49b096343d08f58c30df26003913909e}\label{a07604_a49b096343d08f58c30df26003913909e}} 
static \hyperlink{a07604}{Dual\+Quaternion} \hyperlink{a07604_a49b096343d08f58c30df26003913909e}{identity} ()
\begin{DoxyCompactList}\small\item\em identity dual quaternion \mbox{[} R(1, 0, 0, 0), D(0,0,0,0) \mbox{]} \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07604_a98ef46ea90496d66ac12345f8893ffb1}\label{a07604_a98ef46ea90496d66ac12345f8893ffb1}} 
static \hyperlink{a07604}{Dual\+Quaternion} \hyperlink{a07604_a98ef46ea90496d66ac12345f8893ffb1}{zero} ()
\begin{DoxyCompactList}\small\item\em zero dual quaternion \mbox{[} R(0, 0, 0, 0), D(0,0,0,0) \mbox{]} \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07604_a11103e5a32e4e299cd7cee184cfeb429}\label{a07604_a11103e5a32e4e299cd7cee184cfeb429}} 
{\footnotesize template$<$typename Vector\+Type $>$ }\\static \hyperlink{a07604}{Dual\+Quaternion} \hyperlink{a07604_a11103e5a32e4e299cd7cee184cfeb429}{interpolate} (Vector\+Type \&\+\_\+weights, const std\+::vector$<$ \hyperlink{a07604}{Dual\+Quaternion} $>$ \&\+\_\+dual\+Quaternions)
\begin{DoxyCompactList}\small\item\em linear interpolation of dual quaternions. Result is normalized afterwards \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Attributes}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a07604_a44276f1259d94893d040d1ac852b5171}\label{a07604_a44276f1259d94893d040d1ac852b5171}} 
\hyperlink{a07620}{Quaternion} \hyperlink{a07604_a44276f1259d94893d040d1ac852b5171}{real\+\_\+}
\begin{DoxyCompactList}\small\item\em real and dual quaternion parts \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07604_a6bb317835a63cd5df89a52dd517144cc}\label{a07604_a6bb317835a63cd5df89a52dd517144cc}} 
\hyperlink{a07620}{Quaternion} {\bfseries dual\+\_\+}
\end{DoxyCompactItemize}


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

Dual\+Quaternion class for representing rigid motions in 3d. 

This is an implementation of\+:

techreport\{kavan-\/06-\/dual, author = \char`\"{}\+Ladislav Kavan and Steven Collins and Carol O\textquotesingle{}\+Sullivan and Jiri Zara\char`\"{}, series = \char`\"{}\+Technical report T\+C\+D-\/\+C\+S-\/2006-\/46, Trinity College Dublin\char`\"{}, title = \char`\"{}\{\+D\}ual \{\+Q\}uaternions for \{\+R\}igid \{\+T\}ransformation \{\+B\}lending\char`\"{}, url = \char`\"{}http\+://www.\+cgg.\+cvut.\+cz/$\sim$kavanl1/\char`\"{}, year = \char`\"{}2006\char`\"{} \} 

Definition at line 80 of file Dual\+Quaternion\+T.\+hh.



\subsection{Member Function Documentation}
\mbox{\Hypertarget{a07604_a37281725e1fb57a2c3763fc27c5108f0}\label{a07604_a37281725e1fb57a2c3763fc27c5108f0}} 
\index{A\+C\+G\+::\+Dual\+QuaternionT@{A\+C\+G\+::\+Dual\+QuaternionT}!transform\+\_\+point@{transform\+\_\+point}}
\index{transform\+\_\+point@{transform\+\_\+point}!A\+C\+G\+::\+Dual\+QuaternionT@{A\+C\+G\+::\+Dual\+QuaternionT}}
\subsubsection{\texorpdfstring{transform\+\_\+point()}{transform\_point()}}
{\footnotesize\ttfamily template$<$typename Scalar $>$ \\
\hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \hyperlink{a07604}{A\+C\+G\+::\+Dual\+QuaternionT}$<$ Scalar $>$\+::transform\+\_\+point (\begin{DoxyParamCaption}\item[{const \hyperlink{a08448}{Vec3} \&}]{\+\_\+point }\end{DoxyParamCaption}) const}



Transform a point with the dual quaternion. 

transform a given point with this dual quaternion T\+O\+DO check if this is a unit dual quaternion 

Definition at line 366 of file Dual\+Quaternion\+T\+\_\+impl.\+hh.

\mbox{\Hypertarget{a07604_a73ad67bee985be5ca07a79d20d3b042b}\label{a07604_a73ad67bee985be5ca07a79d20d3b042b}} 
\index{A\+C\+G\+::\+Dual\+QuaternionT@{A\+C\+G\+::\+Dual\+QuaternionT}!transform\+\_\+vector@{transform\+\_\+vector}}
\index{transform\+\_\+vector@{transform\+\_\+vector}!A\+C\+G\+::\+Dual\+QuaternionT@{A\+C\+G\+::\+Dual\+QuaternionT}}
\subsubsection{\texorpdfstring{transform\+\_\+vector()}{transform\_vector()}}
{\footnotesize\ttfamily template$<$typename Scalar $>$ \\
\hyperlink{a08448}{VectorT}$<$ Scalar, 3 $>$ \hyperlink{a07604}{A\+C\+G\+::\+Dual\+QuaternionT}$<$ Scalar $>$\+::transform\+\_\+vector (\begin{DoxyParamCaption}\item[{const \hyperlink{a08448}{Vec3} \&}]{\+\_\+point }\end{DoxyParamCaption}) const}



Transform a vector with the dual quaternion. 

transform a given point with this dual quaternion T\+O\+DO check if this is a unit dual quaternion 

Definition at line 395 of file Dual\+Quaternion\+T\+\_\+impl.\+hh.



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