<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>libQGLViewer: AxisPlaneConstraint Class Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link rel="shortcut icon" href="../images/qglviewer.ico" type="image/x-icon" /><link rel="icon" href="../images/qglviewer.icon.png" type="image/png" /> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.5 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="../index.html"><span>Main Page</span></a></li> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> <li> <form action="search.php" method="get"> <table cellspacing="0" cellpadding="0" border="0"> <tr> <td><label> <u>S</u>earch for </label></td> <td><input type="text" name="query" value="" size="20" accesskey="s"/></td> </tr> </table> </form> </li> </ul> </div> </div> </div> <div class="contents"> <h1>AxisPlaneConstraint Class Reference</h1><!-- doxytag: class="qglviewer::AxisPlaneConstraint" --><!-- doxytag: inherits="qglviewer::Constraint" -->An abstract class for <a class="el" href="classqglviewer_1_1Frame.html" title="The Frame class represents a coordinate system, defined by a position and an orientation...">Frame</a> Constraints defined by an axis or a plane. <a href="#_details">More...</a> <p> Inherits <a class="el" href="classqglviewer_1_1Constraint.html">Constraint</a>. <p> Inherited by <a class="el" href="classqglviewer_1_1CameraConstraint.html">CameraConstraint</a>, <a class="el" href="classqglviewer_1_1LocalConstraint.html">LocalConstraint</a>, and <a class="el" href="classqglviewer_1_1WorldConstraint.html">WorldConstraint</a>. <p> <p> <a href="classqglviewer_1_1AxisPlaneConstraint-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Translation constraint</h2></td></tr> <tr><td colspan="2"><br><br></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_1AxisPlaneConstraint.html#b7d724965c6765209f47c1abe7f7b7b4">constrainTranslation</a> (<a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &translation, <a class="el" href="classqglviewer_1_1Frame.html">Frame</a> *const frame)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#722c30f7303a078681fbf516499579de">setTranslationConstraint</a> (<a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a7">Type</a> type, const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &direction)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#0cee03d4db5722e992c20f042601eaa5">setTranslationConstraintType</a> (<a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a7">Type</a> type)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#2b676c088af158a52724bbbab15d1a65">setTranslationConstraintDirection</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &direction)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a7">Type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#12ad675910ffa86fbabefff2cd6a594a">translationConstraintType</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_1AxisPlaneConstraint.html#431b0d36842122de9db3b4e4f00b8d7c">translationConstraintDirection</a> () const </td></tr> <tr><td colspan="2"><br><h2>Rotation constraint</h2></td></tr> <tr><td colspan="2"><br><br></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_1AxisPlaneConstraint.html#5de5f38e75b58476b7926171dba4b31b">constrainRotation</a> (<a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &rotation, <a class="el" href="classqglviewer_1_1Frame.html">Frame</a> *const frame)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#116f0f394030f165b031287c1e1cf5ea">setRotationConstraint</a> (<a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a7">Type</a> type, const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &direction)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#7c0dc83d6a770742719c8d3ffa67c4e5">setRotationConstraintType</a> (<a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a7">Type</a> type)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#7cb6055005e69d6edac8fbb0d14dd0fa">setRotationConstraintDirection</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &direction)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a7">Type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#61a05b9e18948b2b787e355c90b7b85f">rotationConstraintType</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_1AxisPlaneConstraint.html#f982989dbeb2e0e63c85eecc09bd88d7">rotationConstraintDirection</a> () const </td></tr> <tr><td colspan="2"><br><h2>Public Types</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a7">Type</a> { <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a7cc62d1576546f3245237e1b232d838b6">FREE</a>, <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a71ad785f7d0b0b3a5a52cdd4385785a6b">AXIS</a>, <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a767572d1492c84d8d417b61e864f13f24">PLANE</a>, <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a74b4068e636cd02a6e87e8d3920383d67">FORBIDDEN</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_1AxisPlaneConstraint.html#1049b4e70e2fc0d46b4cfaf93d167515">AxisPlaneConstraint</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_1AxisPlaneConstraint.html#88334a0bc0770afe6bd3af525f70ad9f">~AxisPlaneConstraint</a> ()</td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> An abstract class for <a class="el" href="classqglviewer_1_1Frame.html" title="The Frame class represents a coordinate system, defined by a position and an orientation...">Frame</a> Constraints defined by an axis or a plane. <p> <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html" title="An abstract class for Frame Constraints defined by an axis or a plane.">AxisPlaneConstraint</a> is an interface for (translation and/or rotation) <a class="el" href="classqglviewer_1_1Constraint.html" title="An interface class for Frame constraints.">Constraint</a> that are defined by a direction. <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#12ad675910ffa86fbabefff2cd6a594a">translationConstraintType()</a> and <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#61a05b9e18948b2b787e355c90b7b85f">rotationConstraintType()</a> define how this direction should be interpreted: as an axis (<a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a71ad785f7d0b0b3a5a52cdd4385785a6b">AxisPlaneConstraint::AXIS</a>) or as a plane normal (<a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a767572d1492c84d8d417b61e864f13f24">AxisPlaneConstraint::PLANE</a>). See the <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a7">Type()</a> documentation for details.<p> The three implementations of this class: <a class="el" href="classqglviewer_1_1LocalConstraint.html" title="An AxisPlaneConstraint defined in the Frame local coordinate system.">LocalConstraint</a>, <a class="el" href="classqglviewer_1_1WorldConstraint.html" title="An AxisPlaneConstraint defined in the world coordinate system.">WorldConstraint</a> and <a class="el" href="classqglviewer_1_1CameraConstraint.html" title="An AxisPlaneConstraint defined in the camera coordinate system.">CameraConstraint</a> differ by the coordinate system in which this direction is expressed.<p> Different implementations of this class are illustrated in the <a href="../examples/constrainedCamera.html">contrainedCamera</a> and <a href="../examples/constrainedFrame.html">constrainedFrame</a> examples.<p> <dl class="attention" compact><dt><b>Attention:</b></dt><dd>When applied, the rotational <a class="el" href="classqglviewer_1_1Constraint.html" title="An interface class for Frame constraints.">Constraint</a> may not intuitively follow the mouse displacement. A solution would be to directly measure the rotation angle in screen coordinates, but that would imply to know the <a class="el" href="classQGLViewer.html#27a9e97573822d296b48e1c408b74042">QGLViewer::camera()</a>, so that we can compute the projected coordinates of the rotation center (as is done with the <a class="el" href="classQGLViewer.html#ded669cb17515ea2b5971496f9aef875410b0fa7f49e7eedd6d739db37c67209">SCREEN_ROTATE</a> binding). However, adding an extra pointer to the <a class="el" href="classQGLViewer.html#27a9e97573822d296b48e1c408b74042">QGLViewer::camera()</a> in all the <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html" title="An abstract class for Frame Constraints defined by an axis or a plane.">AxisPlaneConstraint</a> derived classes (which the user would have to update in a multi-viewer application) was judged as an overkill. </dd></dl> <hr><h2>Member Enumeration Documentation</h2> <a class="anchor" name="1d1cfd8ffb84e947f82999c682b666a7"></a><!-- doxytag: member="qglviewer::AxisPlaneConstraint::Type" ref="1d1cfd8ffb84e947f82999c682b666a7" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">enum <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a7">Type</a> </td> </tr> </table> </div> <div class="memdoc"> <p> Type lists the different types of translation and rotation constraints that are available.<p> It specifies the meaning of the constraint direction (see <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#431b0d36842122de9db3b4e4f00b8d7c">translationConstraintDirection()</a> and <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#f982989dbeb2e0e63c85eecc09bd88d7">rotationConstraintDirection()</a>): as an axis direction (<a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a71ad785f7d0b0b3a5a52cdd4385785a6b">AxisPlaneConstraint::AXIS</a>) or a plane normal (<a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a767572d1492c84d8d417b61e864f13f24">AxisPlaneConstraint::PLANE</a>). <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a7cc62d1576546f3245237e1b232d838b6">AxisPlaneConstraint::FREE</a> means no constraint while <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a74b4068e636cd02a6e87e8d3920383d67">AxisPlaneConstraint::FORBIDDEN</a> completely forbids the translation and/or the rotation.<p> See <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#12ad675910ffa86fbabefff2cd6a594a">translationConstraintType()</a> and <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#61a05b9e18948b2b787e355c90b7b85f">rotationConstraintType()</a>.<p> <dl class="attention" compact><dt><b>Attention:</b></dt><dd>The <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a767572d1492c84d8d417b61e864f13f24">AxisPlaneConstraint::PLANE</a> Type is not valid for rotational constraint.</dd></dl> New derived classes can use their own extended enum for specific constraints: <div class="fragment"><pre class="fragment"> <span class="keyword">class </span>MyAxisPlaneConstraint : <span class="keyword">public</span> <a class="code" href="classqglviewer_1_1AxisPlaneConstraint.html#1049b4e70e2fc0d46b4cfaf93d167515">AxisPlaneConstraint</a> { <span class="keyword">public</span>: <span class="keyword">enum</span> MyType { <a class="code" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a7cc62d1576546f3245237e1b232d838b6">FREE</a>, <a class="code" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a71ad785f7d0b0b3a5a52cdd4385785a6b">AXIS</a>, <a class="code" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a767572d1492c84d8d417b61e864f13f24">PLANE</a>, <a class="code" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a74b4068e636cd02a6e87e8d3920383d67">FORBIDDEN</a>, CUSTOM }; <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classqglviewer_1_1AxisPlaneConstraint.html#b7d724965c6765209f47c1abe7f7b7b4">constrainTranslation</a>(Vec &translation, Frame *<span class="keyword">const</span> frame) { <span class="comment">// translationConstraintType() is simply an int. CUSTOM Type is handled seamlessly.</span> <span class="keywordflow">switch</span> (<a class="code" href="classqglviewer_1_1AxisPlaneConstraint.html#12ad675910ffa86fbabefff2cd6a594a">translationConstraintType</a>()) { <span class="keywordflow">case</span> MyAxisPlaneConstraint::FREE: ... <span class="keywordflow">break</span>; <span class="keywordflow">case</span> MyAxisPlaneConstraint::CUSTOM: ... <span class="keywordflow">break</span>; } }; MyAxisPlaneConstraint* c = <span class="keyword">new</span> MyAxisPlaneConstraint(); <span class="comment">// Note the Type conversion</span> c->setTranslationConstraintType(<a class="code" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a7">AxisPlaneConstraint::Type</a>(MyAxisPlaneConstraint::CUSTOM)); }; </pre></div> <dl compact><dt><b>Enumerator: </b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"><em><a class="anchor" name="1d1cfd8ffb84e947f82999c682b666a7cc62d1576546f3245237e1b232d838b6"></a><!-- doxytag: member="FREE" ref="1d1cfd8ffb84e947f82999c682b666a7cc62d1576546f3245237e1b232d838b6" args="" -->FREE</em> </td><td> </td></tr> <tr><td valign="top"><em><a class="anchor" name="1d1cfd8ffb84e947f82999c682b666a71ad785f7d0b0b3a5a52cdd4385785a6b"></a><!-- doxytag: member="AXIS" ref="1d1cfd8ffb84e947f82999c682b666a71ad785f7d0b0b3a5a52cdd4385785a6b" args="" -->AXIS</em> </td><td> </td></tr> <tr><td valign="top"><em><a class="anchor" name="1d1cfd8ffb84e947f82999c682b666a767572d1492c84d8d417b61e864f13f24"></a><!-- doxytag: member="PLANE" ref="1d1cfd8ffb84e947f82999c682b666a767572d1492c84d8d417b61e864f13f24" args="" -->PLANE</em> </td><td> </td></tr> <tr><td valign="top"><em><a class="anchor" name="1d1cfd8ffb84e947f82999c682b666a74b4068e636cd02a6e87e8d3920383d67"></a><!-- doxytag: member="FORBIDDEN" ref="1d1cfd8ffb84e947f82999c682b666a74b4068e636cd02a6e87e8d3920383d67" args="" -->FORBIDDEN</em> </td><td> </td></tr> </table> </dl> </div> </div><p> <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="1049b4e70e2fc0d46b4cfaf93d167515"></a><!-- doxytag: member="qglviewer::AxisPlaneConstraint::AxisPlaneConstraint" ref="1049b4e70e2fc0d46b4cfaf93d167515" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">AxisPlaneConstraint </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Default constructor.<p> <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#12ad675910ffa86fbabefff2cd6a594a">translationConstraintType()</a> and <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#61a05b9e18948b2b787e355c90b7b85f">rotationConstraintType()</a> are set to <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a7cc62d1576546f3245237e1b232d838b6">AxisPlaneConstraint::FREE</a>. <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#431b0d36842122de9db3b4e4f00b8d7c">translationConstraintDirection()</a> and <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#f982989dbeb2e0e63c85eecc09bd88d7">rotationConstraintDirection()</a> are set to (0,0,0). </div> </div><p> <a class="anchor" name="88334a0bc0770afe6bd3af525f70ad9f"></a><!-- doxytag: member="qglviewer::AxisPlaneConstraint::~AxisPlaneConstraint" ref="88334a0bc0770afe6bd3af525f70ad9f" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual ~AxisPlaneConstraint </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Virtual destructor. Empty. </div> </div><p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="b7d724965c6765209f47c1abe7f7b7b4"></a><!-- doxytag: member="qglviewer::AxisPlaneConstraint::constrainTranslation" ref="b7d724965c6765209f47c1abe7f7b7b4" args="(Vec &translation, Frame *const frame)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void constrainTranslation </td> <td>(</td> <td class="paramtype"><a class="el" href="classqglviewer_1_1Vec.html">Vec</a> & </td> <td class="paramname"> <em>translation</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classqglviewer_1_1Frame.html">Frame</a> *const </td> <td class="paramname"> <em>frame</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Overloading of <a class="el" href="classqglviewer_1_1Constraint.html#b7d724965c6765209f47c1abe7f7b7b4">Constraint::constrainTranslation()</a>. Empty <p>Reimplemented from <a class="el" href="classqglviewer_1_1Constraint.html#b7d724965c6765209f47c1abe7f7b7b4">Constraint</a>.</p> <p>Reimplemented in <a class="el" href="classqglviewer_1_1LocalConstraint.html#dc695bfbc605b5631be663b28a4ea9f6">LocalConstraint</a>, <a class="el" href="classqglviewer_1_1WorldConstraint.html#dc695bfbc605b5631be663b28a4ea9f6">WorldConstraint</a>, and <a class="el" href="classqglviewer_1_1CameraConstraint.html#dc695bfbc605b5631be663b28a4ea9f6">CameraConstraint</a>.</p> </div> </div><p> <a class="anchor" name="722c30f7303a078681fbf516499579de"></a><!-- doxytag: member="qglviewer::AxisPlaneConstraint::setTranslationConstraint" ref="722c30f7303a078681fbf516499579de" args="(Type type, const Vec &direction)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void setTranslationConstraint </td> <td>(</td> <td class="paramtype"><a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a7">Type</a> </td> <td class="paramname"> <em>type</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> & </td> <td class="paramname"> <em>direction</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Simply calls <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#0cee03d4db5722e992c20f042601eaa5">setTranslationConstraintType()</a> and <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#2b676c088af158a52724bbbab15d1a65">setTranslationConstraintDirection()</a>. </div> </div><p> <a class="anchor" name="0cee03d4db5722e992c20f042601eaa5"></a><!-- doxytag: member="qglviewer::AxisPlaneConstraint::setTranslationConstraintType" ref="0cee03d4db5722e992c20f042601eaa5" args="(Type type)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void setTranslationConstraintType </td> <td>(</td> <td class="paramtype"><a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a7">Type</a> </td> <td class="paramname"> <em>type</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Sets the <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a7">Type()</a> of the <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#12ad675910ffa86fbabefff2cd6a594a">translationConstraintType()</a>. Default is <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a7cc62d1576546f3245237e1b232d838b6">AxisPlaneConstraint::FREE</a>. </div> </div><p> <a class="anchor" name="2b676c088af158a52724bbbab15d1a65"></a><!-- doxytag: member="qglviewer::AxisPlaneConstraint::setTranslationConstraintDirection" ref="2b676c088af158a52724bbbab15d1a65" args="(const Vec &direction)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void setTranslationConstraintDirection </td> <td>(</td> <td class="paramtype">const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> & </td> <td class="paramname"> <em>direction</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Defines the <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#431b0d36842122de9db3b4e4f00b8d7c">translationConstraintDirection()</a>. The coordinate system where <code>direction</code> is expressed depends on your class implementation. </div> </div><p> <a class="anchor" name="12ad675910ffa86fbabefff2cd6a594a"></a><!-- doxytag: member="qglviewer::AxisPlaneConstraint::translationConstraintType" ref="12ad675910ffa86fbabefff2cd6a594a" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a7">Type</a> translationConstraintType </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const</td> </tr> </table> </div> <div class="memdoc"> <p> Returns the translation constraint <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a7">Type()</a>.<p> Depending on this value, the <a class="el" href="classqglviewer_1_1Frame.html" title="The Frame class represents a coordinate system, defined by a position and an orientation...">Frame</a> will freely translate (<a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a7cc62d1576546f3245237e1b232d838b6">AxisPlaneConstraint::FREE</a>), will only be able to translate along an axis direction (<a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a71ad785f7d0b0b3a5a52cdd4385785a6b">AxisPlaneConstraint::AXIS</a>), will be forced to stay into a plane (<a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a767572d1492c84d8d417b61e864f13f24">AxisPlaneConstraint::PLANE</a>) or will not able to translate at all (<a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a74b4068e636cd02a6e87e8d3920383d67">AxisPlaneConstraint::FORBIDDEN</a>).<p> Use <a class="el" href="classqglviewer_1_1Frame.html#24f5da9b3f4bf4e71dfad7a74a932e52">Frame::setPosition()</a> to define the position of the constrained <a class="el" href="classqglviewer_1_1Frame.html" title="The Frame class represents a coordinate system, defined by a position and an orientation...">Frame</a> before it gets constrained. </div> </div><p> <a class="anchor" name="431b0d36842122de9db3b4e4f00b8d7c"></a><!-- doxytag: member="qglviewer::AxisPlaneConstraint::translationConstraintDirection" ref="431b0d36842122de9db3b4e4f00b8d7c" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classqglviewer_1_1Vec.html">Vec</a> translationConstraintDirection </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const</td> </tr> </table> </div> <div class="memdoc"> <p> Returns the direction used by the translation constraint.<p> It represents the axis direction (<a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a71ad785f7d0b0b3a5a52cdd4385785a6b">AxisPlaneConstraint::AXIS</a>) or the plane normal (<a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a767572d1492c84d8d417b61e864f13f24">AxisPlaneConstraint::PLANE</a>) depending on the <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#12ad675910ffa86fbabefff2cd6a594a">translationConstraintType()</a>. It is undefined for <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a7cc62d1576546f3245237e1b232d838b6">AxisPlaneConstraint::FREE</a> or <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a74b4068e636cd02a6e87e8d3920383d67">AxisPlaneConstraint::FORBIDDEN</a>.<p> The <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html" title="An abstract class for Frame Constraints defined by an axis or a plane.">AxisPlaneConstraint</a> derived classes express this direction in different coordinate system (camera for <a class="el" href="classqglviewer_1_1CameraConstraint.html" title="An AxisPlaneConstraint defined in the camera coordinate system.">CameraConstraint</a>, local for <a class="el" href="classqglviewer_1_1LocalConstraint.html" title="An AxisPlaneConstraint defined in the Frame local coordinate system.">LocalConstraint</a>, and world for <a class="el" href="classqglviewer_1_1WorldConstraint.html" title="An AxisPlaneConstraint defined in the world coordinate system.">WorldConstraint</a>). This value can be modified with <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#2b676c088af158a52724bbbab15d1a65">setTranslationConstraintDirection()</a>. </div> </div><p> <a class="anchor" name="5de5f38e75b58476b7926171dba4b31b"></a><!-- doxytag: member="qglviewer::AxisPlaneConstraint::constrainRotation" ref="5de5f38e75b58476b7926171dba4b31b" args="(Quaternion &rotation, Frame *const frame)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void constrainRotation </td> <td>(</td> <td class="paramtype"><a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> & </td> <td class="paramname"> <em>rotation</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classqglviewer_1_1Frame.html">Frame</a> *const </td> <td class="paramname"> <em>frame</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Overloading of <a class="el" href="classqglviewer_1_1Constraint.html#5de5f38e75b58476b7926171dba4b31b">Constraint::constrainRotation()</a>. Empty. <p>Reimplemented from <a class="el" href="classqglviewer_1_1Constraint.html#5de5f38e75b58476b7926171dba4b31b">Constraint</a>.</p> <p>Reimplemented in <a class="el" href="classqglviewer_1_1LocalConstraint.html#71c099a2c356f715f8bf34052875cd25">LocalConstraint</a>, <a class="el" href="classqglviewer_1_1WorldConstraint.html#71c099a2c356f715f8bf34052875cd25">WorldConstraint</a>, and <a class="el" href="classqglviewer_1_1CameraConstraint.html#71c099a2c356f715f8bf34052875cd25">CameraConstraint</a>.</p> </div> </div><p> <a class="anchor" name="116f0f394030f165b031287c1e1cf5ea"></a><!-- doxytag: member="qglviewer::AxisPlaneConstraint::setRotationConstraint" ref="116f0f394030f165b031287c1e1cf5ea" args="(Type type, const Vec &direction)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void setRotationConstraint </td> <td>(</td> <td class="paramtype"><a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a7">Type</a> </td> <td class="paramname"> <em>type</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> & </td> <td class="paramname"> <em>direction</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Simply calls <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#7c0dc83d6a770742719c8d3ffa67c4e5">setRotationConstraintType()</a> and <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#7cb6055005e69d6edac8fbb0d14dd0fa">setRotationConstraintDirection()</a>. </div> </div><p> <a class="anchor" name="7c0dc83d6a770742719c8d3ffa67c4e5"></a><!-- doxytag: member="qglviewer::AxisPlaneConstraint::setRotationConstraintType" ref="7c0dc83d6a770742719c8d3ffa67c4e5" args="(Type type)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void setRotationConstraintType </td> <td>(</td> <td class="paramtype"><a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a7">Type</a> </td> <td class="paramname"> <em>type</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Set the <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a7">Type()</a> of the <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#61a05b9e18948b2b787e355c90b7b85f">rotationConstraintType()</a>. Default is <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a7cc62d1576546f3245237e1b232d838b6">AxisPlaneConstraint::FREE</a>.<p> Depending on this value, the <a class="el" href="classqglviewer_1_1Frame.html" title="The Frame class represents a coordinate system, defined by a position and an orientation...">Frame</a> will freely rotate (<a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a7cc62d1576546f3245237e1b232d838b6">AxisPlaneConstraint::FREE</a>), will only be able to rotate around an axis (<a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a71ad785f7d0b0b3a5a52cdd4385785a6b">AxisPlaneConstraint::AXIS</a>), or will not able to rotate at all (<a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a74b4068e636cd02a6e87e8d3920383d67">AxisPlaneConstraint::FORBIDDEN</a>).<p> Use <a class="el" href="classqglviewer_1_1Frame.html#6733704520780505759efdef38a68b8b">Frame::setOrientation()</a> to define the orientation of the constrained <a class="el" href="classqglviewer_1_1Frame.html" title="The Frame class represents a coordinate system, defined by a position and an orientation...">Frame</a> before it gets constrained.<p> <dl class="attention" compact><dt><b>Attention:</b></dt><dd>An <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a767572d1492c84d8d417b61e864f13f24">AxisPlaneConstraint::PLANE</a> <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a7">Type()</a> is not meaningful for rotational constraints and will be ignored. </dd></dl> </div> </div><p> <a class="anchor" name="7cb6055005e69d6edac8fbb0d14dd0fa"></a><!-- doxytag: member="qglviewer::AxisPlaneConstraint::setRotationConstraintDirection" ref="7cb6055005e69d6edac8fbb0d14dd0fa" args="(const Vec &direction)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void setRotationConstraintDirection </td> <td>(</td> <td class="paramtype">const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> & </td> <td class="paramname"> <em>direction</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Defines the <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#f982989dbeb2e0e63c85eecc09bd88d7">rotationConstraintDirection()</a>. The coordinate system where <code>direction</code> is expressed depends on your class implementation. </div> </div><p> <a class="anchor" name="61a05b9e18948b2b787e355c90b7b85f"></a><!-- doxytag: member="qglviewer::AxisPlaneConstraint::rotationConstraintType" ref="61a05b9e18948b2b787e355c90b7b85f" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a7">Type</a> rotationConstraintType </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const</td> </tr> </table> </div> <div class="memdoc"> <p> Returns the rotation constraint <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a7">Type()</a>. </div> </div><p> <a class="anchor" name="f982989dbeb2e0e63c85eecc09bd88d7"></a><!-- doxytag: member="qglviewer::AxisPlaneConstraint::rotationConstraintDirection" ref="f982989dbeb2e0e63c85eecc09bd88d7" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classqglviewer_1_1Vec.html">Vec</a> rotationConstraintDirection </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const</td> </tr> </table> </div> <div class="memdoc"> <p> Returns the axis direction used by the rotation constraint.<p> This direction is defined only when <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#61a05b9e18948b2b787e355c90b7b85f">rotationConstraintType()</a> is <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#1d1cfd8ffb84e947f82999c682b666a71ad785f7d0b0b3a5a52cdd4385785a6b">AxisPlaneConstraint::AXIS</a>.<p> The <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html" title="An abstract class for Frame Constraints defined by an axis or a plane.">AxisPlaneConstraint</a> derived classes express this direction in different coordinate system (camera for <a class="el" href="classqglviewer_1_1CameraConstraint.html" title="An AxisPlaneConstraint defined in the camera coordinate system.">CameraConstraint</a>, local for <a class="el" href="classqglviewer_1_1LocalConstraint.html" title="An AxisPlaneConstraint defined in the Frame local coordinate system.">LocalConstraint</a>, and world for <a class="el" href="classqglviewer_1_1WorldConstraint.html" title="An AxisPlaneConstraint defined in the world coordinate system.">WorldConstraint</a>). This value can be modified with <a class="el" href="classqglviewer_1_1AxisPlaneConstraint.html#7cb6055005e69d6edac8fbb0d14dd0fa">setRotationConstraintDirection()</a>. </div> </div><p> </div> <hr size="1"><address style="text-align: right;"><small>libQGLViewer 2.3.1 documentation generated by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address> </body> </html>