\hypertarget{class_ogre_1_1_quaternion}{}\doxysection{Ogre\+::Quaternion Class Reference}
\label{class_ogre_1_1_quaternion}\index{Ogre::Quaternion@{Ogre::Quaternion}}


Implementation of a \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}}, i.\+e.  




{\ttfamily \#include $<$Ogre\+Quaternion.\+h$>$}

\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{class_ogre_1_1_quaternion_ab58dc0c4c04d0579ce9321a719f10d5c}{Quaternion}} ()
\begin{DoxyCompactList}\small\item\em Default constructor, initializes to identity rotation (aka 0°) \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_ogre_1_1_quaternion_acdcb70a4f122452b6fa70d7cf5ce3cf3}{Quaternion}} (const \mbox{\hyperlink{class_ogre_1_1_matrix3}{Matrix3}} \&rot)
\begin{DoxyCompactList}\small\item\em Construct a quaternion from a rotation matrix. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_ogre_1_1_quaternion_a7f25c623d95186b58f6367dcd097a5ba}{Quaternion}} (const \mbox{\hyperlink{class_ogre_1_1_radian}{Radian}} \&rf\+Angle, const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&rk\+Axis)
\begin{DoxyCompactList}\small\item\em Construct a quaternion from an angle/axis. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_ogre_1_1_quaternion_a1140011dc0793a81c55f2d078c8c964c}{Quaternion}} (const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&xaxis, const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&yaxis, const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&zaxis)
\begin{DoxyCompactList}\small\item\em Construct a quaternion from 3 orthonormal local axes. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_ogre_1_1_quaternion_a3ccc60338011887023b397a02a7f3336}{Quaternion}} (const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} $\ast$ak\+Axis)
\begin{DoxyCompactList}\small\item\em Construct a quaternion from 3 orthonormal local axes. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_ogre_1_1_quaternion_a1ca81bd9d57e43cf23582c898e5fdd34}{Quaternion}} (\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} $\ast$valptr)
\begin{DoxyCompactList}\small\item\em Construct a quaternion from 4 manual w/x/y/z values. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_ogre_1_1_quaternion_a9b45997a81d85662350808b7043d535d}{Quaternion}} (\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} fW, \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} fX, \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} fY, \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} fZ)
\begin{DoxyCompactList}\small\item\em Construct from an explicit list of values. \end{DoxyCompactList}\item 
\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} \mbox{\hyperlink{class_ogre_1_1_quaternion_a9e14e6aa96e714397b31929299ca681d}{Dot}} (const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&rkQ) const
\begin{DoxyCompactList}\small\item\em Returns the dot product of the quaternion. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{class_ogre_1_1_quaternion_aaf249bc76b399f92c0c2f93377b032ab}{equals}} (const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&rhs, const \mbox{\hyperlink{class_ogre_1_1_radian}{Radian}} \&tolerance) const
\begin{DoxyCompactList}\small\item\em Equality with tolerance (tolerance is max angle difference) \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \mbox{\hyperlink{class_ogre_1_1_quaternion_ae9c8590b89ed8c8b48a5f188383aeadc}{Exp}} () const
\begin{DoxyCompactList}\small\item\em Apply to unit-\/length quaternion. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{class_ogre_1_1_quaternion_ac3328c1bb86d17e870c57d52720e2e32}{From\+Angle\+Axis}} (const \mbox{\hyperlink{class_ogre_1_1_radian}{Radian}} \&rf\+Angle, const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&rk\+Axis)
\begin{DoxyCompactList}\small\item\em Setups the quaternion using the supplied vector, and \char`\"{}roll\char`\"{} around that vector by the specified radians. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{class_ogre_1_1_quaternion_a365bc3b10308318721199a829db03887}{From\+Axes}} (const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&\mbox{\hyperlink{class_ogre_1_1_quaternion_a58a45c5dd46ceee8dbf81dfced570dbe}{x\+Axis}}, const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&\mbox{\hyperlink{class_ogre_1_1_quaternion_aa4915f1a8047e3c8a0a9c380fe3ae695}{y\+Axis}}, const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&\mbox{\hyperlink{class_ogre_1_1_quaternion_a3c41f8bb4147db31ff9674a70de1aad5}{z\+Axis}})
\item 
void \mbox{\hyperlink{class_ogre_1_1_quaternion_a7ad7ad40e38bf351485c2a906c3949bb}{From\+Axes}} (const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} $\ast$ak\+Axis)
\begin{DoxyCompactList}\small\item\em Constructs the quaternion using 3 axes, the axes are assumed to be orthonormal. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{class_ogre_1_1_quaternion_ae6c3bfed7176355cf2461567f89a15b1}{From\+Rotation\+Matrix}} (const \mbox{\hyperlink{class_ogre_1_1_matrix3}{Matrix3}} \&k\+Rot)
\item 
\mbox{\hyperlink{class_ogre_1_1_radian}{Radian}} \mbox{\hyperlink{class_ogre_1_1_quaternion_ae4ffd43e74b8b07ddfbc5810a9e6e7ad}{get\+Pitch}} (bool reproject\+Axis=true) const
\begin{DoxyCompactList}\small\item\em Calculate the local pitch element of this quaternion. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_ogre_1_1_radian}{Radian}} \mbox{\hyperlink{class_ogre_1_1_quaternion_ae23d3f973fd0f8ac9f188cd513823e3e}{get\+Roll}} (bool reproject\+Axis=true) const
\begin{DoxyCompactList}\small\item\em Calculate the local roll element of this quaternion. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_ogre_1_1_radian}{Radian}} \mbox{\hyperlink{class_ogre_1_1_quaternion_a15c912e62c9abcb3335de205cdf30c2d}{get\+Yaw}} (bool reproject\+Axis=true) const
\begin{DoxyCompactList}\small\item\em Calculate the local yaw element of this quaternion. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \mbox{\hyperlink{class_ogre_1_1_quaternion_ae370a6b879cf4d03fb85d8ce510705c1}{Inverse}} () const
\item 
bool \mbox{\hyperlink{class_ogre_1_1_quaternion_ac566d9e46f5c1b6368047c132e82a829}{is\+NaN}} () const
\begin{DoxyCompactList}\small\item\em Check whether this quaternion contains valid values. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \mbox{\hyperlink{class_ogre_1_1_quaternion_a4f89136f9dcb79fef8c47dc418e3e55f}{Log}} () const
\item 
\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} \mbox{\hyperlink{class_ogre_1_1_quaternion_a353aafd21ec10c8c07f04472ae6c32b8}{Norm}} () const
\begin{DoxyCompactList}\small\item\em Returns the normal length of this quaternion. \end{DoxyCompactList}\item 
\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} \mbox{\hyperlink{class_ogre_1_1_quaternion_aee94ec9c7de50fe7f774ae4c7e760b65}{normalise}} (void)
\begin{DoxyCompactList}\small\item\em Normalises this quaternion, and returns the previous length. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{class_ogre_1_1_quaternion_aec199d4e6af6c82c4026d012eae570cb}{operator!=}} (const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&rhs) const
\item 
\mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \mbox{\hyperlink{class_ogre_1_1_quaternion_af05da43b746cf5b9bc2dcaf3aa4db2b9}{operator$\ast$}} (const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&rkQ) const
\item 
\mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \mbox{\hyperlink{class_ogre_1_1_quaternion_a535ef1c199eee303753507a4a78ddf22}{operator$\ast$}} (const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&rk\+Vector) const
\begin{DoxyCompactList}\small\item\em Rotation of a vector by a quaternion. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \mbox{\hyperlink{class_ogre_1_1_quaternion_af6725db29a7dbc5d6a9071b86ce43714}{operator$\ast$}} (\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} s) const
\item 
\mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \mbox{\hyperlink{class_ogre_1_1_quaternion_aac3debd2245b0dcefff4ce2fda46eef1}{operator+}} (const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&rkQ) const
\item 
\mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \mbox{\hyperlink{class_ogre_1_1_quaternion_a24b15dc994247753b7a8064b6a13e2d6}{operator-\/}} () const
\item 
\mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \mbox{\hyperlink{class_ogre_1_1_quaternion_a98993e6f63209a39149d132623bbf41b}{operator-\/}} (const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&rkQ) const
\item 
\mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \& \mbox{\hyperlink{class_ogre_1_1_quaternion_a6367b543cf0d073d893139dd503b4fbd}{operator=}} (const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&rkQ)
\item 
bool \mbox{\hyperlink{class_ogre_1_1_quaternion_af292a9ed18e3da0bda0fbe114f60cdec}{operator==}} (const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&rhs) const
\item 
\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} \& \mbox{\hyperlink{class_ogre_1_1_quaternion_a074aea0da7fabfde89d204a1f0f0121b}{operator\mbox{[}$\,$\mbox{]}}} (const size\+\_\+t i)
\begin{DoxyCompactList}\small\item\em Array accessor operator. \end{DoxyCompactList}\item 
\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} \mbox{\hyperlink{class_ogre_1_1_quaternion_a390c026412bb0e687f20cfe1bc0ada66}{operator\mbox{[}$\,$\mbox{]}}} (const size\+\_\+t i) const
\begin{DoxyCompactList}\small\item\em Array accessor operator. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{class_ogre_1_1_quaternion_a1df622b500ec13bf405155274e23aa32}{orientation\+Equals}} (const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&other, \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} tolerance=1e-\/3f) const
\begin{DoxyCompactList}\small\item\em Compare two quaternions which are assumed to be used as orientations. \end{DoxyCompactList}\item 
\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} $\ast$ \mbox{\hyperlink{class_ogre_1_1_quaternion_aecce24dd0096766de0c96c13b195b197}{ptr}} ()
\begin{DoxyCompactList}\small\item\em Pointer accessor for direct copying. \end{DoxyCompactList}\item 
const \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} $\ast$ \mbox{\hyperlink{class_ogre_1_1_quaternion_a214b1811f4b821e4b616d64a51c26275}{ptr}} () const
\begin{DoxyCompactList}\small\item\em Pointer accessor for direct copying. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{class_ogre_1_1_quaternion_a54dcd575915c7b7ddb65b8cb249de521}{swap}} (\mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&other)
\begin{DoxyCompactList}\small\item\em Exchange the contents of this quaternion with another. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{class_ogre_1_1_quaternion_a2fb2913d70c7c4ea6e0799187746401b}{To\+Angle\+Axis}} (\mbox{\hyperlink{class_ogre_1_1_degree}{Degree}} \&d\+Angle, \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&rk\+Axis) const
\item 
void \mbox{\hyperlink{class_ogre_1_1_quaternion_a814829e953cbf810c80a8b87626f6324}{To\+Angle\+Axis}} (\mbox{\hyperlink{class_ogre_1_1_radian}{Radian}} \&rf\+Angle, \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&rk\+Axis) const
\item 
void \mbox{\hyperlink{class_ogre_1_1_quaternion_ad4e2661546b7ac4e40b77f38a35ba8d9}{To\+Axes}} (\mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&\mbox{\hyperlink{class_ogre_1_1_quaternion_a58a45c5dd46ceee8dbf81dfced570dbe}{x\+Axis}}, \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&\mbox{\hyperlink{class_ogre_1_1_quaternion_aa4915f1a8047e3c8a0a9c380fe3ae695}{y\+Axis}}, \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&\mbox{\hyperlink{class_ogre_1_1_quaternion_a3c41f8bb4147db31ff9674a70de1aad5}{z\+Axis}}) const
\item 
void \mbox{\hyperlink{class_ogre_1_1_quaternion_ae8227891cf00d8fc35bcd455c584f7b0}{To\+Axes}} (\mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} $\ast$ak\+Axis) const
\begin{DoxyCompactList}\small\item\em Gets the 3 orthonormal axes defining the quaternion. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{class_ogre_1_1_quaternion_a6005735392c9b07901b8fe160c959f46}{To\+Rotation\+Matrix}} (\mbox{\hyperlink{class_ogre_1_1_matrix3}{Matrix3}} \&k\+Rot) const
\item 
\mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \mbox{\hyperlink{class_ogre_1_1_quaternion_a821a464cce9a81d5d20c620025043851}{Unit\+Inverse}} () const
\begin{DoxyCompactList}\small\item\em Apply to non-\/zero quaternion. \end{DoxyCompactList}\item 
\mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \mbox{\hyperlink{class_ogre_1_1_quaternion_a58a45c5dd46ceee8dbf81dfced570dbe}{x\+Axis}} (void) const
\begin{DoxyCompactList}\small\item\em Returns the X orthonormal axis defining the quaternion. \end{DoxyCompactList}\item 
\mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \mbox{\hyperlink{class_ogre_1_1_quaternion_aa4915f1a8047e3c8a0a9c380fe3ae695}{y\+Axis}} (void) const
\begin{DoxyCompactList}\small\item\em Returns the Y orthonormal axis defining the quaternion. \end{DoxyCompactList}\item 
\mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \mbox{\hyperlink{class_ogre_1_1_quaternion_a3c41f8bb4147db31ff9674a70de1aad5}{z\+Axis}} (void) const
\begin{DoxyCompactList}\small\item\em Returns the Z orthonormal axis defining the quaternion. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static void \mbox{\hyperlink{class_ogre_1_1_quaternion_a838d0736819d496073d99f3f74d0cac1}{Intermediate}} (const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&rk\+Q0, const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&rk\+Q1, const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&rk\+Q2, \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&rka, \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&rkB)
\begin{DoxyCompactList}\small\item\em Setup for spherical quadratic interpolation. \end{DoxyCompactList}\item 
static \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \mbox{\hyperlink{class_ogre_1_1_quaternion_a16987149991882e148170fe3f1c7da4b}{nlerp}} (\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} fT, const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&rkP, const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&rkQ, bool shortest\+Path=false)
\begin{DoxyCompactList}\small\item\em Performs Normalised linear interpolation between two quaternions, and returns the result. \end{DoxyCompactList}\item 
static \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \mbox{\hyperlink{class_ogre_1_1_quaternion_ab0c47f1a7308ac4c17db9f9ddb6e4a72}{Slerp}} (\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} fT, const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&rkP, const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&rkQ, bool shortest\+Path=false)
\begin{DoxyCompactList}\small\item\em Performs Spherical linear interpolation between two quaternions, and returns the result. \end{DoxyCompactList}\item 
static \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \mbox{\hyperlink{class_ogre_1_1_quaternion_a25fb3bc0f11e6a676fb5c47347a79579}{Slerp\+Extra\+Spins}} (\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} fT, const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&rkP, const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&rkQ, int i\+Extra\+Spins)
\item 
static \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \mbox{\hyperlink{class_ogre_1_1_quaternion_a5f43da8b8aa579e02035eecff89e16a5}{Squad}} (\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} fT, const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&rkP, const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&rkA, const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&rkB, const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&rkQ, bool shortest\+Path=false)
\begin{DoxyCompactList}\small\item\em Spherical quadratic interpolation. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Public Attributes}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} \mbox{\hyperlink{class_ogre_1_1_quaternion_af3424f1e07092c0ffe293d18b277a04f}{w}}
\item 
\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} \mbox{\hyperlink{class_ogre_1_1_quaternion_a32c5680516b41bc4ba3159bf4d4abaf1}{x}}
\item 
\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} \mbox{\hyperlink{class_ogre_1_1_quaternion_aa7328cd3883a92ee9c9322805d038f11}{y}}
\item 
\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} \mbox{\hyperlink{class_ogre_1_1_quaternion_a31ec84a931236554c0c17e37bf5ace97}{z}}
\end{DoxyCompactItemize}
\doxysubsection*{Static Public Attributes}
\begin{DoxyCompactItemize}
\item 
static const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \mbox{\hyperlink{class_ogre_1_1_quaternion_a441b8d52549e1dedec27420325a313ef}{I\+D\+E\+N\+T\+I\+TY}}
\item 
static const \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} \mbox{\hyperlink{class_ogre_1_1_quaternion_a6b53296360cc166c62533cff8f1edcc2}{ms\+Epsilon}}
\begin{DoxyCompactList}\small\item\em Cutoff for sine near zero. \end{DoxyCompactList}\item 
static const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \mbox{\hyperlink{class_ogre_1_1_quaternion_a44f3c000c8f1ea2759c2e724e04bf86b}{Z\+E\+RO}}
\end{DoxyCompactItemize}
\doxysubsection*{Friends}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \mbox{\hyperlink{class_ogre_1_1_quaternion_a4aea5016e6a48eebee6a31f0a298825e}{operator$\ast$}} (\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} s, const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&q)
\item 
std\+::ostream \& \mbox{\hyperlink{class_ogre_1_1_quaternion_a60829c0f8f2a36602ab5fdbb1a79b635}{operator$<$$<$}} (std\+::ostream \&o, const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&q)
\begin{DoxyCompactList}\small\item\em Function for writing to a stream. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Implementation of a \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}}, i.\+e. 

a rotation around an axis. For more information about Quaternions and the theory behind it, we recommend reading\+: \href{http://www.ogre3d.org/tikiwiki/Quaternion+and+Rotation+Primer}{\texttt{ http\+://www.\+ogre3d.\+org/tikiwiki/\+Quaternion+and+\+Rotation+\+Primer}} and \href{http://www.cprogramming.com/tutorial/3d/quaternions.html}{\texttt{ http\+://www.\+cprogramming.\+com/tutorial/3d/quaternions.\+html}} and \href{http://www.gamedev.net/page/resources/_/reference/programming/math-and-physics/quaternions/quaternion-powers-r1095}{\texttt{ http\+://www.\+gamedev.\+net/page/resources/\+\_\+/reference/programming/math-\/and-\/physics/quaternions/quaternion-\/powers-\/r1095}} 

\doxysubsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{class_ogre_1_1_quaternion_ab58dc0c4c04d0579ce9321a719f10d5c}\label{class_ogre_1_1_quaternion_ab58dc0c4c04d0579ce9321a719f10d5c}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!Quaternion@{Quaternion}}
\index{Quaternion@{Quaternion}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{Quaternion()}{Quaternion()}\hspace{0.1cm}{\footnotesize\ttfamily [1/7]}}
{\footnotesize\ttfamily Ogre\+::\+Quaternion\+::\+Quaternion (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Default constructor, initializes to identity rotation (aka 0°) 

\mbox{\Hypertarget{class_ogre_1_1_quaternion_a9b45997a81d85662350808b7043d535d}\label{class_ogre_1_1_quaternion_a9b45997a81d85662350808b7043d535d}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!Quaternion@{Quaternion}}
\index{Quaternion@{Quaternion}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{Quaternion()}{Quaternion()}\hspace{0.1cm}{\footnotesize\ttfamily [2/7]}}
{\footnotesize\ttfamily Ogre\+::\+Quaternion\+::\+Quaternion (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}}]{fW,  }\item[{\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}}]{fX,  }\item[{\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}}]{fY,  }\item[{\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}}]{fZ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Construct from an explicit list of values. 

\mbox{\Hypertarget{class_ogre_1_1_quaternion_acdcb70a4f122452b6fa70d7cf5ce3cf3}\label{class_ogre_1_1_quaternion_acdcb70a4f122452b6fa70d7cf5ce3cf3}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!Quaternion@{Quaternion}}
\index{Quaternion@{Quaternion}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{Quaternion()}{Quaternion()}\hspace{0.1cm}{\footnotesize\ttfamily [3/7]}}
{\footnotesize\ttfamily Ogre\+::\+Quaternion\+::\+Quaternion (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{class_ogre_1_1_matrix3}{Matrix3}} \&}]{rot }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Construct a quaternion from a rotation matrix. 

\mbox{\Hypertarget{class_ogre_1_1_quaternion_a7f25c623d95186b58f6367dcd097a5ba}\label{class_ogre_1_1_quaternion_a7f25c623d95186b58f6367dcd097a5ba}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!Quaternion@{Quaternion}}
\index{Quaternion@{Quaternion}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{Quaternion()}{Quaternion()}\hspace{0.1cm}{\footnotesize\ttfamily [4/7]}}
{\footnotesize\ttfamily Ogre\+::\+Quaternion\+::\+Quaternion (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{class_ogre_1_1_radian}{Radian}} \&}]{rf\+Angle,  }\item[{const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&}]{rk\+Axis }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Construct a quaternion from an angle/axis. 

\mbox{\Hypertarget{class_ogre_1_1_quaternion_a1140011dc0793a81c55f2d078c8c964c}\label{class_ogre_1_1_quaternion_a1140011dc0793a81c55f2d078c8c964c}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!Quaternion@{Quaternion}}
\index{Quaternion@{Quaternion}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{Quaternion()}{Quaternion()}\hspace{0.1cm}{\footnotesize\ttfamily [5/7]}}
{\footnotesize\ttfamily Ogre\+::\+Quaternion\+::\+Quaternion (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&}]{xaxis,  }\item[{const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&}]{yaxis,  }\item[{const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&}]{zaxis }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Construct a quaternion from 3 orthonormal local axes. 

\mbox{\Hypertarget{class_ogre_1_1_quaternion_a3ccc60338011887023b397a02a7f3336}\label{class_ogre_1_1_quaternion_a3ccc60338011887023b397a02a7f3336}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!Quaternion@{Quaternion}}
\index{Quaternion@{Quaternion}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{Quaternion()}{Quaternion()}\hspace{0.1cm}{\footnotesize\ttfamily [6/7]}}
{\footnotesize\ttfamily Ogre\+::\+Quaternion\+::\+Quaternion (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} $\ast$}]{ak\+Axis }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Construct a quaternion from 3 orthonormal local axes. 

\mbox{\Hypertarget{class_ogre_1_1_quaternion_a1ca81bd9d57e43cf23582c898e5fdd34}\label{class_ogre_1_1_quaternion_a1ca81bd9d57e43cf23582c898e5fdd34}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!Quaternion@{Quaternion}}
\index{Quaternion@{Quaternion}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{Quaternion()}{Quaternion()}\hspace{0.1cm}{\footnotesize\ttfamily [7/7]}}
{\footnotesize\ttfamily Ogre\+::\+Quaternion\+::\+Quaternion (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} $\ast$}]{valptr }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Construct a quaternion from 4 manual w/x/y/z values. 



\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{class_ogre_1_1_quaternion_a54dcd575915c7b7ddb65b8cb249de521}\label{class_ogre_1_1_quaternion_a54dcd575915c7b7ddb65b8cb249de521}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!swap@{swap}}
\index{swap@{swap}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{swap()}{swap()}}
{\footnotesize\ttfamily void Ogre\+::\+Quaternion\+::swap (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&}]{other }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Exchange the contents of this quaternion with another. 



References std\+::swap(), w, x, y, and z.

\mbox{\Hypertarget{class_ogre_1_1_quaternion_a390c026412bb0e687f20cfe1bc0ada66}\label{class_ogre_1_1_quaternion_a390c026412bb0e687f20cfe1bc0ada66}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!operator\mbox{[}\mbox{]}@{operator[]}}
\index{operator\mbox{[}\mbox{]}@{operator[]}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{operator[]()}{operator[]()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} Ogre\+::\+Quaternion\+::operator\mbox{[}$\,$\mbox{]} (\begin{DoxyParamCaption}\item[{const size\+\_\+t}]{i }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Array accessor operator. 

\mbox{\Hypertarget{class_ogre_1_1_quaternion_a074aea0da7fabfde89d204a1f0f0121b}\label{class_ogre_1_1_quaternion_a074aea0da7fabfde89d204a1f0f0121b}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!operator\mbox{[}\mbox{]}@{operator[]}}
\index{operator\mbox{[}\mbox{]}@{operator[]}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{operator[]()}{operator[]()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}\& Ogre\+::\+Quaternion\+::operator\mbox{[}$\,$\mbox{]} (\begin{DoxyParamCaption}\item[{const size\+\_\+t}]{i }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Array accessor operator. 

\mbox{\Hypertarget{class_ogre_1_1_quaternion_aecce24dd0096766de0c96c13b195b197}\label{class_ogre_1_1_quaternion_aecce24dd0096766de0c96c13b195b197}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!ptr@{ptr}}
\index{ptr@{ptr}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{ptr()}{ptr()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}$\ast$ Ogre\+::\+Quaternion\+::ptr (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Pointer accessor for direct copying. 

\mbox{\Hypertarget{class_ogre_1_1_quaternion_a214b1811f4b821e4b616d64a51c26275}\label{class_ogre_1_1_quaternion_a214b1811f4b821e4b616d64a51c26275}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!ptr@{ptr}}
\index{ptr@{ptr}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{ptr()}{ptr()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily const \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}$\ast$ Ogre\+::\+Quaternion\+::ptr (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Pointer accessor for direct copying. 

\mbox{\Hypertarget{class_ogre_1_1_quaternion_ae6c3bfed7176355cf2461567f89a15b1}\label{class_ogre_1_1_quaternion_ae6c3bfed7176355cf2461567f89a15b1}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!FromRotationMatrix@{FromRotationMatrix}}
\index{FromRotationMatrix@{FromRotationMatrix}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{FromRotationMatrix()}{FromRotationMatrix()}}
{\footnotesize\ttfamily void Ogre\+::\+Quaternion\+::\+From\+Rotation\+Matrix (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{class_ogre_1_1_matrix3}{Matrix3}} \&}]{k\+Rot }\end{DoxyParamCaption})}

\mbox{\Hypertarget{class_ogre_1_1_quaternion_a6005735392c9b07901b8fe160c959f46}\label{class_ogre_1_1_quaternion_a6005735392c9b07901b8fe160c959f46}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!ToRotationMatrix@{ToRotationMatrix}}
\index{ToRotationMatrix@{ToRotationMatrix}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{ToRotationMatrix()}{ToRotationMatrix()}}
{\footnotesize\ttfamily void Ogre\+::\+Quaternion\+::\+To\+Rotation\+Matrix (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_ogre_1_1_matrix3}{Matrix3}} \&}]{k\+Rot }\end{DoxyParamCaption}) const}



Referenced by Ogre\+::\+Matrix4\+::\+Matrix4().

\mbox{\Hypertarget{class_ogre_1_1_quaternion_ac3328c1bb86d17e870c57d52720e2e32}\label{class_ogre_1_1_quaternion_ac3328c1bb86d17e870c57d52720e2e32}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!FromAngleAxis@{FromAngleAxis}}
\index{FromAngleAxis@{FromAngleAxis}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{FromAngleAxis()}{FromAngleAxis()}}
{\footnotesize\ttfamily void Ogre\+::\+Quaternion\+::\+From\+Angle\+Axis (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{class_ogre_1_1_radian}{Radian}} \&}]{rf\+Angle,  }\item[{const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&}]{rk\+Axis }\end{DoxyParamCaption})}



Setups the quaternion using the supplied vector, and \char`\"{}roll\char`\"{} around that vector by the specified radians. 



Referenced by Ogre\+::\+Vector\+Base$<$ 3, Real $>$\+::random\+Deviant().

\mbox{\Hypertarget{class_ogre_1_1_quaternion_a814829e953cbf810c80a8b87626f6324}\label{class_ogre_1_1_quaternion_a814829e953cbf810c80a8b87626f6324}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!ToAngleAxis@{ToAngleAxis}}
\index{ToAngleAxis@{ToAngleAxis}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{ToAngleAxis()}{ToAngleAxis()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily void Ogre\+::\+Quaternion\+::\+To\+Angle\+Axis (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_ogre_1_1_radian}{Radian}} \&}]{rf\+Angle,  }\item[{\mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&}]{rk\+Axis }\end{DoxyParamCaption}) const}

\mbox{\Hypertarget{class_ogre_1_1_quaternion_a2fb2913d70c7c4ea6e0799187746401b}\label{class_ogre_1_1_quaternion_a2fb2913d70c7c4ea6e0799187746401b}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!ToAngleAxis@{ToAngleAxis}}
\index{ToAngleAxis@{ToAngleAxis}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{ToAngleAxis()}{ToAngleAxis()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily void Ogre\+::\+Quaternion\+::\+To\+Angle\+Axis (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_ogre_1_1_degree}{Degree}} \&}]{d\+Angle,  }\item[{\mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&}]{rk\+Axis }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}

\mbox{\Hypertarget{class_ogre_1_1_quaternion_a7ad7ad40e38bf351485c2a906c3949bb}\label{class_ogre_1_1_quaternion_a7ad7ad40e38bf351485c2a906c3949bb}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!FromAxes@{FromAxes}}
\index{FromAxes@{FromAxes}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{FromAxes()}{FromAxes()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily void Ogre\+::\+Quaternion\+::\+From\+Axes (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} $\ast$}]{ak\+Axis }\end{DoxyParamCaption})}



Constructs the quaternion using 3 axes, the axes are assumed to be orthonormal. 

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_ogre_1_1_quaternion_a7ad7ad40e38bf351485c2a906c3949bb}{From\+Axes}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{class_ogre_1_1_quaternion_a365bc3b10308318721199a829db03887}\label{class_ogre_1_1_quaternion_a365bc3b10308318721199a829db03887}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!FromAxes@{FromAxes}}
\index{FromAxes@{FromAxes}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{FromAxes()}{FromAxes()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily void Ogre\+::\+Quaternion\+::\+From\+Axes (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&}]{x\+Axis,  }\item[{const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&}]{y\+Axis,  }\item[{const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&}]{z\+Axis }\end{DoxyParamCaption})}

\mbox{\Hypertarget{class_ogre_1_1_quaternion_ae8227891cf00d8fc35bcd455c584f7b0}\label{class_ogre_1_1_quaternion_ae8227891cf00d8fc35bcd455c584f7b0}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!ToAxes@{ToAxes}}
\index{ToAxes@{ToAxes}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{ToAxes()}{ToAxes()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily void Ogre\+::\+Quaternion\+::\+To\+Axes (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} $\ast$}]{ak\+Axis }\end{DoxyParamCaption}) const}



Gets the 3 orthonormal axes defining the quaternion. 

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_ogre_1_1_quaternion_a7ad7ad40e38bf351485c2a906c3949bb}{From\+Axes}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{class_ogre_1_1_quaternion_ad4e2661546b7ac4e40b77f38a35ba8d9}\label{class_ogre_1_1_quaternion_ad4e2661546b7ac4e40b77f38a35ba8d9}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!ToAxes@{ToAxes}}
\index{ToAxes@{ToAxes}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{ToAxes()}{ToAxes()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily void Ogre\+::\+Quaternion\+::\+To\+Axes (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&}]{x\+Axis,  }\item[{\mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&}]{y\+Axis,  }\item[{\mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&}]{z\+Axis }\end{DoxyParamCaption}) const}

\mbox{\Hypertarget{class_ogre_1_1_quaternion_a58a45c5dd46ceee8dbf81dfced570dbe}\label{class_ogre_1_1_quaternion_a58a45c5dd46ceee8dbf81dfced570dbe}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!xAxis@{xAxis}}
\index{xAxis@{xAxis}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{xAxis()}{xAxis()}}
{\footnotesize\ttfamily \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} Ogre\+::\+Quaternion\+::x\+Axis (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const}



Returns the X orthonormal axis defining the quaternion. 

Same as doing x\+Axis = Vector3\+::\+U\+N\+I\+T\+\_\+X $\ast$ this. Also called the local X-\/axis \mbox{\Hypertarget{class_ogre_1_1_quaternion_aa4915f1a8047e3c8a0a9c380fe3ae695}\label{class_ogre_1_1_quaternion_aa4915f1a8047e3c8a0a9c380fe3ae695}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!yAxis@{yAxis}}
\index{yAxis@{yAxis}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{yAxis()}{yAxis()}}
{\footnotesize\ttfamily \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} Ogre\+::\+Quaternion\+::y\+Axis (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const}



Returns the Y orthonormal axis defining the quaternion. 

Same as doing y\+Axis = Vector3\+::\+U\+N\+I\+T\+\_\+Y $\ast$ this. Also called the local Y-\/axis \mbox{\Hypertarget{class_ogre_1_1_quaternion_a3c41f8bb4147db31ff9674a70de1aad5}\label{class_ogre_1_1_quaternion_a3c41f8bb4147db31ff9674a70de1aad5}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!zAxis@{zAxis}}
\index{zAxis@{zAxis}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{zAxis()}{zAxis()}}
{\footnotesize\ttfamily \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} Ogre\+::\+Quaternion\+::z\+Axis (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const}



Returns the Z orthonormal axis defining the quaternion. 

Same as doing z\+Axis = Vector3\+::\+U\+N\+I\+T\+\_\+Z $\ast$ this. Also called the local Z-\/axis \mbox{\Hypertarget{class_ogre_1_1_quaternion_a6367b543cf0d073d893139dd503b4fbd}\label{class_ogre_1_1_quaternion_a6367b543cf0d073d893139dd503b4fbd}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!operator=@{operator=}}
\index{operator=@{operator=}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{operator=()}{operator=()}}
{\footnotesize\ttfamily \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}}\& Ogre\+::\+Quaternion\+::operator= (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&}]{rkQ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



References w, x, y, and z.

\mbox{\Hypertarget{class_ogre_1_1_quaternion_aac3debd2245b0dcefff4ce2fda46eef1}\label{class_ogre_1_1_quaternion_aac3debd2245b0dcefff4ce2fda46eef1}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!operator+@{operator+}}
\index{operator+@{operator+}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{operator+()}{operator+()}}
{\footnotesize\ttfamily \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} Ogre\+::\+Quaternion\+::operator+ (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&}]{rkQ }\end{DoxyParamCaption}) const}

\mbox{\Hypertarget{class_ogre_1_1_quaternion_a98993e6f63209a39149d132623bbf41b}\label{class_ogre_1_1_quaternion_a98993e6f63209a39149d132623bbf41b}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!operator-\/@{operator-\/}}
\index{operator-\/@{operator-\/}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{operator-\/()}{operator-()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} Ogre\+::\+Quaternion\+::operator-\/ (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&}]{rkQ }\end{DoxyParamCaption}) const}

\mbox{\Hypertarget{class_ogre_1_1_quaternion_af05da43b746cf5b9bc2dcaf3aa4db2b9}\label{class_ogre_1_1_quaternion_af05da43b746cf5b9bc2dcaf3aa4db2b9}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!operator$\ast$@{operator$\ast$}}
\index{operator$\ast$@{operator$\ast$}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{operator$\ast$()}{operator*()}\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}}
{\footnotesize\ttfamily \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} Ogre\+::\+Quaternion\+::operator$\ast$ (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&}]{rkQ }\end{DoxyParamCaption}) const}

\mbox{\Hypertarget{class_ogre_1_1_quaternion_af6725db29a7dbc5d6a9071b86ce43714}\label{class_ogre_1_1_quaternion_af6725db29a7dbc5d6a9071b86ce43714}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!operator$\ast$@{operator$\ast$}}
\index{operator$\ast$@{operator$\ast$}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{operator$\ast$()}{operator*()}\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}}
{\footnotesize\ttfamily \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} Ogre\+::\+Quaternion\+::operator$\ast$ (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}}]{s }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}

\mbox{\Hypertarget{class_ogre_1_1_quaternion_a24b15dc994247753b7a8064b6a13e2d6}\label{class_ogre_1_1_quaternion_a24b15dc994247753b7a8064b6a13e2d6}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!operator-\/@{operator-\/}}
\index{operator-\/@{operator-\/}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{operator-\/()}{operator-()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} Ogre\+::\+Quaternion\+::operator-\/ (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}

\mbox{\Hypertarget{class_ogre_1_1_quaternion_af292a9ed18e3da0bda0fbe114f60cdec}\label{class_ogre_1_1_quaternion_af292a9ed18e3da0bda0fbe114f60cdec}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!operator==@{operator==}}
\index{operator==@{operator==}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{operator==()}{operator==()}}
{\footnotesize\ttfamily bool Ogre\+::\+Quaternion\+::operator== (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&}]{rhs }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



References w, x, y, and z.

\mbox{\Hypertarget{class_ogre_1_1_quaternion_aec199d4e6af6c82c4026d012eae570cb}\label{class_ogre_1_1_quaternion_aec199d4e6af6c82c4026d012eae570cb}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!operator"!=@{operator"!=}}
\index{operator"!=@{operator"!=}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{operator"!=()}{operator!=()}}
{\footnotesize\ttfamily bool Ogre\+::\+Quaternion\+::operator!= (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&}]{rhs }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



References Ogre\+::operator==().

\mbox{\Hypertarget{class_ogre_1_1_quaternion_a9e14e6aa96e714397b31929299ca681d}\label{class_ogre_1_1_quaternion_a9e14e6aa96e714397b31929299ca681d}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!Dot@{Dot}}
\index{Dot@{Dot}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{Dot()}{Dot()}}
{\footnotesize\ttfamily \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} Ogre\+::\+Quaternion\+::\+Dot (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&}]{rkQ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Returns the dot product of the quaternion. 



References w, x, y, and z.

\mbox{\Hypertarget{class_ogre_1_1_quaternion_a353aafd21ec10c8c07f04472ae6c32b8}\label{class_ogre_1_1_quaternion_a353aafd21ec10c8c07f04472ae6c32b8}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!Norm@{Norm}}
\index{Norm@{Norm}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{Norm()}{Norm()}}
{\footnotesize\ttfamily \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} Ogre\+::\+Quaternion\+::\+Norm (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Returns the normal length of this quaternion. 



References Ogre\+::\+Math\+::\+Sqrt().

\mbox{\Hypertarget{class_ogre_1_1_quaternion_aee94ec9c7de50fe7f774ae4c7e760b65}\label{class_ogre_1_1_quaternion_aee94ec9c7de50fe7f774ae4c7e760b65}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!normalise@{normalise}}
\index{normalise@{normalise}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{normalise()}{normalise()}}
{\footnotesize\ttfamily \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} Ogre\+::\+Quaternion\+::normalise (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Normalises this quaternion, and returns the previous length. 



Referenced by Ogre\+::\+Vector\+Base$<$ 3, Real $>$\+::get\+Rotation\+To().

\mbox{\Hypertarget{class_ogre_1_1_quaternion_ae370a6b879cf4d03fb85d8ce510705c1}\label{class_ogre_1_1_quaternion_ae370a6b879cf4d03fb85d8ce510705c1}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!Inverse@{Inverse}}
\index{Inverse@{Inverse}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{Inverse()}{Inverse()}}
{\footnotesize\ttfamily \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} Ogre\+::\+Quaternion\+::\+Inverse (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const}

\mbox{\Hypertarget{class_ogre_1_1_quaternion_a821a464cce9a81d5d20c620025043851}\label{class_ogre_1_1_quaternion_a821a464cce9a81d5d20c620025043851}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!UnitInverse@{UnitInverse}}
\index{UnitInverse@{UnitInverse}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{UnitInverse()}{UnitInverse()}}
{\footnotesize\ttfamily \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} Ogre\+::\+Quaternion\+::\+Unit\+Inverse (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const}



Apply to non-\/zero quaternion. 

\mbox{\Hypertarget{class_ogre_1_1_quaternion_ae9c8590b89ed8c8b48a5f188383aeadc}\label{class_ogre_1_1_quaternion_ae9c8590b89ed8c8b48a5f188383aeadc}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!Exp@{Exp}}
\index{Exp@{Exp}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{Exp()}{Exp()}}
{\footnotesize\ttfamily \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} Ogre\+::\+Quaternion\+::\+Exp (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const}



Apply to unit-\/length quaternion. 

\mbox{\Hypertarget{class_ogre_1_1_quaternion_a4f89136f9dcb79fef8c47dc418e3e55f}\label{class_ogre_1_1_quaternion_a4f89136f9dcb79fef8c47dc418e3e55f}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!Log@{Log}}
\index{Log@{Log}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{Log()}{Log()}}
{\footnotesize\ttfamily \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} Ogre\+::\+Quaternion\+::\+Log (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const}

\mbox{\Hypertarget{class_ogre_1_1_quaternion_a535ef1c199eee303753507a4a78ddf22}\label{class_ogre_1_1_quaternion_a535ef1c199eee303753507a4a78ddf22}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!operator$\ast$@{operator$\ast$}}
\index{operator$\ast$@{operator$\ast$}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{operator$\ast$()}{operator*()}\hspace{0.1cm}{\footnotesize\ttfamily [3/3]}}
{\footnotesize\ttfamily \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} Ogre\+::\+Quaternion\+::operator$\ast$ (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&}]{rk\+Vector }\end{DoxyParamCaption}) const}



Rotation of a vector by a quaternion. 

\mbox{\Hypertarget{class_ogre_1_1_quaternion_ae23d3f973fd0f8ac9f188cd513823e3e}\label{class_ogre_1_1_quaternion_ae23d3f973fd0f8ac9f188cd513823e3e}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!getRoll@{getRoll}}
\index{getRoll@{getRoll}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{getRoll()}{getRoll()}}
{\footnotesize\ttfamily \mbox{\hyperlink{class_ogre_1_1_radian}{Radian}} Ogre\+::\+Quaternion\+::get\+Roll (\begin{DoxyParamCaption}\item[{bool}]{reproject\+Axis = {\ttfamily true} }\end{DoxyParamCaption}) const}



Calculate the local roll element of this quaternion. 


\begin{DoxyParams}{Parameters}
{\em reproject\+Axis} & By default the method returns the \textquotesingle{}intuitive\textquotesingle{} result that is, if you projected the local X of the quaternion onto the XY plane, the angle between it and global X is returned. The co-\/domain of the returned value is from -\/180 to 180 degrees. If set to false though, the result is the rotation around Z axis that could be used to implement the quaternion using some non-\/intuitive order of rotations. This behavior is preserved for backward compatibility, to decompose quaternion into yaw, pitch and roll use q.\+To\+Rotation\+Matrix().To\+Euler\+Angles\+Y\+X\+Z(yaw, pitch, roll) instead. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_ogre_1_1_quaternion_ae4ffd43e74b8b07ddfbc5810a9e6e7ad}\label{class_ogre_1_1_quaternion_ae4ffd43e74b8b07ddfbc5810a9e6e7ad}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!getPitch@{getPitch}}
\index{getPitch@{getPitch}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{getPitch()}{getPitch()}}
{\footnotesize\ttfamily \mbox{\hyperlink{class_ogre_1_1_radian}{Radian}} Ogre\+::\+Quaternion\+::get\+Pitch (\begin{DoxyParamCaption}\item[{bool}]{reproject\+Axis = {\ttfamily true} }\end{DoxyParamCaption}) const}



Calculate the local pitch element of this quaternion. 


\begin{DoxyParams}{Parameters}
{\em reproject\+Axis} & By default the method returns the \textquotesingle{}intuitive\textquotesingle{} result that is, if you projected the local Y of the quaternion onto the YZ plane, the angle between it and global Y is returned. The co-\/domain of the returned value is from -\/180 to 180 degrees. If set to false though, the result is the rotation around X axis that could be used to implement the quaternion using some non-\/intuitive order of rotations. This behavior is preserved for backward compatibility, to decompose quaternion into yaw, pitch and roll use q.\+To\+Rotation\+Matrix().To\+Euler\+Angles\+Y\+X\+Z(yaw, pitch, roll) instead. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_ogre_1_1_quaternion_a15c912e62c9abcb3335de205cdf30c2d}\label{class_ogre_1_1_quaternion_a15c912e62c9abcb3335de205cdf30c2d}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!getYaw@{getYaw}}
\index{getYaw@{getYaw}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{getYaw()}{getYaw()}}
{\footnotesize\ttfamily \mbox{\hyperlink{class_ogre_1_1_radian}{Radian}} Ogre\+::\+Quaternion\+::get\+Yaw (\begin{DoxyParamCaption}\item[{bool}]{reproject\+Axis = {\ttfamily true} }\end{DoxyParamCaption}) const}



Calculate the local yaw element of this quaternion. 


\begin{DoxyParams}{Parameters}
{\em reproject\+Axis} & By default the method returns the \textquotesingle{}intuitive\textquotesingle{} result that is, if you projected the local Z of the quaternion onto the ZX plane, the angle between it and global Z is returned. The co-\/domain of the returned value is from -\/180 to 180 degrees. If set to false though, the result is the rotation around Y axis that could be used to implement the quaternion using some non-\/intuitive order of rotations. This behavior is preserved for backward compatibility, to decompose quaternion into yaw, pitch and roll use q.\+To\+Rotation\+Matrix().To\+Euler\+Angles\+Y\+X\+Z(yaw, pitch, roll) instead. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_ogre_1_1_quaternion_aaf249bc76b399f92c0c2f93377b032ab}\label{class_ogre_1_1_quaternion_aaf249bc76b399f92c0c2f93377b032ab}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!equals@{equals}}
\index{equals@{equals}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{equals()}{equals()}}
{\footnotesize\ttfamily bool Ogre\+::\+Quaternion\+::equals (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&}]{rhs,  }\item[{const \mbox{\hyperlink{class_ogre_1_1_radian}{Radian}} \&}]{tolerance }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Equality with tolerance (tolerance is max angle difference) 

\begin{DoxyRemark}{Remarks}
Both \mbox{\hyperlink{class_ogre_1_1_quaternion_aaf249bc76b399f92c0c2f93377b032ab}{equals()}} and \mbox{\hyperlink{class_ogre_1_1_quaternion_a1df622b500ec13bf405155274e23aa32}{orientation\+Equals()}} measure the exact same thing. One measures the difference by angle, the other by a different, non-\/linear metric. 
\end{DoxyRemark}


References Ogre\+::\+Math\+::\+Abs(), Ogre\+::\+Math\+::\+A\+Cos(), and Ogre\+::\+Radian\+::value\+Radians().

\mbox{\Hypertarget{class_ogre_1_1_quaternion_a1df622b500ec13bf405155274e23aa32}\label{class_ogre_1_1_quaternion_a1df622b500ec13bf405155274e23aa32}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!orientationEquals@{orientationEquals}}
\index{orientationEquals@{orientationEquals}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{orientationEquals()}{orientationEquals()}}
{\footnotesize\ttfamily bool Ogre\+::\+Quaternion\+::orientation\+Equals (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&}]{other,  }\item[{\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}}]{tolerance = {\ttfamily 1e-\/3f} }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Compare two quaternions which are assumed to be used as orientations. 

\begin{DoxyRemark}{Remarks}
Both \mbox{\hyperlink{class_ogre_1_1_quaternion_aaf249bc76b399f92c0c2f93377b032ab}{equals()}} and \mbox{\hyperlink{class_ogre_1_1_quaternion_a1df622b500ec13bf405155274e23aa32}{orientation\+Equals()}} measure the exact same thing. One measures the difference by angle, the other by a different, non-\/linear metric. 
\end{DoxyRemark}
\begin{DoxyReturn}{Returns}
true if the two orientations are the same or very close, relative to the given tolerance. Slerp ( 0.\+75f, A, B ) != Slerp ( 0.\+25f, B, A ); therefore be careful if your code relies in the order of the operands. This is specially important in IK animation. 
\end{DoxyReturn}
\mbox{\Hypertarget{class_ogre_1_1_quaternion_ab0c47f1a7308ac4c17db9f9ddb6e4a72}\label{class_ogre_1_1_quaternion_ab0c47f1a7308ac4c17db9f9ddb6e4a72}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!Slerp@{Slerp}}
\index{Slerp@{Slerp}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{Slerp()}{Slerp()}}
{\footnotesize\ttfamily static \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} Ogre\+::\+Quaternion\+::\+Slerp (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}}]{fT,  }\item[{const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&}]{rkP,  }\item[{const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&}]{rkQ,  }\item[{bool}]{shortest\+Path = {\ttfamily false} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Performs Spherical linear interpolation between two quaternions, and returns the result. 

Slerp ( 0.\+0f, A, B ) = A Slerp ( 1.\+0f, A, B ) = B \begin{DoxyReturn}{Returns}
Interpolated quaternion 
\end{DoxyReturn}
\begin{DoxyRemark}{Remarks}
Slerp has the proprieties of performing the interpolation at constant velocity, and being torque-\/minimal (unless shortest\+Path=false). However, it\textquotesingle{}s N\+OT commutative, which means Slerp ( 0.\+75f, A, B ) != Slerp ( 0.\+25f, B, A ); therefore be careful if your code relies in the order of the operands. This is specially important in IK animation. 
\end{DoxyRemark}
\mbox{\Hypertarget{class_ogre_1_1_quaternion_a25fb3bc0f11e6a676fb5c47347a79579}\label{class_ogre_1_1_quaternion_a25fb3bc0f11e6a676fb5c47347a79579}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!SlerpExtraSpins@{SlerpExtraSpins}}
\index{SlerpExtraSpins@{SlerpExtraSpins}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{SlerpExtraSpins()}{SlerpExtraSpins()}}
{\footnotesize\ttfamily static \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} Ogre\+::\+Quaternion\+::\+Slerp\+Extra\+Spins (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}}]{fT,  }\item[{const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&}]{rkP,  }\item[{const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&}]{rkQ,  }\item[{int}]{i\+Extra\+Spins }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_ogre_1_1_quaternion_ab0c47f1a7308ac4c17db9f9ddb6e4a72}{Slerp}}. It adds extra \char`\"{}spins\char`\"{} (i.\+e. rotates several times) specified by parameter \textquotesingle{}i\+Extra\+Spins\textquotesingle{} while interpolating before arriving to the final values 
\end{DoxySeeAlso}
\mbox{\Hypertarget{class_ogre_1_1_quaternion_a838d0736819d496073d99f3f74d0cac1}\label{class_ogre_1_1_quaternion_a838d0736819d496073d99f3f74d0cac1}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!Intermediate@{Intermediate}}
\index{Intermediate@{Intermediate}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{Intermediate()}{Intermediate()}}
{\footnotesize\ttfamily static void Ogre\+::\+Quaternion\+::\+Intermediate (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&}]{rk\+Q0,  }\item[{const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&}]{rk\+Q1,  }\item[{const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&}]{rk\+Q2,  }\item[{\mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&}]{rka,  }\item[{\mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&}]{rkB }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Setup for spherical quadratic interpolation. 

\mbox{\Hypertarget{class_ogre_1_1_quaternion_a5f43da8b8aa579e02035eecff89e16a5}\label{class_ogre_1_1_quaternion_a5f43da8b8aa579e02035eecff89e16a5}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!Squad@{Squad}}
\index{Squad@{Squad}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{Squad()}{Squad()}}
{\footnotesize\ttfamily static \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} Ogre\+::\+Quaternion\+::\+Squad (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}}]{fT,  }\item[{const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&}]{rkP,  }\item[{const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&}]{rkA,  }\item[{const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&}]{rkB,  }\item[{const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&}]{rkQ,  }\item[{bool}]{shortest\+Path = {\ttfamily false} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Spherical quadratic interpolation. 

\mbox{\Hypertarget{class_ogre_1_1_quaternion_a16987149991882e148170fe3f1c7da4b}\label{class_ogre_1_1_quaternion_a16987149991882e148170fe3f1c7da4b}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!nlerp@{nlerp}}
\index{nlerp@{nlerp}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{nlerp()}{nlerp()}}
{\footnotesize\ttfamily static \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} Ogre\+::\+Quaternion\+::nlerp (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}}]{fT,  }\item[{const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&}]{rkP,  }\item[{const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&}]{rkQ,  }\item[{bool}]{shortest\+Path = {\ttfamily false} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Performs Normalised linear interpolation between two quaternions, and returns the result. 

nlerp ( 0.\+0f, A, B ) = A nlerp ( 1.\+0f, A, B ) = B \begin{DoxyRemark}{Remarks}
Nlerp is faster than Slerp. Nlerp has the proprieties of being commutative (
\end{DoxyRemark}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_ogre_1_1_quaternion_ab0c47f1a7308ac4c17db9f9ddb6e4a72}{Slerp}}; commutativity is desired in certain places, like IK animation), and being torque-\/minimal (unless shortest\+Path=false). However, it\textquotesingle{}s performing the interpolation at non-\/constant velocity; sometimes this is desired, sometimes it is not. Having a non-\/constant velocity can produce a more natural rotation feeling without the need of tweaking the weights; however if your scene relies on the timing of the rotation or assumes it will point at a specific angle at a specific weight value, \mbox{\hyperlink{class_ogre_1_1_quaternion_ab0c47f1a7308ac4c17db9f9ddb6e4a72}{Slerp}} is a better choice. 
\end{DoxySeeAlso}
\mbox{\Hypertarget{class_ogre_1_1_quaternion_ac566d9e46f5c1b6368047c132e82a829}\label{class_ogre_1_1_quaternion_ac566d9e46f5c1b6368047c132e82a829}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!isNaN@{isNaN}}
\index{isNaN@{isNaN}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{isNaN()}{isNaN()}}
{\footnotesize\ttfamily bool Ogre\+::\+Quaternion\+::is\+NaN (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Check whether this quaternion contains valid values. 



References Ogre\+::\+Math\+::is\+Na\+N().



\doxysubsection{Friends And Related Function Documentation}
\mbox{\Hypertarget{class_ogre_1_1_quaternion_a4aea5016e6a48eebee6a31f0a298825e}\label{class_ogre_1_1_quaternion_a4aea5016e6a48eebee6a31f0a298825e}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!operator$\ast$@{operator$\ast$}}
\index{operator$\ast$@{operator$\ast$}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{operator$\ast$}{operator*}}
{\footnotesize\ttfamily \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} operator$\ast$ (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}}]{s,  }\item[{const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&}]{q }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [friend]}}

\mbox{\Hypertarget{class_ogre_1_1_quaternion_a60829c0f8f2a36602ab5fdbb1a79b635}\label{class_ogre_1_1_quaternion_a60829c0f8f2a36602ab5fdbb1a79b635}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!operator$<$$<$@{operator$<$$<$}}
\index{operator$<$$<$@{operator$<$$<$}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{operator$<$$<$}{operator<<}}
{\footnotesize\ttfamily std\+::ostream\& operator$<$$<$ (\begin{DoxyParamCaption}\item[{std\+::ostream \&}]{o,  }\item[{const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} \&}]{q }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [friend]}}



Function for writing to a stream. 

Outputs \char`\"{}\+Quaternion(w, x, y, z)\char`\"{} with w,x,y,z being the member values of the quaternion. 

\doxysubsection{Member Data Documentation}
\mbox{\Hypertarget{class_ogre_1_1_quaternion_a6b53296360cc166c62533cff8f1edcc2}\label{class_ogre_1_1_quaternion_a6b53296360cc166c62533cff8f1edcc2}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!msEpsilon@{msEpsilon}}
\index{msEpsilon@{msEpsilon}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{msEpsilon}{msEpsilon}}
{\footnotesize\ttfamily const \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} Ogre\+::\+Quaternion\+::ms\+Epsilon\hspace{0.3cm}{\ttfamily [static]}}



Cutoff for sine near zero. 

\mbox{\Hypertarget{class_ogre_1_1_quaternion_a44f3c000c8f1ea2759c2e724e04bf86b}\label{class_ogre_1_1_quaternion_a44f3c000c8f1ea2759c2e724e04bf86b}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!ZERO@{ZERO}}
\index{ZERO@{ZERO}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{ZERO}{ZERO}}
{\footnotesize\ttfamily const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} Ogre\+::\+Quaternion\+::\+Z\+E\+RO\hspace{0.3cm}{\ttfamily [static]}}

\mbox{\Hypertarget{class_ogre_1_1_quaternion_a441b8d52549e1dedec27420325a313ef}\label{class_ogre_1_1_quaternion_a441b8d52549e1dedec27420325a313ef}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!IDENTITY@{IDENTITY}}
\index{IDENTITY@{IDENTITY}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{IDENTITY}{IDENTITY}}
{\footnotesize\ttfamily const \mbox{\hyperlink{class_ogre_1_1_quaternion}{Quaternion}} Ogre\+::\+Quaternion\+::\+I\+D\+E\+N\+T\+I\+TY\hspace{0.3cm}{\ttfamily [static]}}



Referenced by Ogre\+::\+Vector\+Base$<$ 3, Real $>$\+::get\+Rotation\+To().

\mbox{\Hypertarget{class_ogre_1_1_quaternion_af3424f1e07092c0ffe293d18b277a04f}\label{class_ogre_1_1_quaternion_af3424f1e07092c0ffe293d18b277a04f}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!w@{w}}
\index{w@{w}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{w}{w}}
{\footnotesize\ttfamily \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} Ogre\+::\+Quaternion\+::w}



Referenced by Dot(), operator=(), operator==(), and swap().

\mbox{\Hypertarget{class_ogre_1_1_quaternion_a32c5680516b41bc4ba3159bf4d4abaf1}\label{class_ogre_1_1_quaternion_a32c5680516b41bc4ba3159bf4d4abaf1}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!x@{x}}
\index{x@{x}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{x}{x}}
{\footnotesize\ttfamily \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} Ogre\+::\+Quaternion\+::x}



Referenced by Dot(), operator=(), operator==(), and swap().

\mbox{\Hypertarget{class_ogre_1_1_quaternion_aa7328cd3883a92ee9c9322805d038f11}\label{class_ogre_1_1_quaternion_aa7328cd3883a92ee9c9322805d038f11}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!y@{y}}
\index{y@{y}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{y}{y}}
{\footnotesize\ttfamily \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} Ogre\+::\+Quaternion\+::y}



Referenced by Dot(), operator=(), operator==(), and swap().

\mbox{\Hypertarget{class_ogre_1_1_quaternion_a31ec84a931236554c0c17e37bf5ace97}\label{class_ogre_1_1_quaternion_a31ec84a931236554c0c17e37bf5ace97}} 
\index{Ogre::Quaternion@{Ogre::Quaternion}!z@{z}}
\index{z@{z}!Ogre::Quaternion@{Ogre::Quaternion}}
\doxysubsubsection{\texorpdfstring{z}{z}}
{\footnotesize\ttfamily \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} Ogre\+::\+Quaternion\+::z}



Referenced by Dot(), operator=(), operator==(), and swap().



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{_ogre_quaternion_8h}{Ogre\+Quaternion.\+h}}\end{DoxyCompactItemize}
