Sophie

Sophie

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

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: ManipulatedFrame 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>ManipulatedFrame Class Reference</h1>A <a class="el" href="classqglviewer_1_1Frame.html">Frame</a> that can be rotated and translated with the mouse.  
<a href="#_details">More...</a>
<p>
Inherits <a class="el" href="classqglviewer_1_1SpinningFrame.html">SpinningFrame</a>, and <a class="el" href="classqglviewer_1_1MouseGrabber.html">MouseGrabber</a>.
<p>
Inherited by <a class="el" href="classqglviewer_1_1ManipulatedCameraFrame.html">ManipulatedCameraFrame</a>.
<p>
<a href="classqglviewer_1_1ManipulatedFrame-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Manipulation sensitivity</h2></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_1ManipulatedFrame.html#z67_0">rotationSensitivity</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_1ManipulatedFrame.html#z67_1">translationSensitivity</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_1ManipulatedFrame.html#z67_2">spinningSensitivity</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_1ManipulatedFrame.html#z67_3">wheelSensitivity</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_1ManipulatedFrame.html#z67_4">setRotationSensitivity</a> (const float s)</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_1ManipulatedFrame.html#z67_5">setTranslationSensitivity</a> (const float s)</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_1ManipulatedFrame.html#z67_6">setSpinningSensitivity</a> (const float s)</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_1ManipulatedFrame.html#z67_7">setWheelSensitivity</a> (const float s)</td></tr>

<tr><td colspan=2><br><h2>Current state</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1ManipulatedFrame.html#z69_0">isManipulated</a> () const</td></tr>

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

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

<tr><td colspan=2><br><h2>Mouse event handlers</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1ManipulatedFrame.html#z73_0">mousePressEvent</a> (QMouseEvent *const, <a class="el" href="classqglviewer_1_1Camera.html">Camera</a> *const)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1ManipulatedFrame.html#z73_1">mouseReleaseEvent</a> (QMouseEvent *const, <a class="el" href="classqglviewer_1_1Camera.html">Camera</a> *const)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1ManipulatedFrame.html#z73_2">mouseMoveEvent</a> (QMouseEvent *const, const <a class="el" href="classqglviewer_1_1Camera.html">Camera</a> *const)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1ManipulatedFrame.html#z73_3">wheelEvent</a> (QWheelEvent *const, const <a class="el" href="classqglviewer_1_1Camera.html">Camera</a> *const camera)</td></tr>

<tr><td colspan=2><br><h2>Mouse Grabber implementation</h2></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_1ManipulatedFrame.html#z75_0">checkIfGrabsMouse</a> (int x, int y, const <a class="el" href="classqglviewer_1_1Camera.html">Camera</a> *const camera)</td></tr>

<tr><td colspan=2><br><h2>Signals</h2></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_1ManipulatedFrame.html#l0">manipulated</a> ()</td></tr>

<tr><td colspan=2><br><h2>Public Member Functions</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_1ManipulatedFrame.html#a0">ManipulatedFrame</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>virtual&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1ManipulatedFrame.html#a1">~ManipulatedFrame</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 be rotated and translated with the mouse. 
<p>
A <a class="el" href="classqglviewer_1_1ManipulatedFrame.html">ManipulatedFrame</a> is a local coordinate system (a <a class="el" href="classqglviewer_1_1Frame.html">Frame</a>) that can be moved in the 3D scene using the mouse. The <a class="el" href="classqglviewer_1_1ManipulatedFrame.html">ManipulatedFrame</a> converts the mouse motion in a translation and orientation update. You can then use the <a class="el" href="classqglviewer_1_1ManipulatedFrame.html">ManipulatedFrame</a> to move an object or a point in the scene.<p>
A <a class="el" href="classqglviewer_1_1ManipulatedFrame.html">ManipulatedFrame</a> is attached to a <a class="el" href="classQGLViewer.html">QGLViewer</a> using <a class="el" href="classQGLViewer.html#z89_3">QGLViewer::setManipulatedFrame()</a>: <div class="fragment"><pre>  init() { setManipulatedFrame( <span class="keyword">new</span> <a class="code" href="classqglviewer_1_1ManipulatedFrame.html#a0">ManipulatedFrame</a>() ); }

  draw()
  {
    glPushMatrix();
    glMultMatrixd(manipulatedFrame()-&gt;<a class="code" href="classqglviewer_1_1Frame.html#z47_0">matrix</a>());
    <span class="comment">// draw the manipulated object here</span>
    glPopMatrix();
  }
</pre></div>You have to press the <a class="el" href="classQGLViewer.html#z107_13x14">QGLViewer::FRAME</a> state key (default is <code>Control</code>) to move the <a class="el" href="classQGLViewer.html#z89_1">QGLViewer::manipulatedFrame()</a>.<p>
The <a href="../examples/manipulatedFrame.html">manipulatedFrame</a> example details a complete application. See the <a href="../mouse.html">mouse page</a> for a description of the mouse button bindings.<p>
<h3>Inherited functionalities</h3>
<p>
A <a class="el" href="classqglviewer_1_1ManipulatedFrame.html">ManipulatedFrame</a> is an overloaded instance of a <a class="el" href="classqglviewer_1_1Frame.html">Frame</a>. The powerful coordinate system transformation functions (<a class="el" href="classqglviewer_1_1Frame.html#z41_0">Frame::coordinatesOf()</a>, <a class="el" href="classqglviewer_1_1Frame.html#z43_0">Frame::transformOf()</a>, ...) can hence be applied to a <a class="el" href="classqglviewer_1_1ManipulatedFrame.html">ManipulatedFrame</a>.<p>
A <a class="el" href="classqglviewer_1_1ManipulatedFrame.html">ManipulatedFrame</a> is also a <a class="el" href="classqglviewer_1_1SpinningFrame.html">SpinningFrame</a>, and you can make the <a class="el" href="classqglviewer_1_1ManipulatedFrame.html">ManipulatedFrame</a> spin is you release the rotation mouse button while moving the mouse fast enough (see <a class="el" href="classqglviewer_1_1ManipulatedFrame.html#z67_2">spinningSensitivity()</a>).<p>
Finally, a <a class="el" href="classqglviewer_1_1ManipulatedFrame.html">ManipulatedFrame</a> is a <a class="el" href="classqglviewer_1_1MouseGrabber.html">MouseGrabber</a>. If the mouse cursor gets within a distance of 10 pixels from the projected position of the <a class="el" href="classqglviewer_1_1ManipulatedFrame.html">ManipulatedFrame</a>, the <a class="el" href="classqglviewer_1_1ManipulatedFrame.html">ManipulatedFrame</a> becomes the new <a class="el" href="classQGLViewer.html#z95_0">QGLViewer::mouseGrabber()</a>. It can then be manipulated directly, without any specific state key, object selection or GUI intervention. This is very convenient to directly move some objects of the scene (typically a light). See the <a href="../examples/mouseGrabber.html">mouseGrabber</a> example as an illustration. Note that QWidget::setMouseTracking() needs to be enabled in order to use this feature (see the <a class="el" href="classqglviewer_1_1MouseGrabber.html">MouseGrabber</a> documentation).<p>
<h3>Advanced functionalities</h3>
<p>
A <a class="el" href="classQGLViewer.html">QGLViewer</a> can handle at most one <a class="el" href="classqglviewer_1_1ManipulatedFrame.html">ManipulatedFrame</a> at a time. If you want to move several objects in the scene, you simply have to keep a list of the different ManipulatedFrames, and to activate the right one (using setManipulatedFrame()), for instance according to an object selection (see the <a href="../examples/luxo.html">luxo</a> example).<p>
When the <a class="el" href="classqglviewer_1_1ManipulatedFrame.html">ManipulatedFrame</a> is being manipulated using the mouse (mouse pressed and not yet released), <a class="el" href="classqglviewer_1_1ManipulatedFrame.html#z69_0">isManipulated()</a> returns <code>true</code>, and it might be checked for a specific action (as in <a class="el" href="classQGLViewer.html#b7">QGLViewer::fastDraw()</a>).<p>
The <a class="el" href="classqglviewer_1_1ManipulatedFrame.html">ManipulatedFrame</a> also emits a <a class="el" href="classqglviewer_1_1ManipulatedFrame.html#l0">manipulated()</a> signal each time its state is modified with the mouse. This signal is automatically connected to the viewer's updateGL() slot, when the <a class="el" href="classqglviewer_1_1ManipulatedFrame.html">ManipulatedFrame</a> is attached to a viewer using <a class="el" href="classQGLViewer.html#z89_3">QGLViewer::setManipulatedFrame()</a>. See the <a class="el" href="classqglviewer_1_1ManipulatedFrame.html#l0">manipulated()</a> documentation for details.<p>
Combined with the object selection (see the <a href="../examples/select.html">select</a> example), the <a class="el" href="classqglviewer_1_1MouseGrabber.html">MouseGrabber</a> properties and a dynamic update of the scene, the <a class="el" href="classqglviewer_1_1ManipulatedFrame.html">ManipulatedFrame</a> introduces a great reactivity in your applications. 
<p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a name="a0" doxytag="qglviewer::ManipulatedFrame::ManipulatedFrame"></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_1ManipulatedFrame.html">ManipulatedFrame</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></td>
        </tr>

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

<p>
Creates a default manipulatedFrame. Translation is (0,0,0), with an identity rotation (0,0,0,1).     </td>
  </tr>
</table>
<a name="a1" doxytag="qglviewer::ManipulatedFrame::~ManipulatedFrame"></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_1ManipulatedFrame.html">ManipulatedFrame</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, virtual]</code></td>
        </tr>

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

<p>
Virtual destructor. Empty.     </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a name="z75_0" doxytag="qglviewer::ManipulatedFrame::checkIfGrabsMouse"></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 checkIfGrabsMouse </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">int&nbsp;</td>
          <td class="mdname" nowrap> <em>x</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>int&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_1Camera.html">Camera</a> *const&nbsp;</td>
          <td class="mdname" nowrap> <em>camera</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [protected, virtual]</code></td>
        </tr>

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

<p>
Default implementation of the <a class="el" href="classqglviewer_1_1MouseGrabber.html">MouseGrabber</a> main function. <a class="el" href="classqglviewer_1_1MouseGrabber.html#z77_1">MouseGrabber::grabsMouse()</a> is set to <code>true</code> when the mouse is within a 10 pixels region around the <a class="el" href="classqglviewer_1_1Camera.html#z19_0">Camera::projectedCoordinatesOf()</a> <a class="el" href="classqglviewer_1_1Frame.html#z33_10">position()</a>.<p>
See the <a href="../examples/mouseGrabber.html">mouseGrabber example</a> for an illustration. 
<p>
Implements <a class="el" href="classqglviewer_1_1MouseGrabber.html#z77_0">MouseGrabber</a>.    </td>
  </tr>
</table>
<a name="z71_0" doxytag="qglviewer::ManipulatedFrame::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<code> [virtual]</code></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_1ManipulatedFrame.html">ManipulatedFrame</a>. Add to <a class="el" href="classqglviewer_1_1SpinningFrame.html#a2">SpinningFrame::domElement()</a> the <a class="el" href="classqglviewer_1_1ManipulatedFrame.html">ManipulatedFrame</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_1ManipulatedFrame.html#z71_1">initFromDOMElement()</a> to restore the <a class="el" href="classqglviewer_1_1ManipulatedFrame.html">ManipulatedFrame</a> state from the resulting domElement. 
<p>
Reimplemented from <a class="el" href="classqglviewer_1_1SpinningFrame.html#a2">SpinningFrame</a>.
<p>
Reimplemented in <a class="el" href="classqglviewer_1_1ManipulatedCameraFrame.html#z63_0">ManipulatedCameraFrame</a>.    </td>
  </tr>
</table>
<a name="z71_1" doxytag="qglviewer::ManipulatedFrame::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><code> [virtual]</code></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_1ManipulatedFrame.html">ManipulatedFrame</a> state from a QDomElement created by <a class="el" href="classqglviewer_1_1ManipulatedFrame.html#z71_0">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_1SpinningFrame.html#a3">SpinningFrame</a>.
<p>
Reimplemented in <a class="el" href="classqglviewer_1_1ManipulatedCameraFrame.html#z63_1">ManipulatedCameraFrame</a>.    </td>
  </tr>
</table>
<a name="z69_0" doxytag="qglviewer::ManipulatedFrame::isManipulated"></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 isManipulated </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>
<code>True</code> when the <a class="el" href="classqglviewer_1_1ManipulatedFrame.html">ManipulatedFrame</a> is being manipulated with the mouse. Can be used to manually simulate the <a class="el" href="classQGLViewer.html#b7">QGLViewer::fastDraw()</a> function. Used by <a class="el" href="classQGLViewer.html">QGLViewer</a>.     </td>
  </tr>
</table>
<a name="l0" doxytag="qglviewer::ManipulatedFrame::manipulated"></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 manipulated </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> [signal]</code></td>
        </tr>

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

<p>
This signal is emitted whenever the frame is manipulated (i.e. rotated or translated) using the mouse. Connect this signal to any object that should be notified.<p>
Note that this signal is automatically connected to the viewer's updateGL() slot, when the <a class="el" href="classqglviewer_1_1ManipulatedFrame.html">ManipulatedFrame</a> is attached to a viewer using <a class="el" href="classQGLViewer.html#z89_3">QGLViewer::setManipulatedFrame()</a>, which is probably all you need.<p>
However, when you have several viewers that display the same scene, it may be interesting to update <em>all</em> the viewers when a <a class="el" href="classqglviewer_1_1ManipulatedFrame.html">ManipulatedFrame</a> (hence an object) is manipulated in any of these viewers. Simply use this code to achieve this behavior: <div class="fragment"><pre>    <a class="code" href="classQGLViewer.html#z111_2">QGLViewer::connectSignalToAllViewers</a>(myManipulatedFrame, SIGNAL(<a class="code" href="classqglviewer_1_1ManipulatedFrame.html#l0">manipulated</a>()));
</pre></div><p>
See also the <a class="el" href="classqglviewer_1_1KeyFrameInterpolator.html#l0">KeyFrameInterpolator::interpolated()</a> and spinningFrame::spinned() signals documentations.     </td>
  </tr>
</table>
<a name="z73_2" doxytag="qglviewer::ManipulatedFrame::mouseMoveEvent"></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 mouseMoveEvent </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">QMouseEvent *&nbsp;</td>
          <td class="mdname" nowrap> <em>const</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="classqglviewer_1_1Camera.html">Camera</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>const</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [protected, virtual]</code></td>
        </tr>

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

<p>
Move the manipulated frame according to the mouse motion. The camera is given as an argument so that its parameters (width and height of the window, fieldOfView) are available in order to fit the mouse motion and the display. Emits <a class="el" href="classqglviewer_1_1ManipulatedFrame.html#l0">manipulated()</a>. 
<p>
Reimplemented from <a class="el" href="classqglviewer_1_1MouseGrabber.html#z81_3">MouseGrabber</a>.
<p>
Reimplemented in <a class="el" href="classqglviewer_1_1ManipulatedCameraFrame.html#z65_1">ManipulatedCameraFrame</a>.    </td>
  </tr>
</table>
<a name="z73_0" doxytag="qglviewer::ManipulatedFrame::mousePressEvent"></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 mousePressEvent </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">QMouseEvent *&nbsp;</td>
          <td class="mdname" nowrap> <em>const</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="classqglviewer_1_1Camera.html">Camera</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>const</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [protected, virtual]</code></td>
        </tr>

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

<p>
The mouse behavior depends on which button is pressed. See the <a href="../mouse.html"><a class="el" href="classQGLViewer.html">QGLViewer</a> mouse page</a> for details. 
<p>
Reimplemented from <a class="el" href="classqglviewer_1_1MouseGrabber.html#z81_0">MouseGrabber</a>.    </td>
  </tr>
</table>
<a name="z73_1" doxytag="qglviewer::ManipulatedFrame::mouseReleaseEvent"></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 mouseReleaseEvent </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">QMouseEvent *&nbsp;</td>
          <td class="mdname" nowrap> <em>const</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="classqglviewer_1_1Camera.html">Camera</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>const</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [protected, virtual]</code></td>
        </tr>

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

<p>
When the user releases the mouse button, the manipulatedFrame action is stopped.<p>
If the action was a rotation, a continuous spinning is possible if the speed of the cursor is larger than <a class="el" href="classqglviewer_1_1ManipulatedFrame.html#z67_2">spinningSensitivity()</a> when the button is released. Press the rotate button again to stop the spinning. 
<p>
Reimplemented from <a class="el" href="classqglviewer_1_1MouseGrabber.html#z81_2">MouseGrabber</a>.
<p>
Reimplemented in <a class="el" href="classqglviewer_1_1ManipulatedCameraFrame.html#z65_0">ManipulatedCameraFrame</a>.    </td>
  </tr>
</table>
<a name="z67_0" doxytag="qglviewer::ManipulatedFrame::rotationSensitivity"></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 rotationSensitivity </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 current <a class="el" href="classqglviewer_1_1ManipulatedFrame.html#z67_0">rotationSensitivity()</a> as defined by <a class="el" href="classqglviewer_1_1ManipulatedFrame.html#z67_4">setRotationSensitivity()</a>. Default value is 1.0     </td>
  </tr>
</table>
<a name="z67_4" doxytag="qglviewer::ManipulatedFrame::setRotationSensitivity"></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 setRotationSensitivity </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>s</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline, slot]</code></td>
        </tr>

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

<p>
Defines the influence of a mouse displacement on the frame rotation (default value is 1.0). See <a class="el" href="classqglviewer_1_1ManipulatedFrame.html#z67_0">rotationSensitivity()</a>.     </td>
  </tr>
</table>
<a name="z67_6" doxytag="qglviewer::ManipulatedFrame::setSpinningSensitivity"></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 setSpinningSensitivity </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>s</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline, slot]</code></td>
        </tr>

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

<p>
Defines the <a class="el" href="classqglviewer_1_1ManipulatedFrame.html#z67_2">spinningSensitivity()</a>. Default value is 0.3 (pixels per milliseconds).     </td>
  </tr>
</table>
<a name="z67_5" doxytag="qglviewer::ManipulatedFrame::setTranslationSensitivity"></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 setTranslationSensitivity </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>s</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline, slot]</code></td>
        </tr>

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

<p>
Defines the influence of a mouse displacement on the frame translation. Default value is 1.0. See <a class="el" href="classqglviewer_1_1ManipulatedFrame.html#z67_1">translationSensitivity()</a>.     </td>
  </tr>
</table>
<a name="z67_7" doxytag="qglviewer::ManipulatedFrame::setWheelSensitivity"></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 setWheelSensitivity </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>s</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline, slot]</code></td>
        </tr>

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

<p>
Defines the <a class="el" href="classqglviewer_1_1ManipulatedFrame.html#z67_3">wheelSensitivity()</a>. Default value is 1.0.     </td>
  </tr>
</table>
<a name="z67_2" doxytag="qglviewer::ManipulatedFrame::spinningSensitivity"></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 spinningSensitivity </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 minimum mouse speed required to make the <a class="el" href="classqglviewer_1_1Frame.html">Frame</a> spin when the mouse button is released. Mouse speed is expressed in pixels per milliseconds. Default value is 0.3 (300 pixels per second). Use <a class="el" href="classqglviewer_1_1ManipulatedFrame.html#z67_6">setSpinningSensitivity()</a> to tune this value. A higher value will make auto spinning more difficult (a value of 100.0 means forbid spinning in practice).     </td>
  </tr>
</table>
<a name="z67_1" doxytag="qglviewer::ManipulatedFrame::translationSensitivity"></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 translationSensitivity </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 current <a class="el" href="classqglviewer_1_1ManipulatedFrame.html#z67_1">translationSensitivity()</a> as defined by <a class="el" href="classqglviewer_1_1ManipulatedFrame.html#z67_5">setTranslationSensitivity()</a> (default value is 1.0).<p>
<dl compact><dt><b>Note:</b></dt><dd>You should not have to modify this value as the frame translation is computed so that the frame exactly matches the mouse trajectory, which is an intuitive behavior.<p>
When the manipulated frame is used to move a <em><a class="el" href="classqglviewer_1_1Camera.html">Camera</a></em> (see the <a class="el" href="classqglviewer_1_1ManipulatedCameraFrame.html">ManipulatedCameraFrame</a> class documentation), after zooming on a small region of your scene, the camera may translate too fast. For a camera, it is the <a class="el" href="classqglviewer_1_1Camera.html#z9_0">Camera::revolveAroundPoint()</a> that exactly matches the mouse displacement. Hence, instead of changing the <a class="el" href="classqglviewer_1_1ManipulatedFrame.html#z67_1">translationSensitivity()</a> to solve the problem, you simply have to (temporarily) set the <a class="el" href="classqglviewer_1_1Camera.html#z9_0">Camera::revolveAroundPoint()</a> to a point of the small region of your scene (see the <a href="../mouse.html">mouse page</a> for the RAP_FROM_PIXEL mouse binding, default is a double click on left button while pressing right button). </dd></dl>
    </td>
  </tr>
</table>
<a name="z73_3" doxytag="qglviewer::ManipulatedFrame::wheelEvent"></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 wheelEvent </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">QWheelEvent *&nbsp;</td>
          <td class="mdname" nowrap> <em>const</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="classqglviewer_1_1Camera.html">Camera</a> *const&nbsp;</td>
          <td class="mdname" nowrap> <em>camera</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [protected, virtual]</code></td>
        </tr>

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

<p>
Using the wheel is equivalent to a ZOOM action. See <a class="el" href="classQGLViewer.html#z107_9">QGLViewer::setWheelBinding()</a> and <a class="el" href="classqglviewer_1_1ManipulatedFrame.html#z67_7">setWheelSensitivity()</a>.<p>
Depending on your system configuration, you may have to actually <em>press</em> the wheel while wheeling. 
<p>
Reimplemented from <a class="el" href="classqglviewer_1_1MouseGrabber.html#z81_4">MouseGrabber</a>.
<p>
Reimplemented in <a class="el" href="classqglviewer_1_1ManipulatedCameraFrame.html#z65_2">ManipulatedCameraFrame</a>.    </td>
  </tr>
</table>
<a name="z67_3" doxytag="qglviewer::ManipulatedFrame::wheelSensitivity"></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 wheelSensitivity </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>
Current wheel sensitivity. Default value is 1.0. Defined using <a class="el" href="classqglviewer_1_1ManipulatedFrame.html#z67_7">setWheelSensitivity()</a>.<p>
A higher value will make the wheel action more effective (usually means a faster zoom).     </td>
  </tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Wed Feb 11 17:22:07 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>