Sophie

Sophie

distrib > Mandriva > 10.0-com > i586 > by-pkgid > 9347541fe87a5ea3f3b8dbc50f660e8e > files > 276

libQGLViewer-devel-1.3.6-1mdk.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>libQGLViewer: Quaternion class Reference</title>
<link href="qglviewer.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.3 -->
<div class="qindex"><a class="qindex" href="../index.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Compound&nbsp;List</a> | <a class="qindex" href="functions.html">All&nbsp;functions</a> | <a class="qindex" doxygen="_cgi:http://www-imagis.imag.fr/cgi-bin/DOXYGEN/search.cgi" href="http://www-imagis.imag.fr/cgi-bin/DOXYGEN/search.cgi">Search</a></div>
<h1>Quaternion Class Reference</h1>A <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> 3D rotation class.  
<a href="#_details">More...</a>
<p>
<a href="classqglviewer_1_1Quaternion-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Defining a Quaternion</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Quaternion.html#z115_0">Quaternion</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a>, a null rotation. </em> <a href="#z115_0"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Quaternion.html#z115_1">Quaternion</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;axis, const double angle)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Simple constructor with any axis and angle (in radians). </em> <a href="#z115_1"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Quaternion.html#z115_2">Quaternion</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;v, const double sin_ha, const double cos_ha)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor with normalized axis, cos &amp; sin of half angle. </em> <a href="#z115_2"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Quaternion.html#z115_3">Quaternion</a> (const double q0, const double q1, const double q2, const double q3)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor from the values of a <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a>. </em> <a href="#z115_3"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Quaternion.html#z115_4">Quaternion</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;from, const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;to)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructs a <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> that will rotate from the <code>from</code> direction to the <code>to</code> direction. </em> <a href="#z115_4"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Quaternion.html#z115_5">operator=</a> (const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;Q)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Equal operator. </em> <a href="#z115_5"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Quaternion.html#z115_6">Quaternion</a> (const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;Q)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Copy constructor. </em> <a href="#z115_6"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Quaternion.html#z115_7">setAxisAngle</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;v, const double angle)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">To reset a <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> to the rotation of axis <code>v</code> and angle <code>angle</code> (in radians). </em> <a href="#z115_7"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Quaternion.html#z115_8">setValue</a> (const double q0, const double q1, const double q2, const double q3)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the current <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> value. </em> <a href="#z115_8"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Quaternion.html#z115_9">setFromRotationMatrix</a> (const float m[3][3])</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Quaternion.html#z115_10">setFromRotatedBase</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;X, const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;Y, const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;Z)</td></tr>

<tr><td colspan=2><br><h2>Access values</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classqglviewer_1_1Vec.html">Vec</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Quaternion.html#z117_0">axis</a> () const</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Quaternion.html#z117_1">angle</a> () const</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Quaternion.html#z117_2">getAxisAngle</a> (<a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;axis, float &amp;angle) const</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>double&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Quaternion.html#z117_3">operator[]</a> (int i) const</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Bracket operator, with a constant return value. </em> <a href="#z117_3"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>double &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Quaternion.html#z117_4">operator[]</a> (int i)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Bracket operator, returns an l-value. </em> <a href="#z117_4"></a><em><br><br></td></tr>
<tr><td colspan=2><br><h2>Calculus</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Quaternion.html#z119_0">operator *=</a> (const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;q)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> is composed with <code>q</code>. </em> <a href="#z119_0"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classqglviewer_1_1Vec.html">Vec</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Quaternion.html#z119_1">inverseRotate</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;v) const</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="classqglviewer_1_1Vec.html">Vec</a> v is applied the inverse <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> rotation (inverse of <a class="el" href="classqglviewer_1_1Quaternion.html#z119_2">rotate()</a>). </em> <a href="#z119_1"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classqglviewer_1_1Vec.html">Vec</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Quaternion.html#z119_2">rotate</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;v) const</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="classqglviewer_1_1Vec.html">Vec</a> <code>v</code> is applied the <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> rotation (see also <a class="el" href="classqglviewer_1_1Quaternion.html#z119_1">inverseRotate()</a>). </em> <a href="#z119_2"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Quaternion.html#z119_3">operator *</a> (const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;a, const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;b)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the composition of the two rotations (mind the order !). </em> <a href="#z119_3"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Quaternion.html#z119_4">operator *</a> (const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;a, const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;b)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Same as a.rotate(b). </em> <a href="#z119_4"></a><em><br><br></td></tr>
<tr><td colspan=2><br><h2>Inversion</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Quaternion.html#z121_0">inverse</a> () const</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the inverse of the <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a>. The <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> is <em>not</em> modified. See <a class="el" href="classqglviewer_1_1Quaternion.html#z121_1">invert()</a>. </em> <a href="#z121_0"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Quaternion.html#z121_1">invert</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Inverse the <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> (same rotation angle, but opposite axis). See also <a class="el" href="classqglviewer_1_1Quaternion.html#z121_0">inverse()</a>. </em> <a href="#z121_1"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Quaternion.html#z121_2">negate</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>double&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Quaternion.html#z121_3">normalize</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Normalize the <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a>. Should not need to be called as we only deal with unit <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a>. </em> <a href="#z121_3"></a><em><br><br></td></tr>
<tr><td colspan=2><br><h2>Associated matrix</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>const GLdouble *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Quaternion.html#z123_0">matrix</a> () const</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Quaternion.html#z123_1">getMatrix</a> (GLdouble m[4][4]) const</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Quaternion.html#z123_2">getMatrix</a> (GLdouble m[16]) const</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Quaternion.html#z123_3">getRotationMatrix</a> (float m[3][3]) const</td></tr>

<tr><td colspan=2><br><h2>Slerp rotation interpolation</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Quaternion.html#z125_0">log</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Quaternion.html#z125_1">exp</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Quaternion.html#z125_2">slerp</a> (const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;a, const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;b, float t, bool allowFlip=true)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Quaternion.html#z125_3">squad</a> (const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;a, const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;tgA, const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;tgB, const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;b, float t)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>double&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Quaternion.html#z125_4">dot</a> (const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;a, const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;b)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Quaternion.html#z125_5">lnDif</a> (const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;a, const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;b)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Quaternion.html#z125_6">squadTangent</a> (const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;a, const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;b, const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;c)</td></tr>

<tr><td colspan=2><br><h2>XML representation</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>QDomElement&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Quaternion.html#z129_0">domElement</a> (const QString &amp;name, QDomDocument &amp;doc) const</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Quaternion.html#z129_1">initFromDOMElement</a> (const QDomElement &amp;de)</td></tr>

<tr><td colspan=2><br><h2>Random orientation</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Quaternion.html#z127_0">randomOrientation</a> ()</td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> 3D rotation class. 
<p>
A <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> is a clean representation of a 3D rotation matrix or of an orientation. In this implementation, the <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> are supposed to be normalized, so that the <a class="el" href="classqglviewer_1_1Quaternion.html#z121_0">inverse()</a> is actually a conjugate function.<p>
Many tools are provided define a 3D rotation (constructors, <a class="el" href="classqglviewer_1_1Quaternion.html#z115_7">setAxisAngle()</a>, <a class="el" href="classqglviewer_1_1Quaternion.html#z115_9">setFromRotationMatrix()</a>, <a class="el" href="classqglviewer_1_1Quaternion.html#z115_10">setFromRotatedBase()</a>...). Apply the rotation to 3D points using <a class="el" href="classqglviewer_1_1Quaternion.html#z119_2">rotate()</a> and <a class="el" href="classqglviewer_1_1Quaternion.html#z119_1">inverseRotate()</a>. Also consider the <a class="el" href="classqglviewer_1_1Frame.html">Frame</a> coordinate system conversion functions like <a class="el" href="classqglviewer_1_1Frame.html#z41_0">Frame::coordinatesOf()</a> and <a class="el" href="classqglviewer_1_1Frame.html#z41_5">Frame::coordinatesOfFrom()</a>.<p>
The <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> corresponding to a rotation vector <code>v</code>, with an angle <code>alpha</code> is : <div class="fragment"><pre>  {q[0],q[1],q[2]} = sin(alpha/2) * {v[0],v[1],v[2]}
  q[3] = cos(alpha/2)
</pre></div><p>
<a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> is a <a class="el" href="classQGLViewer.html">QGLViewer</a> internal class. It is part of the <code>qglviewer</code> namespace. You can use it in your programs by specifying <code>qglviewer::Quaternion</code>, or by using the qglviewer namespace : <div class="fragment"><pre>  <span class="keyword">using</span> <span class="keyword">namespace </span>qglviewer;
</pre></div>See also the <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> and the <a class="el" href="classqglviewer_1_1Frame.html">Frame</a> documentation. 
<p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a name="z115_0" doxytag="qglviewer::Quaternion::Quaternion"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline, explicit]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Default <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a>, a null rotation. 
<p>
    </td>
  </tr>
</table>
<a name="z115_1" doxytag="qglviewer::Quaternion::Quaternion"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>axis</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const double&nbsp;</td>
          <td class="mdname" nowrap> <em>angle</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [inline, explicit]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Simple constructor with any axis and angle (in radians). 
<p>
    </td>
  </tr>
</table>
<a name="z115_2" doxytag="qglviewer::Quaternion::Quaternion"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>v</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const double&nbsp;</td>
          <td class="mdname" nowrap> <em>sin_ha</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const double&nbsp;</td>
          <td class="mdname" nowrap> <em>cos_ha</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [inline, explicit]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Constructor with normalized axis, cos &amp; sin of half angle. 
<p>
    </td>
  </tr>
</table>
<a name="z115_3" doxytag="qglviewer::Quaternion::Quaternion"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const double&nbsp;</td>
          <td class="mdname" nowrap> <em>q0</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const double&nbsp;</td>
          <td class="mdname" nowrap> <em>q1</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const double&nbsp;</td>
          <td class="mdname" nowrap> <em>q2</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const double&nbsp;</td>
          <td class="mdname" nowrap> <em>q3</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [inline, explicit]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Constructor from the values of a <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a>. 
<p>
    </td>
  </tr>
</table>
<a name="z115_4" doxytag="qglviewer::Quaternion::Quaternion"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>from</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>to</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [explicit]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Constructs a <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> that will rotate from the <code>from</code> direction to the <code>to</code> direction. 
<p>
    </td>
  </tr>
</table>
<a name="z115_6" doxytag="qglviewer::Quaternion::Quaternion"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>Q</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Copy constructor. 
<p>
    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a name="z117_1" doxytag="qglviewer::Quaternion::angle"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> float angle </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const</td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns the angle (in radians) of the rotation represented by the <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a>. See also <a class="el" href="classqglviewer_1_1Quaternion.html#z117_0">axis()</a> and <a class="el" href="classqglviewer_1_1Quaternion.html#z117_2">getAxisAngle()</a>. <dl compact><dt><b>Note:</b></dt><dd>Returned value is in the range [0-pi]. Larger rotational angles are obtained by inverting the axis direction. See also <a class="el" href="classqglviewer_1_1Quaternion.html#z117_0">axis()</a>. </dd></dl>
    </td>
  </tr>
</table>
<a name="z117_0" doxytag="qglviewer::Quaternion::axis"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> axis </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const</td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns the axis of the rotation represented by the <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a>. The axis may be null for an identity rotation. See also <a class="el" href="classqglviewer_1_1Quaternion.html#z117_1">angle()</a> and <a class="el" href="classqglviewer_1_1Quaternion.html#z117_2">getAxisAngle()</a>.     </td>
  </tr>
</table>
<a name="z129_0" doxytag="qglviewer::Quaternion::domElement"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> QDomElement domElement </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const QString &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>name</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>QDomDocument &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>doc</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> const</td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Creates an XML QDomElement that represents the <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a>. <code>name</code> is the name of the QDomElement tag. You need to provide the QDomDocument <code>doc</code> that will hold the resulting element. Typical usage would be: <div class="fragment"><pre> QDomDocument doc(<span class="stringliteral">"myDocument"</span>);
 <a class="code" href="classqglviewer_1_1Quaternion.html#z115_0">Quaternion</a> sunQuat;
 <span class="comment">// ...</span>
 anyNode.addElement(sunQuat.domElement(<span class="stringliteral">"sunOrientation"</span>, doc));
 <span class="comment">// ...</span>
</pre></div>Use <a class="el" href="classqglviewer_1_1Quaternion.html#z129_1">initFromDOMElement()</a> to restore the <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> state from the resulting domElement.<p>
See also <a class="el" href="classqglviewer_1_1Vec.html#z145_0">Vec::domElement()</a>, <a class="el" href="classqglviewer_1_1Camera.html#z23_0">Camera::domElement()</a>, <a class="el" href="classqglviewer_1_1KeyFrameInterpolator.html#z59_0">KeyFrameInterpolator::domElement()</a>...     </td>
  </tr>
</table>
<a name="z125_4" doxytag="qglviewer::Quaternion::dot"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> double dot </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>a</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>b</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [inline, static]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Return a[0]*b[0] + a[1]*b[1] + a[2]*b[2] + a[3]*b[3]. See also <a class="el" href="classqglviewer_1_1Quaternion.html#z121_2">negate()</a> and <a class="el" href="classqglviewer_1_1Quaternion.html#z125_2">slerp()</a>.     </td>
  </tr>
</table>
<a name="z125_1" doxytag="qglviewer::Quaternion::exp"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> exp </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns the exponential of the <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a>. See also <a class="el" href="classqglviewer_1_1Quaternion.html#z125_0">log()</a>.     </td>
  </tr>
</table>
<a name="z117_2" doxytag="qglviewer::Quaternion::getAxisAngle"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void getAxisAngle </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>axis</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>float &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>angle</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> const</td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns the axis and the angle (in radians) of the rotation represented by the <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a>. See also <a class="el" href="classqglviewer_1_1Quaternion.html#z117_0">axis()</a> and <a class="el" href="classqglviewer_1_1Quaternion.html#z117_1">angle()</a>.     </td>
  </tr>
</table>
<a name="z123_2" doxytag="qglviewer::Quaternion::getMatrix"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void getMatrix </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">GLdouble&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>m</em>[16]          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const</td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
double[16] parameter version of <a class="el" href="classqglviewer_1_1Quaternion.html#z123_0">matrix()</a>. See also <a class="el" href="classqglviewer_1_1Frame.html#z47_1">Frame::getMatrix()</a>.     </td>
  </tr>
</table>
<a name="z123_1" doxytag="qglviewer::Quaternion::getMatrix"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void getMatrix </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">GLdouble&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>m</em>[4][4]          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const</td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
double[4][4] parameter version of <a class="el" href="classqglviewer_1_1Quaternion.html#z123_0">matrix()</a>. See also <a class="el" href="classqglviewer_1_1Frame.html#z47_1">Frame::getMatrix()</a>.     </td>
  </tr>
</table>
<a name="z123_3" doxytag="qglviewer::Quaternion::getRotationMatrix"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void getRotationMatrix </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">float&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>m</em>[3][3]          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const</td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
<code>m</code> is set to the 3x3 rotation matrix associated with the <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a>. <dl compact><dt><b>Attention:</b></dt><dd>This is a classical mathematical rotation matrix. The openGL format uses its transposed version. See <a class="el" href="classqglviewer_1_1Quaternion.html#z123_0">matrix()</a> and <a class="el" href="classqglviewer_1_1Quaternion.html#z123_1">getMatrix()</a>. </dd></dl>
    </td>
  </tr>
</table>
<a name="z129_1" doxytag="qglviewer::Quaternion::initFromDOMElement"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void initFromDOMElement </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const QDomElement &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>de</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Restore the <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> state from a QDomElement created by <a class="el" href="classqglviewer_1_1Quaternion.html#z129_0">domElement()</a>. The QDomElement must contain the <em>q0</em>, <em>q1</em> , <em>q2</em> and <em>q3</em> attributes, otherwise these fields are set to 0.0, 0.0, 0.0, 1.0 (identity <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a>) .     </td>
  </tr>
</table>
<a name="z121_0" doxytag="qglviewer::Quaternion::inverse"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> inverse </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns the inverse of the <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a>. The <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> is <em>not</em> modified. See <a class="el" href="classqglviewer_1_1Quaternion.html#z121_1">invert()</a>. 
<p>
    </td>
  </tr>
</table>
<a name="z119_1" doxytag="qglviewer::Quaternion::inverseRotate"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> inverseRotate </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>v</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const</td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
<a class="el" href="classqglviewer_1_1Vec.html">Vec</a> v is applied the inverse <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> rotation (inverse of <a class="el" href="classqglviewer_1_1Quaternion.html#z119_2">rotate()</a>). 
<p>
    </td>
  </tr>
</table>
<a name="z121_1" doxytag="qglviewer::Quaternion::invert"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void invert </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Inverse the <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> (same rotation angle, but opposite axis). See also <a class="el" href="classqglviewer_1_1Quaternion.html#z121_0">inverse()</a>. 
<p>
    </td>
  </tr>
</table>
<a name="z125_5" doxytag="qglviewer::Quaternion::lnDif"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> lnDif </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>a</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>b</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [static]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns log(a.inverse() * b). Useful for <a class="el" href="classqglviewer_1_1Quaternion.html#z125_6">squadTangent()</a>.     </td>
  </tr>
</table>
<a name="z125_0" doxytag="qglviewer::Quaternion::log"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> log </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns the logarithm of the <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a>. See also <a class="el" href="classqglviewer_1_1Quaternion.html#z125_1">exp()</a>.     </td>
  </tr>
</table>
<a name="z123_0" doxytag="qglviewer::Quaternion::matrix"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> const GLdouble * matrix </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const</td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns the associated 4x4 OpenGL rotation matrix. Can be used with <code>glMultMatrixd</code>(q.matrix()) or <code>glLoadMatrixd</code>(q.matrix()). <div class="fragment"><pre> Vec From,To;
 <span class="comment">// Set the From and To directions</span>
 <span class="comment">// Computes a Quaternion which transform From in To</span>
 <a class="code" href="classqglviewer_1_1Quaternion.html#z115_0">Quaternion</a> q(From, To);
 <span class="comment">// Rotates the current openGL matrix.</span>
 glMultMatrixd(q.matrix());
</pre></div><p>
<dl compact><dt><b>Attention:</b></dt><dd>The matrix is given in OpenGL format (row-major order) and is the transpose of the actual mathematical European representation. Consider using <a class="el" href="classqglviewer_1_1Quaternion.html#z123_3">getRotationMatrix()</a> instead.<p>
The result is only valid until the next call to <a class="el" href="classqglviewer_1_1Quaternion.html#z123_0">matrix()</a>. Use it immediately (as in <code>glLoadMatrixd</code>(q.matrix()) or <code>glLoadMatrixd</code>(q.matrix())) or store it in an other variable. Consider using <a class="el" href="classqglviewer_1_1Quaternion.html#z123_1">getMatrix()</a> if needed. </dd></dl>
    </td>
  </tr>
</table>
<a name="z121_2" doxytag="qglviewer::Quaternion::negate"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void negate </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Negate the coefficients of the <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a>. <a class="el" href="classqglviewer_1_1Quaternion.html#z117_0">axis()</a> and <a class="el" href="classqglviewer_1_1Quaternion.html#z117_1">angle()</a> are unchanged, it is just an other representation of the same <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a>. Useful for <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> interpolation, so that the interpolation takes the shortest path. See also <a class="el" href="classqglviewer_1_1Quaternion.html#z125_2">slerp()</a>, <a class="el" href="classqglviewer_1_1Quaternion.html#z125_3">squad()</a>, <a class="el" href="classqglviewer_1_1Quaternion.html#z125_4">dot()</a>.     </td>
  </tr>
</table>
<a name="z121_3" doxytag="qglviewer::Quaternion::normalize"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> double normalize </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Normalize the <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a>. Should not need to be called as we only deal with unit <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a>. 
<p>
    </td>
  </tr>
</table>
<a name="z119_0" doxytag="qglviewer::Quaternion::operator *="></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a>&amp; operator *= </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>q</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
<a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> is composed with <code>q</code>. 
<p>
<dl compact><dt><b>Attention:</b></dt><dd>For efficiency reasons, the resulting <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> is not normalized. See <a class="el" href="classqglviewer_1_1Quaternion.html#z121_3">normalize()</a> in case of numerical drift. </dd></dl>
    </td>
  </tr>
</table>
<a name="z115_5" doxytag="qglviewer::Quaternion::operator="></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a>&amp; operator= </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>Q</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Equal operator. 
<p>
    </td>
  </tr>
</table>
<a name="z117_4" doxytag="qglviewer::Quaternion::operator[]"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> double&amp; operator[] </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">int&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>i</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Bracket operator, returns an l-value. 
<p>
    </td>
  </tr>
</table>
<a name="z117_3" doxytag="qglviewer::Quaternion::operator[]"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> double operator[] </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">int&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>i</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Bracket operator, with a constant return value. 
<p>
    </td>
  </tr>
</table>
<a name="z127_0" doxytag="qglviewer::Quaternion::randomOrientation"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> randomOrientation </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [static]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns a random unit <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a>. A randomly directed unit vector can then be computed using : <div class="fragment"><pre>Vec randomDir = Quaternion::randomOrientation() * Vec(1.0, 0.0, 0.0);
</pre></div><p>
<dl compact><dt><b>Note:</b></dt><dd>This function uses rand() to create pseudo-random numbers and the random number generator can be initialized using srand(). </dd></dl>
    </td>
  </tr>
</table>
<a name="z119_2" doxytag="qglviewer::Quaternion::rotate"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> rotate </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>v</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const</td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
<a class="el" href="classqglviewer_1_1Vec.html">Vec</a> <code>v</code> is applied the <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> rotation (see also <a class="el" href="classqglviewer_1_1Quaternion.html#z119_1">inverseRotate()</a>). 
<p>
    </td>
  </tr>
</table>
<a name="z115_7" doxytag="qglviewer::Quaternion::setAxisAngle"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void setAxisAngle </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>v</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const double&nbsp;</td>
          <td class="mdname" nowrap> <em>angle</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
To reset a <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> to the rotation of axis <code>v</code> and angle <code>angle</code> (in radians). 
<p>
    </td>
  </tr>
</table>
<a name="z115_10" doxytag="qglviewer::Quaternion::setFromRotatedBase"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void setFromRotatedBase </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>X</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>Y</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>Z</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Same as <a class="el" href="classqglviewer_1_1Quaternion.html#z115_9">setFromRotationMatrix()</a>, but the input are the three orthogonal axis of a rotated basis: <code>X</code>, <code>Y</code> and <code>Z</code>.     </td>
  </tr>
</table>
<a name="z115_9" doxytag="qglviewer::Quaternion::setFromRotationMatrix"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void setFromRotationMatrix </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const float&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>m</em>[3][3]          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Set the <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> from a (supposedly correct) 3x3 rotation matrix.<p>
Use <a class="el" href="classqglviewer_1_1Quaternion.html#z115_10">setFromRotatedBase()</a> a fill the three columns of the matrix with your basis vectors in order to to set a <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> from the three axis of a rotated frame.     </td>
  </tr>
</table>
<a name="z115_8" doxytag="qglviewer::Quaternion::setValue"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void setValue </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const double&nbsp;</td>
          <td class="mdname" nowrap> <em>q0</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const double&nbsp;</td>
          <td class="mdname" nowrap> <em>q1</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const double&nbsp;</td>
          <td class="mdname" nowrap> <em>q2</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const double&nbsp;</td>
          <td class="mdname" nowrap> <em>q3</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Set the current <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> value. 
<p>
    </td>
  </tr>
</table>
<a name="z125_2" doxytag="qglviewer::Quaternion::slerp"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> slerp </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>a</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>b</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>float&nbsp;</td>
          <td class="mdname" nowrap> <em>t</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>allowFlip</em> = true</td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [static]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns the slerp interpolation of <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> <code>a</code> and <code>b</code>, at time <code>t</code> (in [0,1]). Result is <em>when</em> <code>t=0</code> and <b>when</b> <code>t=1</code>.<p>
When <code>allowFlip</code> is <code>true</code> (default) the slerp interpolation will always use the "shortest path" between the Quaternions' orientations, by "flipping" the source <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> if needed.     </td>
  </tr>
</table>
<a name="z125_3" doxytag="qglviewer::Quaternion::squad"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> squad </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>a</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>tgA</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>tgB</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>b</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>float&nbsp;</td>
          <td class="mdname" nowrap> <em>t</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [static]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns the slerp interpolation of the two <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> <code>a</code> and <code>b</code>, at time <code>t</code> (in [0,1]). The resulting <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> is "between" <code>a</code> and <code>b</code> (result is <code>a</code> when t=0 and is <b>when</b> <code>t=1</code>). The interpolation tangent are defined by <code>tgA</code> and <code>tgB</code> (see <a class="el" href="classqglviewer_1_1Quaternion.html#z125_6">squadTangent()</a>).     </td>
  </tr>
</table>
<a name="z125_6" doxytag="qglviewer::Quaternion::squadTangent"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> squadTangent </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>a</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>b</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>c</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [static]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns a tangent <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a>, which enables a smooth spline interpolation of <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> with <a class="el" href="classqglviewer_1_1Quaternion.html#z125_3">squad()</a>.     </td>
  </tr>
</table>
<hr><h2>Friends And Related Function Documentation</h2>
<a name="z119_4" doxytag="qglviewer::Quaternion::operator *"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> operator * </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>a</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>b</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [friend]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Same as a.rotate(b). 
<p>
    </td>
  </tr>
</table>
<a name="z119_3" doxytag="qglviewer::Quaternion::operator *"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> operator * </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>a</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>b</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [friend]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns the composition of the two rotations (mind the order !). 
<p>
<dl compact><dt><b>Attention:</b></dt><dd>For efficiency reasons, the resulting <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> is not normalized. See <a class="el" href="classqglviewer_1_1Quaternion.html#z121_3">normalize()</a> in case of numerical drift. </dd></dl>
    </td>
  </tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Wed Feb 11 17:22:08 2004 for libQGLViewer by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
</a>1.3.3 </small></address>
</body>
</html>