<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>mrpt::math::CQuaternion Class Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <div align="left"><a href="http://www.mrpt.org/">Main MRPT website</a> > <b>C++ reference</b> </div> <div align="right"> <a href="index.html"><img border="0" src="mrpt_logo.png" alt="MRPT logo"></a> </div> <!-- Generated by Doxygen 1.7.5 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <div class="left"> <form id="FSearchBox" action="search.php" method="get"> <img id="MSearchSelect" src="search/mag.png" alt=""/> <input type="text" id="MSearchField" name="query" value="Search" size="20" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)"/> </form> </div><div class="right"></div> </div> </li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="classes.html"><span>Class Index</span></a></li> <li><a href="inherits.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="namespacemrpt.html">mrpt</a> </li> <li class="navelem"><a class="el" href="namespacemrpt_1_1math.html">math</a> </li> <li class="navelem"><a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html">CQuaternion</a> </li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#pri-types">Private Types</a> </div> <div class="headertitle"> <div class="title">mrpt::math::CQuaternion Class Reference<div class="ingroups"><a class="el" href="group__mrpt__base__grp.html">[mrpt-base]</a></div></div> </div> </div> <div class="contents"> <!-- doxytag: class="mrpt::math::CQuaternion" --><!-- doxytag: inherits="CArrayNumeric< T, 4 >" --><hr/><a name="details" id="details"></a><h2>Detailed Description</h2> <div class="textblock"><p>A quaternion, which can represent a 3D rotation as pair <img class="formulaInl" alt="$ (r,\mathbf{u}) $" src="form_5.png"/>, with a real part "r" and a 3D vector <img class="formulaInl" alt="$ \mathbf{u} = (x,y,z) $" src="form_6.png"/>, or alternatively, q = r + ix + jy + kz. </p> <p>The elements of the quaternion can be accessed by either:</p> <ul> <li><a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html#afa2a076acbb5ccc3cf899747fbe1e1dc" title="Return r coordinate of the quaternion.">r()</a>, <a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html#a3384d0bef93b72e6ded749fc178c479a" title="Return x coordinate of the quaternion.">x()</a>, <a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html#ae4e990ee1f1d6ac67cc02a68a59ffba9" title="Return y coordinate of the quaternion.">y()</a>, <a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html#a19dd28d34573a39dea1695900cb7a2e1" title="Return z coordinate of the quaternion.">z()</a>, or</li> <li>the operator [] with indices running from 0 (=r) to 3 (=z).</li> </ul> <p>Users will usually employ the typedef "CQuaternionDouble" instead of this template.</p> <p>For more information about quaternions, see:</p> <ul> <li><a href="http://people.csail.mit.edu/bkph/articles/Quaternions.pdf">http://people.csail.mit.edu/bkph/articles/Quaternions.pdf</a></li> <li><a href="http://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation">http://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation</a></li> </ul> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classmrpt_1_1poses_1_1_c_pose3_d.html" title="A class used to store a 3D pose (a 3D translation + a rotation in 3D).">mrpt::poses::CPose3D</a> </dd></dl> </div> <p><code>#include <<a class="el" href="_c_quaternion_8h_source.html">mrpt/math/CQuaternion.h</a>></code></p> <div class="dynheader"> Inheritance diagram for mrpt::math::CQuaternion:</div> <div class="dyncontent"> <div class="center"><img src="classmrpt_1_1math_1_1_c_quaternion__inherit__graph.png" border="0" usemap="#mrpt_1_1math_1_1_c_quaternion_inherit__map" alt="Inheritance graph"/></div> <map name="mrpt_1_1math_1_1_c_quaternion_inherit__map" id="mrpt_1_1math_1_1_c_quaternion_inherit__map"> <area shape="rect" id="node15" href="classmrpt_1_1math_1_1_c_quaternion.html" title="mrpt::math::CQuaternion\< double \>" alt="" coords="2555,7,2783,33"/><area shape="rect" id="node2" href="classmrpt_1_1math_1_1_c_array_numeric.html" title="mrpt::math::CArrayNumeric\< T, 4 \>" alt="" coords="1990,7,2221,33"/><area shape="rect" id="node4" href="classmrpt_1_1math_1_1_c_array_numeric.html" title="CArrayNumeric is an array for numeric types supporting several mathematical operations (actually..." alt="" coords="1705,7,1887,33"/><area shape="rect" id="node6" href="class_eigen_1_1_matrix.html" title="Eigen::Matrix\< T, N, 1 \>" alt="" coords="1489,7,1653,33"/><area shape="rect" id="node8" href="class_eigen_1_1_matrix.html" title="The matrix class, also used for vectors and row-vectors." alt="" coords="1272,7,1371,33"/><area shape="rect" id="node10" href="class_eigen_1_1_plain_object_base.html" title="Eigen::PlainObjectBase\< Matrix\< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols \> \>" alt="" coords="641,7,1221,33"/><area shape="rect" id="node12" href="class_eigen_1_1_plain_object_base.html" title="Dense storage base class for matrices and arrays." alt="" coords="5,7,165,33"/></map> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <p><a href="classmrpt_1_1math_1_1_c_quaternion-members.html">List of all members.</a></p> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr><td colspan="2"><div class="groupHeader"></div></td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html#abce802fa76e3481f6c99aad27b0cb184">CQuaternion</a> (<a class="el" href="namespacemrpt_1_1math.html#a8ab289d85828809b390d477f824a908a">TConstructorFlags_Quaternions</a> constructor_dummy_param)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Can be used with UNINITIALIZED_QUATERNION as argument, does not initialize the 4 elements of the quaternion (use this constructor when speed is critical). <a href="#abce802fa76e3481f6c99aad27b0cb184"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html#a7e483f7e8c686bd98db13f5f1a65094c">CQuaternion</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor: construct a (1, (0,0,0) ) quaternion representing no rotation. <a href="#a7e483f7e8c686bd98db13f5f1a65094c"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html#adcaaed4fa688755a4c67cdbb9625af5f">CQuaternion</a> (const T r, const T x, const T y, const T z)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Construct a quaternion from its parameters 'r', 'x', 'y', 'z', with q = r + ix + jy + kz. <a href="#adcaaed4fa688755a4c67cdbb9625af5f"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">T </td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html#afa2a076acbb5ccc3cf899747fbe1e1dc">r</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return r coordinate of the quaternion. <a href="#afa2a076acbb5ccc3cf899747fbe1e1dc"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">T </td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html#a3384d0bef93b72e6ded749fc178c479a">x</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return x coordinate of the quaternion. <a href="#a3384d0bef93b72e6ded749fc178c479a"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">T </td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html#ae4e990ee1f1d6ac67cc02a68a59ffba9">y</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return y coordinate of the quaternion. <a href="#ae4e990ee1f1d6ac67cc02a68a59ffba9"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">T </td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html#a19dd28d34573a39dea1695900cb7a2e1">z</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return z coordinate of the quaternion. <a href="#a19dd28d34573a39dea1695900cb7a2e1"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html#a96f1e3d33afabaa3c301c26e43cf2f72">r</a> (const T r)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set r coordinate of the quaternion. <a href="#a96f1e3d33afabaa3c301c26e43cf2f72"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html#a3b12f8ed65efa2d485fe4314da4c6054">x</a> (const T x)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set x coordinate of the quaternion. <a href="#a3b12f8ed65efa2d485fe4314da4c6054"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html#a7647915dd59f4c7e9ce973b676bd5b98">y</a> (const T y)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set y coordinate of the quaternion. <a href="#a7647915dd59f4c7e9ce973b676bd5b98"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html#ae41e503dc4db2ded94ffa3ad325293db">z</a> (const T z)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set z coordinate of the quaternion. <a href="#ae41e503dc4db2ded94ffa3ad325293db"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<class ARRAYLIKE > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html#aa90eda234f74977c51b4cea049280780">fromRodriguesVector</a> (const ARRAYLIKE &in)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set this quaternion to the rotation described by a 3D Rodrigues rotation vector. <a href="#aa90eda234f74977c51b4cea049280780"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html#a5734caf259b563fc2bb24b862ea780bd">crossProduct</a> (const <a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html">CQuaternion</a> &q1, const <a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html">CQuaternion</a> &q2)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Calculate the "cross" product (or "composed rotation") of two quaternion: this = q1 x q2 After the operation, "this" will represent the composed rotations of q1 and q2 (q2 applied "after" q1). <a href="#a5734caf259b563fc2bb24b862ea780bd"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html#a6d4c113c163aea8aa1cf69ac22d378bb">rotatePoint</a> (const double lx, const double ly, const double lz, double &gx, double &gy, double &gz) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Rotate a 3D point (lx,ly,lz) -> (gx,gy,gz) as described by this quaternion. <a href="#a6d4c113c163aea8aa1cf69ac22d378bb"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html#ac0a646cae90d37412f950c6c09dc9115">inverseRotatePoint</a> (const double lx, const double ly, const double lz, double &gx, double &gy, double &gz) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Rotate a 3D point (lx,ly,lz) -> (gx,gy,gz) as described by the inverse (conjugate) of this quaternion. <a href="#ac0a646cae90d37412f950c6c09dc9115"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html#a409be4f6b23e66c2bee70da319d05525">normSqr</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return the squared norm of the quaternion. <a href="#a409be4f6b23e66c2bee70da319d05525"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html#a554edb930bf463d2dc566552823b6ff6">normalize</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Normalize this quaternion, so its norm becomes the unitity. <a href="#a554edb930bf463d2dc566552823b6ff6"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<class MATRIXLIKE > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html#ac4ecfa54ce8f0a876eff9d1626eca609">normalizationJacobian</a> (MATRIXLIKE &J) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Calculate the 4x4 Jacobian of the normalization operation of this quaternion. <a href="#ac4ecfa54ce8f0a876eff9d1626eca609"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<class MATRIXLIKE > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html#afffa513496f7f3545af9b437e7661f1a">rotationJacobian</a> (MATRIXLIKE &J) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Compute the Jacobian of the rotation composition operation <img class="formulaInl" alt="$ p = f(\cdot) = q_{this} \times r $" src="form_7.png"/>, that is the 4x4 matrix <img class="formulaInl" alt="$ \frac{\partial f}{\partial q_{this} } $" src="form_8.png"/>. <a href="#afffa513496f7f3545af9b437e7661f1a"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<class MATRIXLIKE > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html#ae56fd8f737fde43ba87f83e858c636d4">rotationMatrix</a> (MATRIXLIKE &M) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Calculate the 3x3 rotation matrix associated to this quaternion. <a href="#ae56fd8f737fde43ba87f83e858c636d4"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<class MATRIXLIKE > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html#aaf08e5c7f517bdc2b5eca9439174ccda">rotationMatrixNoResize</a> (MATRIXLIKE &M) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Fill out the top-left 3x3 block of the given matrix with the rotation matrix associated to this quaternion (does not resize the matrix, for that, see rotationMatrix) <a href="#aaf08e5c7f517bdc2b5eca9439174ccda"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html#ad72a40f99f104ab7713fa96d5a1e13eb">conj</a> (<a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html">CQuaternion</a> &q_out) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return the conjugate quaternion. <a href="#ad72a40f99f104ab7713fa96d5a1e13eb"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html">CQuaternion</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html#a4b6e2c9948bfd52fe7ba57e44e54fa48">conj</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return the conjugate quaternion. <a href="#a4b6e2c9948bfd52fe7ba57e44e54fa48"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html#a0b5137036a7dcae90740b9d49a55c24f">rpy</a> (T &roll, T &pitch, T &yaw) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return the yaw, pitch & roll angles associated to quaternion. <a href="#a0b5137036a7dcae90740b9d49a55c24f"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<class MATRIXLIKE > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html#ad624ce2e5d2880b5b7f96dfbc13293d9">rpy_and_jacobian</a> (T &roll, T &pitch, T &yaw, MATRIXLIKE *out_dr_dq=NULL, bool resize_out_dr_dq_to3x4=true) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return the yaw, pitch & roll angles associated to quaternion, and (optionally) the 3x4 Jacobian of the transformation. <a href="#ad624ce2e5d2880b5b7f96dfbc13293d9"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html">CQuaternion</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html#a09bdc4f9912b5759b4b75c6f39c62df4">operator*</a> (const T &factor)</td></tr> <tr><td colspan="2"><h2><a name="pri-types"></a> Private Types</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classmrpt_1_1math_1_1_c_array_numeric.html">CArrayNumeric</a>< T, 4 > </td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html#a15d61e09fd7d5a035e455b84069356d8">Base</a></td></tr> </table> <hr/><h2>Member Typedef Documentation</h2> <a class="anchor" id="a15d61e09fd7d5a035e455b84069356d8"></a><!-- doxytag: member="mrpt::math::CQuaternion::Base" ref="a15d61e09fd7d5a035e455b84069356d8" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">typedef <a class="el" href="classmrpt_1_1math_1_1_c_array_numeric.html">CArrayNumeric</a><T,4> <a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html#a15d61e09fd7d5a035e455b84069356d8">mrpt::math::CQuaternion::Base</a><code> [private]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Reimplemented from <a class="el" href="classmrpt_1_1math_1_1_c_array_numeric.html#adba71632a06604a7ddb31653c1e92f21">mrpt::math::CArrayNumeric< T, 4 ></a>.</p> <p>Definition at line <a class="el" href="_c_quaternion_8h_source.html#l00063">63</a> of file <a class="el" href="_c_quaternion_8h_source.html">CQuaternion.h</a>.</p> </div> </div> <hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="abce802fa76e3481f6c99aad27b0cb184"></a><!-- doxytag: member="mrpt::math::CQuaternion::CQuaternion" ref="abce802fa76e3481f6c99aad27b0cb184" args="(TConstructorFlags_Quaternions constructor_dummy_param)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">mrpt::math::CQuaternion::CQuaternion </td> <td>(</td> <td class="paramtype"><a class="el" href="namespacemrpt_1_1math.html#a8ab289d85828809b390d477f824a908a">TConstructorFlags_Quaternions</a> </td> <td class="paramname"><em>constructor_dummy_param</em></td><td>)</td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Can be used with UNINITIALIZED_QUATERNION as argument, does not initialize the 4 elements of the quaternion (use this constructor when speed is critical). </p> <p>Definition at line <a class="el" href="_c_quaternion_8h_source.html#l00069">69</a> of file <a class="el" href="_c_quaternion_8h_source.html">CQuaternion.h</a>.</p> </div> </div> <a class="anchor" id="a7e483f7e8c686bd98db13f5f1a65094c"></a><!-- doxytag: member="mrpt::math::CQuaternion::CQuaternion" ref="a7e483f7e8c686bd98db13f5f1a65094c" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">mrpt::math::CQuaternion::CQuaternion </td> <td>(</td> <td class="paramname"></td><td>)</td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Default constructor: construct a (1, (0,0,0) ) quaternion representing no rotation. </p> <p>Definition at line <a class="el" href="_c_quaternion_8h_source.html#l00072">72</a> of file <a class="el" href="_c_quaternion_8h_source.html">CQuaternion.h</a>.</p> </div> </div> <a class="anchor" id="adcaaed4fa688755a4c67cdbb9625af5f"></a><!-- doxytag: member="mrpt::math::CQuaternion::CQuaternion" ref="adcaaed4fa688755a4c67cdbb9625af5f" args="(const T r, const T x, const T y, const T z)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">mrpt::math::CQuaternion::CQuaternion </td> <td>(</td> <td class="paramtype">const T </td> <td class="paramname"><em>r</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const T </td> <td class="paramname"><em>x</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const T </td> <td class="paramname"><em>y</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const T </td> <td class="paramname"><em>z</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Construct a quaternion from its parameters 'r', 'x', 'y', 'z', with q = r + ix + jy + kz. </p> <p>Definition at line <a class="el" href="_c_quaternion_8h_source.html#l00081">81</a> of file <a class="el" href="_c_quaternion_8h_source.html">CQuaternion.h</a>.</p> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="ad72a40f99f104ab7713fa96d5a1e13eb"></a><!-- doxytag: member="mrpt::math::CQuaternion::conj" ref="ad72a40f99f104ab7713fa96d5a1e13eb" args="(CQuaternion &q_out) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void mrpt::math::CQuaternion::conj </td> <td>(</td> <td class="paramtype"><a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html">CQuaternion</a> & </td> <td class="paramname"><em>q_out</em></td><td>)</td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Return the conjugate quaternion. </p> <p>Definition at line <a class="el" href="_c_quaternion_8h_source.html#l00240">240</a> of file <a class="el" href="_c_quaternion_8h_source.html">CQuaternion.h</a>.</p> </div> </div> <a class="anchor" id="a4b6e2c9948bfd52fe7ba57e44e54fa48"></a><!-- doxytag: member="mrpt::math::CQuaternion::conj" ref="a4b6e2c9948bfd52fe7ba57e44e54fa48" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html">CQuaternion</a> mrpt::math::CQuaternion::conj </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Return the conjugate quaternion. </p> <p>Definition at line <a class="el" href="_c_quaternion_8h_source.html#l00249">249</a> of file <a class="el" href="_c_quaternion_8h_source.html">CQuaternion.h</a>.</p> <p>Referenced by <a class="el" href="_c_quaternion_8h_source.html#l00249">mrpt::math::CQuaternion< double >::conj()</a>.</p> </div> </div> <a class="anchor" id="a5734caf259b563fc2bb24b862ea780bd"></a><!-- doxytag: member="mrpt::math::CQuaternion::crossProduct" ref="a5734caf259b563fc2bb24b862ea780bd" args="(const CQuaternion &q1, const CQuaternion &q2)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void mrpt::math::CQuaternion::crossProduct </td> <td>(</td> <td class="paramtype">const <a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html">CQuaternion</a> & </td> <td class="paramname"><em>q1</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html">CQuaternion</a> & </td> <td class="paramname"><em>q2</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Calculate the "cross" product (or "composed rotation") of two quaternion: this = q1 x q2 After the operation, "this" will represent the composed rotations of q1 and q2 (q2 applied "after" q1). </p> <p>Definition at line <a class="el" href="_c_quaternion_8h_source.html#l00135">135</a> of file <a class="el" href="_c_quaternion_8h_source.html">CQuaternion.h</a>.</p> </div> </div> <a class="anchor" id="aa90eda234f74977c51b4cea049280780"></a><!-- doxytag: member="mrpt::math::CQuaternion::fromRodriguesVector" ref="aa90eda234f74977c51b4cea049280780" args="(const ARRAYLIKE &in)" --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class ARRAYLIKE > </div> <table class="memname"> <tr> <td class="memname">void mrpt::math::CQuaternion::fromRodriguesVector </td> <td>(</td> <td class="paramtype">const ARRAYLIKE & </td> <td class="paramname"><em>in</em></td><td>)</td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Set this quaternion to the rotation described by a 3D Rodrigues rotation vector. </p> <p>Definition at line <a class="el" href="_c_quaternion_8h_source.html#l00106">106</a> of file <a class="el" href="_c_quaternion_8h_source.html">CQuaternion.h</a>.</p> </div> </div> <a class="anchor" id="ac0a646cae90d37412f950c6c09dc9115"></a><!-- doxytag: member="mrpt::math::CQuaternion::inverseRotatePoint" ref="ac0a646cae90d37412f950c6c09dc9115" args="(const double lx, const double ly, const double lz, double &gx, double &gy, double &gz) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void mrpt::math::CQuaternion::inverseRotatePoint </td> <td>(</td> <td class="paramtype">const double </td> <td class="paramname"><em>lx</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const double </td> <td class="paramname"><em>ly</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const double </td> <td class="paramname"><em>lz</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">double & </td> <td class="paramname"><em>gx</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">double & </td> <td class="paramname"><em>gy</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">double & </td> <td class="paramname"><em>gz</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Rotate a 3D point (lx,ly,lz) -> (gx,gy,gz) as described by the inverse (conjugate) of this quaternion. </p> <p>Definition at line <a class="el" href="_c_quaternion_8h_source.html#l00157">157</a> of file <a class="el" href="_c_quaternion_8h_source.html">CQuaternion.h</a>.</p> </div> </div> <a class="anchor" id="ac4ecfa54ce8f0a876eff9d1626eca609"></a><!-- doxytag: member="mrpt::math::CQuaternion::normalizationJacobian" ref="ac4ecfa54ce8f0a876eff9d1626eca609" args="(MATRIXLIKE &J) const " --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class MATRIXLIKE > </div> <table class="memname"> <tr> <td class="memname">void mrpt::math::CQuaternion::normalizationJacobian </td> <td>(</td> <td class="paramtype">MATRIXLIKE & </td> <td class="paramname"><em>J</em></td><td>)</td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Calculate the 4x4 Jacobian of the normalization operation of this quaternion. </p> <p>The output matrix can be a dynamic or fixed size (4x4) matrix. </p> <p>Definition at line <a class="el" href="_c_quaternion_8h_source.html#l00182">182</a> of file <a class="el" href="_c_quaternion_8h_source.html">CQuaternion.h</a>.</p> </div> </div> <a class="anchor" id="a554edb930bf463d2dc566552823b6ff6"></a><!-- doxytag: member="mrpt::math::CQuaternion::normalize" ref="a554edb930bf463d2dc566552823b6ff6" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void mrpt::math::CQuaternion::normalize </td> <td>(</td> <td class="paramname"></td><td>)</td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Normalize this quaternion, so its norm becomes the unitity. </p> <p>Definition at line <a class="el" href="_c_quaternion_8h_source.html#l00171">171</a> of file <a class="el" href="_c_quaternion_8h_source.html">CQuaternion.h</a>.</p> <p>Referenced by <a class="el" href="_c_quaternion_8h_source.html#l00135">mrpt::math::CQuaternion< double >::crossProduct()</a>.</p> </div> </div> <a class="anchor" id="a409be4f6b23e66c2bee70da319d05525"></a><!-- doxytag: member="mrpt::math::CQuaternion::normSqr" ref="a409be4f6b23e66c2bee70da319d05525" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">double mrpt::math::CQuaternion::normSqr </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Return the squared norm of the quaternion. </p> <p>Definition at line <a class="el" href="_c_quaternion_8h_source.html#l00167">167</a> of file <a class="el" href="_c_quaternion_8h_source.html">CQuaternion.h</a>.</p> <p>Referenced by <a class="el" href="_c_quaternion_8h_source.html#l00081">mrpt::math::CQuaternion< double >::CQuaternion()</a>, <a class="el" href="_c_quaternion_8h_source.html#l00171">mrpt::math::CQuaternion< double >::normalize()</a>, and <a class="el" href="_c_quaternion_8h_source.html#l00182">mrpt::math::CQuaternion< double >::normalizationJacobian()</a>.</p> </div> </div> <a class="anchor" id="a09bdc4f9912b5759b4b75c6f39c62df4"></a><!-- doxytag: member="mrpt::math::CQuaternion::operator*" ref="a09bdc4f9912b5759b4b75c6f39c62df4" args="(const T &factor)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html">CQuaternion</a> mrpt::math::CQuaternion::operator* </td> <td>(</td> <td class="paramtype">const T & </td> <td class="paramname"><em>factor</em></td><td>)</td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="_c_quaternion_8h_source.html#l00341">341</a> of file <a class="el" href="_c_quaternion_8h_source.html">CQuaternion.h</a>.</p> </div> </div> <a class="anchor" id="afa2a076acbb5ccc3cf899747fbe1e1dc"></a><!-- doxytag: member="mrpt::math::CQuaternion::r" ref="afa2a076acbb5ccc3cf899747fbe1e1dc" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">T mrpt::math::CQuaternion::r </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Return r coordinate of the quaternion. </p> <p>Definition at line <a class="el" href="_c_quaternion_8h_source.html#l00094">94</a> of file <a class="el" href="_c_quaternion_8h_source.html">CQuaternion.h</a>.</p> <p>Referenced by <a class="el" href="_c_quaternion_8h_source.html#l00081">mrpt::math::CQuaternion< double >::CQuaternion()</a>, <a class="el" href="_c_quaternion_8h_source.html#l00135">mrpt::math::CQuaternion< double >::crossProduct()</a>, <a class="el" href="_c_quaternion_8h_source.html#l00146">mrpt::math::CQuaternion< double >::rotatePoint()</a>, <a class="el" href="_c_quaternion_8h_source.html#l00157">mrpt::math::CQuaternion< double >::inverseRotatePoint()</a>, <a class="el" href="_c_quaternion_8h_source.html#l00167">mrpt::math::CQuaternion< double >::normSqr()</a>, <a class="el" href="_c_quaternion_8h_source.html#l00182">mrpt::math::CQuaternion< double >::normalizationJacobian()</a>, <a class="el" href="_c_quaternion_8h_source.html#l00212">mrpt::math::CQuaternion< double >::rotationJacobian()</a>, <a class="el" href="_c_quaternion_8h_source.html#l00231">mrpt::math::CQuaternion< double >::rotationMatrixNoResize()</a>, <a class="el" href="_c_quaternion_8h_source.html#l00240">mrpt::math::CQuaternion< double >::conj()</a>, and <a class="el" href="_c_quaternion_8h_source.html#l00271">mrpt::math::CQuaternion< double >::rpy_and_jacobian()</a>.</p> </div> </div> <a class="anchor" id="a96f1e3d33afabaa3c301c26e43cf2f72"></a><!-- doxytag: member="mrpt::math::CQuaternion::r" ref="a96f1e3d33afabaa3c301c26e43cf2f72" args="(const T r)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void mrpt::math::CQuaternion::r </td> <td>(</td> <td class="paramtype">const T </td> <td class="paramname"><em>r</em></td><td>)</td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Set r coordinate of the quaternion. </p> <p>Definition at line <a class="el" href="_c_quaternion_8h_source.html#l00098">98</a> of file <a class="el" href="_c_quaternion_8h_source.html">CQuaternion.h</a>.</p> <p>Referenced by <a class="el" href="_c_quaternion_8h_source.html#l00098">mrpt::math::CQuaternion< double >::r()</a>.</p> </div> </div> <a class="anchor" id="a6d4c113c163aea8aa1cf69ac22d378bb"></a><!-- doxytag: member="mrpt::math::CQuaternion::rotatePoint" ref="a6d4c113c163aea8aa1cf69ac22d378bb" args="(const double lx, const double ly, const double lz, double &gx, double &gy, double &gz) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void mrpt::math::CQuaternion::rotatePoint </td> <td>(</td> <td class="paramtype">const double </td> <td class="paramname"><em>lx</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const double </td> <td class="paramname"><em>ly</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const double </td> <td class="paramname"><em>lz</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">double & </td> <td class="paramname"><em>gx</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">double & </td> <td class="paramname"><em>gy</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">double & </td> <td class="paramname"><em>gz</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Rotate a 3D point (lx,ly,lz) -> (gx,gy,gz) as described by this quaternion. </p> <p>Definition at line <a class="el" href="_c_quaternion_8h_source.html#l00146">146</a> of file <a class="el" href="_c_quaternion_8h_source.html">CQuaternion.h</a>.</p> </div> </div> <a class="anchor" id="afffa513496f7f3545af9b437e7661f1a"></a><!-- doxytag: member="mrpt::math::CQuaternion::rotationJacobian" ref="afffa513496f7f3545af9b437e7661f1a" args="(MATRIXLIKE &J) const " --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class MATRIXLIKE > </div> <table class="memname"> <tr> <td class="memname">void mrpt::math::CQuaternion::rotationJacobian </td> <td>(</td> <td class="paramtype">MATRIXLIKE & </td> <td class="paramname"><em>J</em></td><td>)</td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Compute the Jacobian of the rotation composition operation <img class="formulaInl" alt="$ p = f(\cdot) = q_{this} \times r $" src="form_7.png"/>, that is the 4x4 matrix <img class="formulaInl" alt="$ \frac{\partial f}{\partial q_{this} } $" src="form_8.png"/>. </p> <p>The output matrix can be a dynamic or fixed size (4x4) matrix. </p> <p>Definition at line <a class="el" href="_c_quaternion_8h_source.html#l00212">212</a> of file <a class="el" href="_c_quaternion_8h_source.html">CQuaternion.h</a>.</p> </div> </div> <a class="anchor" id="ae56fd8f737fde43ba87f83e858c636d4"></a><!-- doxytag: member="mrpt::math::CQuaternion::rotationMatrix" ref="ae56fd8f737fde43ba87f83e858c636d4" args="(MATRIXLIKE &M) const " --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class MATRIXLIKE > </div> <table class="memname"> <tr> <td class="memname">void mrpt::math::CQuaternion::rotationMatrix </td> <td>(</td> <td class="paramtype">MATRIXLIKE & </td> <td class="paramname"><em>M</em></td><td>)</td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Calculate the 3x3 rotation matrix associated to this quaternion. </p> <p>Definition at line <a class="el" href="_c_quaternion_8h_source.html#l00223">223</a> of file <a class="el" href="_c_quaternion_8h_source.html">CQuaternion.h</a>.</p> </div> </div> <a class="anchor" id="aaf08e5c7f517bdc2b5eca9439174ccda"></a><!-- doxytag: member="mrpt::math::CQuaternion::rotationMatrixNoResize" ref="aaf08e5c7f517bdc2b5eca9439174ccda" args="(MATRIXLIKE &M) const " --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class MATRIXLIKE > </div> <table class="memname"> <tr> <td class="memname">void mrpt::math::CQuaternion::rotationMatrixNoResize </td> <td>(</td> <td class="paramtype">MATRIXLIKE & </td> <td class="paramname"><em>M</em></td><td>)</td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Fill out the top-left 3x3 block of the given matrix with the rotation matrix associated to this quaternion (does not resize the matrix, for that, see rotationMatrix) </p> <p>Definition at line <a class="el" href="_c_quaternion_8h_source.html#l00231">231</a> of file <a class="el" href="_c_quaternion_8h_source.html">CQuaternion.h</a>.</p> <p>Referenced by <a class="el" href="_c_quaternion_8h_source.html#l00223">mrpt::math::CQuaternion< double >::rotationMatrix()</a>.</p> </div> </div> <a class="anchor" id="a0b5137036a7dcae90740b9d49a55c24f"></a><!-- doxytag: member="mrpt::math::CQuaternion::rpy" ref="a0b5137036a7dcae90740b9d49a55c24f" args="(T &roll, T &pitch, T &yaw) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void mrpt::math::CQuaternion::rpy </td> <td>(</td> <td class="paramtype">T & </td> <td class="paramname"><em>roll</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">T & </td> <td class="paramname"><em>pitch</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">T & </td> <td class="paramname"><em>yaw</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Return the yaw, pitch & roll angles associated to quaternion. </p> <dl class="see"><dt><b>See also:</b></dt><dd>For the equations, see The MRPT Book, or see <a href="http://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToEuler/Quaternions.pdf">http://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToEuler/Quaternions.pdf</a> </dd> <dd> <a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html#ad624ce2e5d2880b5b7f96dfbc13293d9" title="Return the yaw, pitch & roll angles associated to quaternion, and (optionally) the 3x4 Jacobian of th...">rpy_and_jacobian</a> </dd></dl> <p>Definition at line <a class="el" href="_c_quaternion_8h_source.html#l00260">260</a> of file <a class="el" href="_c_quaternion_8h_source.html">CQuaternion.h</a>.</p> </div> </div> <a class="anchor" id="ad624ce2e5d2880b5b7f96dfbc13293d9"></a><!-- doxytag: member="mrpt::math::CQuaternion::rpy_and_jacobian" ref="ad624ce2e5d2880b5b7f96dfbc13293d9" args="(T &roll, T &pitch, T &yaw, MATRIXLIKE *out_dr_dq=NULL, bool resize_out_dr_dq_to3x4=true) const " --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class MATRIXLIKE > </div> <table class="memname"> <tr> <td class="memname">void mrpt::math::CQuaternion::rpy_and_jacobian </td> <td>(</td> <td class="paramtype">T & </td> <td class="paramname"><em>roll</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">T & </td> <td class="paramname"><em>pitch</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">T & </td> <td class="paramname"><em>yaw</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">MATRIXLIKE * </td> <td class="paramname"><em>out_dr_dq</em> = <code>NULL</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"><em>resize_out_dr_dq_to3x4</em> = <code>true</code> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Return the yaw, pitch & roll angles associated to quaternion, and (optionally) the 3x4 Jacobian of the transformation. </p> <p>Note that both the angles and the Jacobian have one set of normal equations, plus other special formulas for the degenerated cases of |pitch|=90 degrees. </p> <dl class="see"><dt><b>See also:</b></dt><dd>For the equations, see The MRPT Book, or <a href="http://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToEuler/Quaternions.pdf">http://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToEuler/Quaternions.pdf</a> </dd> <dd> <a class="el" href="classmrpt_1_1math_1_1_c_quaternion.html#a0b5137036a7dcae90740b9d49a55c24f" title="Return the yaw, pitch & roll angles associated to quaternion.">rpy</a> </dd></dl> <p>Definition at line <a class="el" href="_c_quaternion_8h_source.html#l00271">271</a> of file <a class="el" href="_c_quaternion_8h_source.html">CQuaternion.h</a>.</p> <p>Referenced by <a class="el" href="_c_quaternion_8h_source.html#l00260">mrpt::math::CQuaternion< double >::rpy()</a>.</p> </div> </div> <a class="anchor" id="a3384d0bef93b72e6ded749fc178c479a"></a><!-- doxytag: member="mrpt::math::CQuaternion::x" ref="a3384d0bef93b72e6ded749fc178c479a" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">T mrpt::math::CQuaternion::x </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Return x coordinate of the quaternion. </p> <p>Definition at line <a class="el" href="_c_quaternion_8h_source.html#l00095">95</a> of file <a class="el" href="_c_quaternion_8h_source.html">CQuaternion.h</a>.</p> <p>Referenced by <a class="el" href="_c_quaternion_8h_source.html#l00081">mrpt::math::CQuaternion< double >::CQuaternion()</a>, <a class="el" href="_c_quaternion_8h_source.html#l00106">mrpt::math::CQuaternion< double >::fromRodriguesVector()</a>, <a class="el" href="_c_quaternion_8h_source.html#l00135">mrpt::math::CQuaternion< double >::crossProduct()</a>, <a class="el" href="_c_quaternion_8h_source.html#l00146">mrpt::math::CQuaternion< double >::rotatePoint()</a>, <a class="el" href="_c_quaternion_8h_source.html#l00157">mrpt::math::CQuaternion< double >::inverseRotatePoint()</a>, <a class="el" href="_c_quaternion_8h_source.html#l00167">mrpt::math::CQuaternion< double >::normSqr()</a>, <a class="el" href="_c_quaternion_8h_source.html#l00182">mrpt::math::CQuaternion< double >::normalizationJacobian()</a>, <a class="el" href="_c_quaternion_8h_source.html#l00212">mrpt::math::CQuaternion< double >::rotationJacobian()</a>, <a class="el" href="_c_quaternion_8h_source.html#l00231">mrpt::math::CQuaternion< double >::rotationMatrixNoResize()</a>, <a class="el" href="_c_quaternion_8h_source.html#l00240">mrpt::math::CQuaternion< double >::conj()</a>, and <a class="el" href="_c_quaternion_8h_source.html#l00271">mrpt::math::CQuaternion< double >::rpy_and_jacobian()</a>.</p> </div> </div> <a class="anchor" id="a3b12f8ed65efa2d485fe4314da4c6054"></a><!-- doxytag: member="mrpt::math::CQuaternion::x" ref="a3b12f8ed65efa2d485fe4314da4c6054" args="(const T x)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void mrpt::math::CQuaternion::x </td> <td>(</td> <td class="paramtype">const T </td> <td class="paramname"><em>x</em></td><td>)</td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Set x coordinate of the quaternion. </p> <p>Definition at line <a class="el" href="_c_quaternion_8h_source.html#l00099">99</a> of file <a class="el" href="_c_quaternion_8h_source.html">CQuaternion.h</a>.</p> <p>Referenced by <a class="el" href="_c_quaternion_8h_source.html#l00099">mrpt::math::CQuaternion< double >::x()</a>.</p> </div> </div> <a class="anchor" id="ae4e990ee1f1d6ac67cc02a68a59ffba9"></a><!-- doxytag: member="mrpt::math::CQuaternion::y" ref="ae4e990ee1f1d6ac67cc02a68a59ffba9" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">T mrpt::math::CQuaternion::y </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Return y coordinate of the quaternion. </p> <p>Definition at line <a class="el" href="_c_quaternion_8h_source.html#l00096">96</a> of file <a class="el" href="_c_quaternion_8h_source.html">CQuaternion.h</a>.</p> <p>Referenced by <a class="el" href="_c_quaternion_8h_source.html#l00081">mrpt::math::CQuaternion< double >::CQuaternion()</a>, <a class="el" href="_c_quaternion_8h_source.html#l00106">mrpt::math::CQuaternion< double >::fromRodriguesVector()</a>, <a class="el" href="_c_quaternion_8h_source.html#l00135">mrpt::math::CQuaternion< double >::crossProduct()</a>, <a class="el" href="_c_quaternion_8h_source.html#l00146">mrpt::math::CQuaternion< double >::rotatePoint()</a>, <a class="el" href="_c_quaternion_8h_source.html#l00157">mrpt::math::CQuaternion< double >::inverseRotatePoint()</a>, <a class="el" href="_c_quaternion_8h_source.html#l00167">mrpt::math::CQuaternion< double >::normSqr()</a>, <a class="el" href="_c_quaternion_8h_source.html#l00182">mrpt::math::CQuaternion< double >::normalizationJacobian()</a>, <a class="el" href="_c_quaternion_8h_source.html#l00212">mrpt::math::CQuaternion< double >::rotationJacobian()</a>, <a class="el" href="_c_quaternion_8h_source.html#l00231">mrpt::math::CQuaternion< double >::rotationMatrixNoResize()</a>, <a class="el" href="_c_quaternion_8h_source.html#l00240">mrpt::math::CQuaternion< double >::conj()</a>, and <a class="el" href="_c_quaternion_8h_source.html#l00271">mrpt::math::CQuaternion< double >::rpy_and_jacobian()</a>.</p> </div> </div> <a class="anchor" id="a7647915dd59f4c7e9ce973b676bd5b98"></a><!-- doxytag: member="mrpt::math::CQuaternion::y" ref="a7647915dd59f4c7e9ce973b676bd5b98" args="(const T y)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void mrpt::math::CQuaternion::y </td> <td>(</td> <td class="paramtype">const T </td> <td class="paramname"><em>y</em></td><td>)</td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Set y coordinate of the quaternion. </p> <p>Definition at line <a class="el" href="_c_quaternion_8h_source.html#l00100">100</a> of file <a class="el" href="_c_quaternion_8h_source.html">CQuaternion.h</a>.</p> <p>Referenced by <a class="el" href="_c_quaternion_8h_source.html#l00100">mrpt::math::CQuaternion< double >::y()</a>.</p> </div> </div> <a class="anchor" id="a19dd28d34573a39dea1695900cb7a2e1"></a><!-- doxytag: member="mrpt::math::CQuaternion::z" ref="a19dd28d34573a39dea1695900cb7a2e1" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">T mrpt::math::CQuaternion::z </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Return z coordinate of the quaternion. </p> <p>Definition at line <a class="el" href="_c_quaternion_8h_source.html#l00097">97</a> of file <a class="el" href="_c_quaternion_8h_source.html">CQuaternion.h</a>.</p> <p>Referenced by <a class="el" href="_c_quaternion_8h_source.html#l00081">mrpt::math::CQuaternion< double >::CQuaternion()</a>, <a class="el" href="_c_quaternion_8h_source.html#l00106">mrpt::math::CQuaternion< double >::fromRodriguesVector()</a>, <a class="el" href="_c_quaternion_8h_source.html#l00135">mrpt::math::CQuaternion< double >::crossProduct()</a>, <a class="el" href="_c_quaternion_8h_source.html#l00146">mrpt::math::CQuaternion< double >::rotatePoint()</a>, <a class="el" href="_c_quaternion_8h_source.html#l00157">mrpt::math::CQuaternion< double >::inverseRotatePoint()</a>, <a class="el" href="_c_quaternion_8h_source.html#l00167">mrpt::math::CQuaternion< double >::normSqr()</a>, <a class="el" href="_c_quaternion_8h_source.html#l00182">mrpt::math::CQuaternion< double >::normalizationJacobian()</a>, <a class="el" href="_c_quaternion_8h_source.html#l00212">mrpt::math::CQuaternion< double >::rotationJacobian()</a>, <a class="el" href="_c_quaternion_8h_source.html#l00231">mrpt::math::CQuaternion< double >::rotationMatrixNoResize()</a>, <a class="el" href="_c_quaternion_8h_source.html#l00240">mrpt::math::CQuaternion< double >::conj()</a>, and <a class="el" href="_c_quaternion_8h_source.html#l00271">mrpt::math::CQuaternion< double >::rpy_and_jacobian()</a>.</p> </div> </div> <a class="anchor" id="ae41e503dc4db2ded94ffa3ad325293db"></a><!-- doxytag: member="mrpt::math::CQuaternion::z" ref="ae41e503dc4db2ded94ffa3ad325293db" args="(const T z)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void mrpt::math::CQuaternion::z </td> <td>(</td> <td class="paramtype">const T </td> <td class="paramname"><em>z</em></td><td>)</td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Set z coordinate of the quaternion. </p> <p>Definition at line <a class="el" href="_c_quaternion_8h_source.html#l00101">101</a> of file <a class="el" href="_c_quaternion_8h_source.html">CQuaternion.h</a>.</p> <p>Referenced by <a class="el" href="_c_quaternion_8h_source.html#l00101">mrpt::math::CQuaternion< double >::z()</a>.</p> </div> </div> </div> <br><hr><br> <table border="0" width="100%"> <tr> <td> Page generated by <a href="http://www.doxygen.org" target="_blank">Doxygen 1.7.5</a> for MRPT 0.9.5 SVN: at Sun Sep 25 17:20:18 UTC 2011</td><td></td> <td width="100"> </td> <td width="150"> </td></tr> </table> </body></html>