\hypertarget{a00514}{\section{A\+C\+G\+:\+:Dual\+Quaternion\+T$<$ Scalar $>$ Class Template Reference}
\label{a00514}\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 $<$A\+C\+G/\+Math/\+Dual\+Quaternion\+T.\+hh$>$}

\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a00514_ad0db328b33fa13bc5263c4d72c784df1}{typedef \hyperlink{a01092}{Quaternion\+T}$<$ Scalar $>$ {\bfseries Quaternion}}\label{a00514_ad0db328b33fa13bc5263c4d72c784df1}

\item 
\hypertarget{a00514_a316ecfc985aef0f40c774a7862698b3c}{typedef \hyperlink{a00514}{Dual\+Quaternion\+T}$<$ Scalar $>$ {\bfseries Dual\+Quaternion}}\label{a00514_a316ecfc985aef0f40c774a7862698b3c}

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

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

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

\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a00514_af8267145deec4291d418740760da882f}{\hyperlink{a00514_af8267145deec4291d418740760da882f}{Dual\+Quaternion\+T} ()}\label{a00514_af8267145deec4291d418740760da882f}

\begin{DoxyCompactList}\small\item\em Default constructor ( constructs an identity dual quaternion ) \end{DoxyCompactList}\item 
\hypertarget{a00514_a564925c67820de78487aeb14dfc842b7}{\hyperlink{a00514_a564925c67820de78487aeb14dfc842b7}{Dual\+Quaternion\+T} (const \hyperlink{a00514}{Dual\+Quaternion} \&\+\_\+other)}\label{a00514_a564925c67820de78487aeb14dfc842b7}

\begin{DoxyCompactList}\small\item\em Copy constructor. \end{DoxyCompactList}\item 
\hypertarget{a00514_ab797ac34094c770c414b4194a26b1668}{\hyperlink{a00514_ab797ac34094c770c414b4194a26b1668}{Dual\+Quaternion\+T} (const \hyperlink{a01092}{Quaternion} \&\+\_\+real, const \hyperlink{a01092}{Quaternion} \&\+\_\+dual)}\label{a00514_ab797ac34094c770c414b4194a26b1668}

\begin{DoxyCompactList}\small\item\em Construct from given real,dual parts. \end{DoxyCompactList}\item 
\hypertarget{a00514_aa2bd54bae9d4d0c98be4e7c7f1f940fa}{\hyperlink{a00514_aa2bd54bae9d4d0c98be4e7c7f1f940fa}{Dual\+Quaternion\+T} (Scalar \+\_\+\+Rw, Scalar \+\_\+\+Rx, Scalar \+\_\+\+Ry, Scalar \+\_\+\+Rz, Scalar \+\_\+\+Dw, Scalar \+\_\+\+Dx, Scalar \+\_\+\+Dy, Scalar \+\_\+\+Dz)}\label{a00514_aa2bd54bae9d4d0c98be4e7c7f1f940fa}

\begin{DoxyCompactList}\small\item\em Construct from 8 scalars. \end{DoxyCompactList}\item 
\hypertarget{a00514_a85ece38ff0d5244ee4538d2ab2f9d5d8}{\hyperlink{a00514_a85ece38ff0d5244ee4538d2ab2f9d5d8}{Dual\+Quaternion\+T} (\hyperlink{a01092}{Quaternion} \+\_\+rotation)}\label{a00514_a85ece38ff0d5244ee4538d2ab2f9d5d8}

\begin{DoxyCompactList}\small\item\em Construct from a rotation given as quaternion. \end{DoxyCompactList}\item 
\hypertarget{a00514_a828cede9a0b659dcfb28f8ff56f54c76}{\hyperlink{a00514_a828cede9a0b659dcfb28f8ff56f54c76}{Dual\+Quaternion\+T} (const \hyperlink{a01409}{Vec3} \&\+\_\+translation)}\label{a00514_a828cede9a0b659dcfb28f8ff56f54c76}

\begin{DoxyCompactList}\small\item\em Construct from a translatation given as a vector. \end{DoxyCompactList}\item 
\hypertarget{a00514_aa9421c6f9bfd9b0eeaac6e4cdd784534}{\hyperlink{a00514_aa9421c6f9bfd9b0eeaac6e4cdd784534}{Dual\+Quaternion\+T} (const \hyperlink{a01409}{Vec3} \&\+\_\+translation, const \hyperlink{a01092}{Quaternion} \&\+\_\+rotation)}\label{a00514_aa9421c6f9bfd9b0eeaac6e4cdd784534}

\begin{DoxyCompactList}\small\item\em Construct from a translation+rotation. \end{DoxyCompactList}\item 
\hypertarget{a00514_aeb24ab21217fbeacf3a1253f298788b6}{\hyperlink{a00514_aeb24ab21217fbeacf3a1253f298788b6}{Dual\+Quaternion\+T} (const \hyperlink{a00797}{Matrix} \&\+\_\+transformation)}\label{a00514_aeb24ab21217fbeacf3a1253f298788b6}

\begin{DoxyCompactList}\small\item\em Construct from a rigid transformation given as matrix. \end{DoxyCompactList}\item 
\hypertarget{a00514_af402d1d788c5925def8e6b0a474f0529}{\hyperlink{a00514}{Dual\+Quaternion} \hyperlink{a00514_af402d1d788c5925def8e6b0a474f0529}{conjugate} () const }\label{a00514_af402d1d788c5925def8e6b0a474f0529}

\begin{DoxyCompactList}\small\item\em conjugate dual quaternion \end{DoxyCompactList}\item 
\hypertarget{a00514_af0a420121beee5c98e57ab60a5f62b89}{\hyperlink{a00514}{Dual\+Quaternion} \hyperlink{a00514_af0a420121beee5c98e57ab60a5f62b89}{invert} () const }\label{a00514_af0a420121beee5c98e57ab60a5f62b89}

\begin{DoxyCompactList}\small\item\em invert dual quaternion \end{DoxyCompactList}\item 
\hypertarget{a00514_a82d5783542883eb7e9dcbea66d3fb8bf}{void \hyperlink{a00514_a82d5783542883eb7e9dcbea66d3fb8bf}{normalize} ()}\label{a00514_a82d5783542883eb7e9dcbea66d3fb8bf}

\begin{DoxyCompactList}\small\item\em normalize dual quaternion \end{DoxyCompactList}\item 
\hypertarget{a00514_a3685bb718e248b0623e12830cd0ed5f6}{bool \hyperlink{a00514_a3685bb718e248b0623e12830cd0ed5f6}{operator==} (const \hyperlink{a00514}{Dual\+Quaternion} \&\+\_\+other) const }\label{a00514_a3685bb718e248b0623e12830cd0ed5f6}

\begin{DoxyCompactList}\small\item\em dual quaternion comparison \end{DoxyCompactList}\item 
\hypertarget{a00514_ad1c5fbc9475e06411970612ccf0d8513}{bool \hyperlink{a00514_ad1c5fbc9475e06411970612ccf0d8513}{operator!=} (const \hyperlink{a00514}{Dual\+Quaternion} \&\+\_\+other) const }\label{a00514_ad1c5fbc9475e06411970612ccf0d8513}

\begin{DoxyCompactList}\small\item\em dual quaternion comparison \end{DoxyCompactList}\item 
\hypertarget{a00514_aa5ed3911e92dd98275ce8588577a7ef3}{\hyperlink{a00514}{Dual\+Quaternion} \hyperlink{a00514_aa5ed3911e92dd98275ce8588577a7ef3}{operator+} (const \hyperlink{a00514}{Dual\+Quaternion} \&\+\_\+other) const }\label{a00514_aa5ed3911e92dd98275ce8588577a7ef3}

\begin{DoxyCompactList}\small\item\em addition \end{DoxyCompactList}\item 
\hypertarget{a00514_aae6481dbacf3f58032deaa7e57bb8821}{\hyperlink{a00514}{Dual\+Quaternion} \& \hyperlink{a00514_aae6481dbacf3f58032deaa7e57bb8821}{operator+=} (const \hyperlink{a00514}{Dual\+Quaternion} \&\+\_\+other)}\label{a00514_aae6481dbacf3f58032deaa7e57bb8821}

\begin{DoxyCompactList}\small\item\em addition \end{DoxyCompactList}\item 
\hypertarget{a00514_a4bb27927f08511f470b86e8364759ead}{\hyperlink{a00514}{Dual\+Quaternion} \hyperlink{a00514_a4bb27927f08511f470b86e8364759ead}{operator-\/} (const \hyperlink{a00514}{Dual\+Quaternion} \&\+\_\+other) const }\label{a00514_a4bb27927f08511f470b86e8364759ead}

\begin{DoxyCompactList}\small\item\em substraction \end{DoxyCompactList}\item 
\hypertarget{a00514_a2f9cb9058573ceb9a9134599ebbca33c}{\hyperlink{a00514}{Dual\+Quaternion} \& \hyperlink{a00514_a2f9cb9058573ceb9a9134599ebbca33c}{operator-\/=} (const \hyperlink{a00514}{Dual\+Quaternion} \&\+\_\+other)}\label{a00514_a2f9cb9058573ceb9a9134599ebbca33c}

\begin{DoxyCompactList}\small\item\em substraction \end{DoxyCompactList}\item 
\hypertarget{a00514_aedab7ace186f2143cd8fb5616014ee56}{\hyperlink{a00514}{Dual\+Quaternion} \hyperlink{a00514_aedab7ace186f2143cd8fb5616014ee56}{operator$\ast$} (const \hyperlink{a00514}{Dual\+Quaternion} \&\+\_\+q) const }\label{a00514_aedab7ace186f2143cd8fb5616014ee56}

\begin{DoxyCompactList}\small\item\em dual\+Quaternion $\ast$ dual\+Quaternion \end{DoxyCompactList}\item 
\hypertarget{a00514_a687c549eb2ad8dca4dbadd74fadef734}{\hyperlink{a00514}{Dual\+Quaternion} \hyperlink{a00514_a687c549eb2ad8dca4dbadd74fadef734}{operator$\ast$} (const Scalar \&\+\_\+scalar) const }\label{a00514_a687c549eb2ad8dca4dbadd74fadef734}

\begin{DoxyCompactList}\small\item\em dual\+Quaternion $\ast$ scalar \end{DoxyCompactList}\item 
\hypertarget{a00514_a7460050f48c2abbbb9faea3bcd3ba7f9}{\hyperlink{a00514}{Dual\+Quaternion} \& \hyperlink{a00514_a7460050f48c2abbbb9faea3bcd3ba7f9}{operator$\ast$=} (const \hyperlink{a00514}{Dual\+Quaternion} \&\+\_\+q)}\label{a00514_a7460050f48c2abbbb9faea3bcd3ba7f9}

\begin{DoxyCompactList}\small\item\em dual\+Quaternion $\ast$= dual\+Quaternion \end{DoxyCompactList}\item 
\hypertarget{a00514_ac60c90ce0a99705d9d4467cdd1203e6b}{Scalar \& \hyperlink{a00514_ac60c90ce0a99705d9d4467cdd1203e6b}{operator\mbox{[}$\,$\mbox{]}} (const unsigned int \&b)}\label{a00514_ac60c90ce0a99705d9d4467cdd1203e6b}

\begin{DoxyCompactList}\small\item\em Access as one big vector. \end{DoxyCompactList}\item 
\hyperlink{a01409}{Vec3} \hyperlink{a00514_a64d3dc37282918748fbfe76130f33569}{transform\+\_\+point} (const \hyperlink{a01409}{Vec3} \&\+\_\+point) const 
\begin{DoxyCompactList}\small\item\em Transform a point with the dual quaternion. \end{DoxyCompactList}\item 
\hyperlink{a01409}{Vec3} \hyperlink{a00514_a25f40ee27fcfca94c7b9e8a94d59d808}{transform\+\_\+vector} (const \hyperlink{a01409}{Vec3} \&\+\_\+point) const 
\begin{DoxyCompactList}\small\item\em Transform a vector with the dual quaternion. \end{DoxyCompactList}\item 
\hypertarget{a00514_a8e052f79c6f37d4a2ef704c27bff0fd7}{void \hyperlink{a00514_a8e052f79c6f37d4a2ef704c27bff0fd7}{print\+Info} ()}\label{a00514_a8e052f79c6f37d4a2ef704c27bff0fd7}

\begin{DoxyCompactList}\small\item\em print some info about the D\+Q \end{DoxyCompactList}\item 
\hypertarget{a00514_a41162874f9ff08cb66ba46f117e47429}{{\footnotesize template$<$typename Vector\+Type $>$ }\\\hyperlink{a00514}{Dual\+Quaternion\+T}$<$ Scalar $>$ \hyperlink{a00514_a41162874f9ff08cb66ba46f117e47429}{interpolate} (Vector\+Type \&\+\_\+weights, const std\+::vector$<$ \hyperlink{a00514}{Dual\+Quaternion} $>$ \&\+\_\+dual\+Quaternions)}\label{a00514_a41162874f9ff08cb66ba46f117e47429}

\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 
\hypertarget{a00514_a49b096343d08f58c30df26003913909e}{static \hyperlink{a00514}{Dual\+Quaternion} \hyperlink{a00514_a49b096343d08f58c30df26003913909e}{identity} ()}\label{a00514_a49b096343d08f58c30df26003913909e}

\begin{DoxyCompactList}\small\item\em identity dual quaternion \mbox{[} R(1, 0, 0, 0), D(0,0,0,0) \mbox{]} \end{DoxyCompactList}\item 
\hypertarget{a00514_a98ef46ea90496d66ac12345f8893ffb1}{static \hyperlink{a00514}{Dual\+Quaternion} \hyperlink{a00514_a98ef46ea90496d66ac12345f8893ffb1}{zero} ()}\label{a00514_a98ef46ea90496d66ac12345f8893ffb1}

\begin{DoxyCompactList}\small\item\em zero dual quaternion \mbox{[} R(0, 0, 0, 0), D(0,0,0,0) \mbox{]} \end{DoxyCompactList}\item 
\hypertarget{a00514_a11103e5a32e4e299cd7cee184cfeb429}{{\footnotesize template$<$typename Vector\+Type $>$ }\\static \hyperlink{a00514}{Dual\+Quaternion} \hyperlink{a00514_a11103e5a32e4e299cd7cee184cfeb429}{interpolate} (Vector\+Type \&\+\_\+weights, const std\+::vector$<$ \hyperlink{a00514}{Dual\+Quaternion} $>$ \&\+\_\+dual\+Quaternions)}\label{a00514_a11103e5a32e4e299cd7cee184cfeb429}

\begin{DoxyCompactList}\small\item\em linear interpolation of dual quaternions. Result is normalized afterwards \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a00514_a44276f1259d94893d040d1ac852b5171}{\hyperlink{a01092}{Quaternion} \hyperlink{a00514_a44276f1259d94893d040d1ac852b5171}{real\+\_\+}}\label{a00514_a44276f1259d94893d040d1ac852b5171}

\begin{DoxyCompactList}\small\item\em real and dual quaternion parts \end{DoxyCompactList}\item 
\hypertarget{a00514_a6bb317835a63cd5df89a52dd517144cc}{\hyperlink{a01092}{Quaternion} {\bfseries dual\+\_\+}}\label{a00514_a6bb317835a63cd5df89a52dd517144cc}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$class Scalar$>$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'\+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 90 of file Dual\+Quaternion\+T.\+hh.



\subsection{Member Function Documentation}
\hypertarget{a00514_a64d3dc37282918748fbfe76130f33569}{\index{A\+C\+G\+::\+Dual\+Quaternion\+T@{A\+C\+G\+::\+Dual\+Quaternion\+T}!transform\+\_\+point@{transform\+\_\+point}}
\index{transform\+\_\+point@{transform\+\_\+point}!A\+C\+G\+::\+Dual\+Quaternion\+T@{A\+C\+G\+::\+Dual\+Quaternion\+T}}
\subsubsection[{transform\+\_\+point}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Scalar $>$ {\bf Vector\+T}$<$ Scalar, 3 $>$ {\bf A\+C\+G\+::\+Dual\+Quaternion\+T}$<$ Scalar $>$\+::transform\+\_\+point (
\begin{DoxyParamCaption}
\item[{const {\bf Vec3} \&}]{\+\_\+point}
\end{DoxyParamCaption}
) const}}\label{a00514_a64d3dc37282918748fbfe76130f33569}


Transform a point with the dual quaternion. 

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

Definition at line 374 of file Dual\+Quaternion\+T.\+cc.

\hypertarget{a00514_a25f40ee27fcfca94c7b9e8a94d59d808}{\index{A\+C\+G\+::\+Dual\+Quaternion\+T@{A\+C\+G\+::\+Dual\+Quaternion\+T}!transform\+\_\+vector@{transform\+\_\+vector}}
\index{transform\+\_\+vector@{transform\+\_\+vector}!A\+C\+G\+::\+Dual\+Quaternion\+T@{A\+C\+G\+::\+Dual\+Quaternion\+T}}
\subsubsection[{transform\+\_\+vector}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Scalar $>$ {\bf Vector\+T}$<$ Scalar, 3 $>$ {\bf A\+C\+G\+::\+Dual\+Quaternion\+T}$<$ Scalar $>$\+::transform\+\_\+vector (
\begin{DoxyParamCaption}
\item[{const {\bf Vec3} \&}]{\+\_\+point}
\end{DoxyParamCaption}
) const}}\label{a00514_a25f40ee27fcfca94c7b9e8a94d59d808}


Transform a vector with the dual quaternion. 

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

Definition at line 403 of file Dual\+Quaternion\+T.\+cc.



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