<!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: SpinningFrame 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 Page</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Compound List</a> | <a class="qindex" href="functions.html">All 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>SpinningFrame Class Reference</h1>A <a class="el" href="classqglviewer_1_1Frame.html">Frame</a> that can have its orientation (and possibly its position) updated at a regular time interval. <a href="#_details">More...</a> <p> Inherits <a class="el" href="classqglviewer_1_1Frame.html">Frame</a>. <p> Inherited by <a class="el" href="classqglviewer_1_1ManipulatedFrame.html">ManipulatedFrame</a>. <p> <a href="classqglviewer_1_1SpinningFrame-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0> <tr><td></td></tr> <tr><td colspan=2><br><h2>Spinning parameters</h2></td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> </td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1SpinningFrame.html#z131_0">spinningQuaternion</a> () const</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classqglviewer_1_1Vec.html">Vec</a> </td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1SpinningFrame.html#z131_1">rotationCenter</a> () const</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1SpinningFrame.html#z131_2">rotatesAroundCenter</a> () const</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1SpinningFrame.html#z131_3">orientationIsFrozen</a> () const</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1SpinningFrame.html#z131_4">setSpinningQuaternion</a> (const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &q)</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1SpinningFrame.html#z131_5">setRotationCenter</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &center)</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1SpinningFrame.html#z131_6">setRotateAroundCenter</a> (const bool rac=true)</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1SpinningFrame.html#z131_7">freezeOrientation</a> (const bool fo=true)</td></tr> <tr><td colspan=2><br><h2>Timer configuration</h2></td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1SpinningFrame.html#z133_0">isSpinning</a> () const</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>int </td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1SpinningFrame.html#z133_1">updateInterval</a> () const</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1SpinningFrame.html#z133_2">startSpinning</a> (const int msecs=-1)</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1SpinningFrame.html#z133_3">stopSpinning</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1SpinningFrame.html#z133_4">setUpdateInterval</a> (const int msecs)</td></tr> <tr><td colspan=2><br><h2>Signals</h2></td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1SpinningFrame.html#l0">spinned</a> ()</td></tr> <tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1SpinningFrame.html#a0">SpinningFrame</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>virtual </td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1SpinningFrame.html#a1">~SpinningFrame</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>virtual QDomElement </td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1SpinningFrame.html#a2">domElement</a> (const QString &name, QDomDocument &doc) const</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1SpinningFrame.html#a3">initFromDOMElement</a> (const QDomElement &de)</td></tr> <tr><td colspan=2><br><h2>Protected Slots</h2></td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1SpinningFrame.html#j0">updateFrame</a> ()</td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> A <a class="el" href="classqglviewer_1_1Frame.html">Frame</a> that can have its orientation (and possibly its position) updated at a regular time interval. <p> A <a class="el" href="classqglviewer_1_1SpinningFrame.html">SpinningFrame</a> is useful to animate some objects of the scene : <div class="fragment"><pre> init() { sf = <span class="keyword">new</span> <a class="code" href="classqglviewer_1_1SpinningFrame.html#a0">SpinningFrame</a>(); <span class="comment">// Update display after each update of the SpinningFrame</span> connect(sf, SIGNAL(<a class="code" href="classqglviewer_1_1SpinningFrame.html#l0">spinned</a>()), SLOT(updateGL())); <span class="comment">// Rotation around the Z axis, with a increment of 0.04 radian.</span> sf->setSpinningQuaternion(Quaternion(Vec(0,0,1), 0.04)); sf->startSpinning(); } draw() { glPushMatrix(); glMultMatrixd(sf->matrix()); <span class="comment">// Draw your spinning object here.</span> glPopMatrix(); } </pre></div><p> When <a class="el" href="classqglviewer_1_1SpinningFrame.html#z131_2">rotatesAroundCenter()</a> is <code>true</code>, the <a class="el" href="classqglviewer_1_1SpinningFrame.html">SpinningFrame</a> will rotate around the <a class="el" href="classqglviewer_1_1SpinningFrame.html#z131_1">rotationCenter()</a> (defined in the world coordinate system). Use <a class="el" href="classqglviewer_1_1SpinningFrame.html#z131_6">setRotateAroundCenter()</a> and <a class="el" href="classqglviewer_1_1SpinningFrame.html#z131_5">setRotationCenter()</a> to change these values.<p> Additionally, when <a class="el" href="classqglviewer_1_1SpinningFrame.html#z131_2">rotatesAroundCenter()</a> is <code>true</code>, you can freeze the <a class="el" href="classqglviewer_1_1Frame.html">Frame</a> orientation using <a class="el" href="classqglviewer_1_1SpinningFrame.html#z131_7">freezeOrientation()</a>. The <a class="el" href="classqglviewer_1_1Frame.html">Frame</a> will then describe circles around the <a class="el" href="classqglviewer_1_1SpinningFrame.html#z131_1">rotationCenter()</a>, but its orientation will remain unchanged.<p> See the <a href="../examples/spinningFrame.html">spinningFrame</a> example for an illustration.<p> The <a class="el" href="classqglviewer_1_1SpinningFrame.html#z131_0">spinningQuaternion()</a> axis is always defined in the <a class="el" href="classqglviewer_1_1SpinningFrame.html">SpinningFrame</a> coordinate system. You may want to use <a class="el" href="classqglviewer_1_1Frame.html#z43_5">Frame::transformOfFrom()</a> to convert this axis from an other <a class="el" href="classqglviewer_1_1Frame.html">Frame</a>.<p> The <a class="el" href="classqglviewer_1_1ManipulatedFrame.html">ManipulatedFrame</a> and <a class="el" href="classqglviewer_1_1ManipulatedCameraFrame.html">ManipulatedCameraFrame</a> classes both derive from this class and can hence have a continuous spinning motion (by default, this happens when the mouse button is released while moving the mouse quickly enough, see <a class="el" href="classqglviewer_1_1ManipulatedFrame.html#z67_6">ManipulatedFrame::setSpinningSensitivity()</a>).<p> When spinning, the <a class="el" href="classqglviewer_1_1SpinningFrame.html">SpinningFrame</a> emits a <a class="el" href="classqglviewer_1_1SpinningFrame.html#l0">spinned()</a> signal, which should usually be connected to the viewer's updateGL() slot, so that successive updates of the <a class="el" href="classqglviewer_1_1SpinningFrame.html">SpinningFrame</a> orientation are all displayed. See the <a class="el" href="classqglviewer_1_1SpinningFrame.html#l0">spinned()</a> documentation for details. <p> <hr><h2>Constructor & Destructor Documentation</h2> <a name="a0" doxytag="qglviewer::SpinningFrame::SpinningFrame"></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_1SpinningFrame.html">SpinningFrame</a> </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Constructor sets default values : <a class="el" href="classqglviewer_1_1SpinningFrame.html#z133_0">isSpinning()</a> is <code>false</code> and <a class="el" href="classqglviewer_1_1SpinningFrame.html#z133_1">updateInterval()</a> is set to 40. </td> </tr> </table> <a name="a1" doxytag="qglviewer::SpinningFrame::~SpinningFrame"></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"> virtual ~<a class="el" href="classqglviewer_1_1SpinningFrame.html">SpinningFrame</a> </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [inline, virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Virtual destructor. Empty. </td> </tr> </table> <hr><h2>Member Function Documentation</h2> <a name="a2" doxytag="qglviewer::SpinningFrame::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">( </td> <td class="md" nowrap valign="top">const QString & </td> <td class="mdname" nowrap> <em>name</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>QDomDocument & </td> <td class="mdname" nowrap> <em>doc</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"> const<code> [virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Creates an XML QDomElement that represents the <a class="el" href="classqglviewer_1_1SpinningFrame.html">SpinningFrame</a>. Add to <a class="el" href="classqglviewer_1_1Frame.html#z49_0">Frame::domElement()</a> the <a class="el" href="classqglviewer_1_1SpinningFrame.html">SpinningFrame</a> specific informations. <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.<p> Use <a class="el" href="classqglviewer_1_1SpinningFrame.html#a3">initFromDOMElement()</a> to restore the <a class="el" href="classqglviewer_1_1SpinningFrame.html">SpinningFrame</a> state from the resulting domElement. <p> Reimplemented from <a class="el" href="classqglviewer_1_1Frame.html#z49_0">Frame</a>. <p> Reimplemented in <a class="el" href="classqglviewer_1_1ManipulatedCameraFrame.html#z63_0">ManipulatedCameraFrame</a>, and <a class="el" href="classqglviewer_1_1ManipulatedFrame.html#z71_0">ManipulatedFrame</a>. </td> </tr> </table> <a name="z131_7" doxytag="qglviewer::SpinningFrame::freezeOrientation"></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 freezeOrientation </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const bool </td> <td class="mdname1" valign="top" nowrap> <em>fo</em> = true </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [inline, slot]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> </td> </tr> </table> <a name="a3" doxytag="qglviewer::SpinningFrame::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">( </td> <td class="md" nowrap valign="top">const QDomElement & </td> <td class="mdname1" valign="top" nowrap> <em>de</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Restore the <a class="el" href="classqglviewer_1_1SpinningFrame.html">SpinningFrame</a> state from a QDomElement created by <a class="el" href="classqglviewer_1_1SpinningFrame.html#a2">domElement()</a>. See also <a class="el" href="classqglviewer_1_1Frame.html#z49_1">Frame::initFromDOMElement()</a>. <p> Reimplemented from <a class="el" href="classqglviewer_1_1Frame.html#z49_1">Frame</a>. <p> Reimplemented in <a class="el" href="classqglviewer_1_1ManipulatedCameraFrame.html#z63_1">ManipulatedCameraFrame</a>, and <a class="el" href="classqglviewer_1_1ManipulatedFrame.html#z71_1">ManipulatedFrame</a>. </td> </tr> </table> <a name="z133_0" doxytag="qglviewer::SpinningFrame::isSpinning"></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"> bool isSpinning </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap> const<code> [inline]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> <code>True</code> when the <a class="el" href="classqglviewer_1_1SpinningFrame.html">SpinningFrame</a> is spinning. <a class="el" href="classqglviewer_1_1SpinningFrame.html#z133_1">updateInterval()</a> returns the update interval. </td> </tr> </table> <a name="z131_3" doxytag="qglviewer::SpinningFrame::orientationIsFrozen"></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"> bool orientationIsFrozen </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap> const<code> [inline]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> </td> </tr> </table> <a name="z131_2" doxytag="qglviewer::SpinningFrame::rotatesAroundCenter"></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"> bool rotatesAroundCenter </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap> const<code> [inline]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> </td> </tr> </table> <a name="z131_1" doxytag="qglviewer::SpinningFrame::rotationCenter"></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> rotationCenter </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap> const<code> [inline]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Current spinning rotation center. Set using <a class="el" href="classqglviewer_1_1SpinningFrame.html#z131_5">setRotationCenter()</a>.<p> See the <a href="#_details">Detailed Description</a> section for more explanations. </td> </tr> </table> <a name="z131_6" doxytag="qglviewer::SpinningFrame::setRotateAroundCenter"></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 setRotateAroundCenter </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const bool </td> <td class="mdname1" valign="top" nowrap> <em>rac</em> = true </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [inline, slot]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> </td> </tr> </table> <a name="z131_5" doxytag="qglviewer::SpinningFrame::setRotationCenter"></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 setRotationCenter </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> & </td> <td class="mdname1" valign="top" nowrap> <em>center</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [inline, slot]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Defines the current <a class="el" href="classqglviewer_1_1SpinningFrame.html#z131_1">rotationCenter()</a>. This value will be used only when <a class="el" href="classqglviewer_1_1SpinningFrame.html#z131_2">rotatesAroundCenter()</a> is <code>true</code>. </td> </tr> </table> <a name="z131_4" doxytag="qglviewer::SpinningFrame::setSpinningQuaternion"></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 setSpinningQuaternion </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> & </td> <td class="mdname1" valign="top" nowrap> <em>q</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [inline, slot]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Defines the current <a class="el" href="classqglviewer_1_1SpinningFrame.html#z131_0">spinningQuaternion()</a>. </td> </tr> </table> <a name="z133_4" doxytag="qglviewer::SpinningFrame::setUpdateInterval"></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 setUpdateInterval </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const int </td> <td class="mdname1" valign="top" nowrap> <em>msecs</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [inline, slot]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Defines the update interval, defined in milliseconds. Default value is 40. Get current value from <a class="el" href="classqglviewer_1_1SpinningFrame.html#z133_1">updateInterval()</a>.<p> <dl compact><dt><b>Attention:</b></dt><dd>A change of the <a class="el" href="classqglviewer_1_1SpinningFrame.html#z133_1">updateInterval()</a> will not be taken into account until next call to <a class="el" href="classqglviewer_1_1SpinningFrame.html#z133_2">startSpinning()</a>. </dd></dl> </td> </tr> </table> <a name="l0" doxytag="qglviewer::SpinningFrame::spinned"></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 spinned </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [signal]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> This signal is emitted whenever the frame is spinning. Connect this signal to any object that should be notified, and especially the viewer(s) : <div class="fragment"><pre> connect(mySpinningFrame, SIGNAL(<a class="code" href="classqglviewer_1_1SpinningFrame.html#l0">spinned</a>()), myViewer, SLOT(updateGL())); </pre></div><p> Use <a class="el" href="classQGLViewer.html#z111_2">QGLViewer::connectSignalToAllViewers()</a> to connect this signal to <em>all</em> the viewers.<p> Note that for every <a class="el" href="classQGLViewer.html">QGLViewer</a>, its <a class="el" href="classQGLViewer.html#z89_1">QGLViewer::manipulatedFrame()</a> and <a class="el" href="classQGLViewer.html#z89_0">QGLViewer::camera()</a>->frame() <em>are</em> <a class="el" href="classqglviewer_1_1SpinningFrame.html">SpinningFrame</a>. For these, the <a class="el" href="classqglviewer_1_1SpinningFrame.html#l0">spinned()</a> signal is automatically connected to the <a class="el" href="classQGLViewer.html">QGLViewer</a> respective updateGL() slots.<p> See also the <a class="el" href="classqglviewer_1_1ManipulatedFrame.html#l0">ManipulatedFrame::manipulated()</a> and <a class="el" href="classqglviewer_1_1KeyFrameInterpolator.html#l0">KeyFrameInterpolator::interpolated()</a> signals documentations. </td> </tr> </table> <a name="z131_0" doxytag="qglviewer::SpinningFrame::spinningQuaternion"></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> spinningQuaternion </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap> const<code> [inline]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> This is the incremental rotation that will be applied to the <a class="el" href="classqglviewer_1_1SpinningFrame.html">SpinningFrame</a> orientation, every <a class="el" href="classqglviewer_1_1SpinningFrame.html#z133_1">updateInterval()</a> milliseconds, when the <a class="el" href="classqglviewer_1_1SpinningFrame.html">SpinningFrame</a> <a class="el" href="classqglviewer_1_1SpinningFrame.html#z133_0">isSpinning()</a>. Default value is a null rotation. Use <a class="el" href="classqglviewer_1_1SpinningFrame.html#z131_4">setSpinningQuaternion()</a> to define this value.<p> More complex rotation motion can be achieved using the <a class="el" href="classqglviewer_1_1SpinningFrame.html#z131_1">rotationCenter()</a> and <a class="el" href="classqglviewer_1_1SpinningFrame.html#z131_7">freezeOrientation()</a>. See the <a href="#_details">Detailed Description</a> section. </td> </tr> </table> <a name="z133_2" doxytag="qglviewer::SpinningFrame::startSpinning"></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 startSpinning </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const int </td> <td class="mdname1" valign="top" nowrap> <em>msecs</em> = -1 </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [virtual, slot]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Starts the spinning of the frame. Use <a class="el" href="classqglviewer_1_1SpinningFrame.html#z133_3">stopSpinning()</a> to stop.<p> <code>msec</code> milliseconds will separate each update of the <a class="el" href="classqglviewer_1_1SpinningFrame.html">SpinningFrame</a> position and orientation. When no interval is specified, the previous <a class="el" href="classqglviewer_1_1SpinningFrame.html#z133_1">updateInterval()</a> is used, otherwise <a class="el" href="classqglviewer_1_1SpinningFrame.html#z133_1">updateInterval()</a> is set to <code>msecs</code>.<p> See the <a href="../examples/spinningFrame.html">spinningFrame</a> example for an illustration. </td> </tr> </table> <a name="z133_3" doxytag="qglviewer::SpinningFrame::stopSpinning"></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"> virtual void stopSpinning </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [inline, virtual, slot]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Stops the spinning which was initiated with <a class="el" href="classqglviewer_1_1SpinningFrame.html#z133_2">startSpinning()</a>. </td> </tr> </table> <a name="j0" doxytag="qglviewer::SpinningFrame::updateFrame"></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 updateFrame </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [protected, slot]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Update the <a class="el" href="classqglviewer_1_1Frame.html">Frame</a> orientation (and possibly position), according to the <a class="el" href="classqglviewer_1_1SpinningFrame.html">SpinningFrame</a> parameters. Emits <a class="el" href="classqglviewer_1_1SpinningFrame.html#l0">spinned()</a>. </td> </tr> </table> <a name="z133_1" doxytag="qglviewer::SpinningFrame::updateInterval"></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"> int updateInterval </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap> const<code> [inline]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Returns the current update interval of the <a class="el" href="classqglviewer_1_1SpinningFrame.html">SpinningFrame</a>. See <a class="el" href="classqglviewer_1_1SpinningFrame.html#z133_0">isSpinning()</a> to know if the <a class="el" href="classqglviewer_1_1Frame.html">Frame</a> is actually spinning. This value can be set with <a class="el" href="classqglviewer_1_1SpinningFrame.html#z133_4">setUpdateInterval()</a> or with <a class="el" href="classqglviewer_1_1SpinningFrame.html#z133_2">startSpinning()</a>. </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>