Sophie

Sophie

distrib > Fedora > 16 > i386 > by-pkgid > 942400fecdd956c4a42f319760a792c6 > files > 112

libQGLViewer-doc-2.3.9-1.fc16.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>libQGLViewer: Frame Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<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="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.2 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
  <div class="tabs2">
    <ul class="tablist">
      <li><a href="../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>

      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div class="navpath">
    <ul>
      <li>Frame      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#signals">Signals</a> &#124;
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<h1>Frame Class Reference</h1>  </div>
</div>
<div class="contents">
<!-- doxytag: class="qglviewer::Frame" -->
<p>The Frame class represents a coordinate system, defined by a position and an orientation.  
<a href="#_details">More...</a></p>

<p><a href="classqglviewer_1_1Frame-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="signals"></a>
Signals</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#ab6722375e68e03d151762ebfc83c5459">modified</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#ab55c2a4f1732b90057fae4b6037399de">interpolated</a> ()</td></tr>
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#ab71e6ee46f0c2593266f9a62d9c5e029">Frame</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#ae0c994a30d9a018000fe8ad66ff0a86d">~Frame</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a7864fb955cec11fe78c3b2bb81230516">Frame</a> (const Frame &amp;frame)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Frame &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#aeb0f5ceffbb62f990b89b200d6ce728c">operator=</a> (const Frame &amp;frame)</td></tr>
<tr><td colspan="2"><h2><a name="member-group"></a>
World coordinates position and orientation</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a2f649a1218291aa3776ce08d0a2879b1">Frame</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;position, const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;orientation)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a24f5da9b3f4bf4e71dfad7a74a932e52">setPosition</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;position)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#aff7308b903966afc6c87b5cd766a9083">setPosition</a> (float x, float y, float z)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a5081403cb47f1324edae5278d5438a38">setPositionWithConstraint</a> (<a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;position)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a6733704520780505759efdef38a68b8b">setOrientation</a> (const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;orientation)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#ae3ac2bf6dcfe21252d40325789503ce6">setOrientation</a> (double q0, double q1, double q2, double q3)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a8b69106a268d78daf27d32854d455da4">setOrientationWithConstraint</a> (<a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;orientation)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a47912d16be51eb85d68d3dcb4a4fb087">setPositionAndOrientation</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;position, const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;orientation)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a8501c5582c1aa2a82a929ce36439ab3a">setPositionAndOrientationWithConstraint</a> (<a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;position, <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;orientation)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classqglviewer_1_1Vec.html">Vec</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#abc38a05a597e07c9ff525122682adc50">position</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a691af39b54669fad8b4e73599de22094">orientation</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#ab3ca600424074ccaf5ee078c8d3149c3">getPosition</a> (float &amp;x, float &amp;y, float &amp;z) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#ac47c3b7fd6023734ba40249bea1fd253">getOrientation</a> (double &amp;q0, double &amp;q1, double &amp;q2, double &amp;q3) const </td></tr>
<tr><td colspan="2"><h2><a name="member-group"></a>
Local translation and rotation w/r reference Frame</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#ae5495cd791858225ba7c85ce39329704">setTranslation</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;translation)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#aeafb612e3ad0d6a81de91884eb4bdef1">setTranslation</a> (float x, float y, float z)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a7f3395d24d164a7af9a8b99e4e6bafc0">setTranslationWithConstraint</a> (<a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;translation)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a857aacdb88a574ec4a363335f6152a1e">setRotation</a> (const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;rotation)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a26c462ecae655fa82c4d2efa42f9cd2e">setRotation</a> (double q0, double q1, double q2, double q3)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a9d4ab1388820d002d44304c5463fbfbd">setRotationWithConstraint</a> (<a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;rotation)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a0fbfd129a52b36b6753cc1589ff87a48">setTranslationAndRotation</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;translation, const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;rotation)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a3a08480e8de4a36536ff95e0f05303db">setTranslationAndRotationWithConstraint</a> (<a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;translation, <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;rotation)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classqglviewer_1_1Vec.html">Vec</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a388a5f38140104323aa51fc207fde642">translation</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a19ee9243c60f412dfc4eac3dcf45a5a1">rotation</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a39804059e5c4e694a6cb13b71347da97">getTranslation</a> (float &amp;x, float &amp;y, float &amp;z) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a475a20f772ff87508b673a586fc50bbb">getRotation</a> (double &amp;q0, double &amp;q1, double &amp;q2, double &amp;q3) const </td></tr>
<tr><td colspan="2"><h2><a name="member-group"></a>
Frame hierarchy</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const Frame *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#abca9e0c2e40957fffeee4a52139facd8">setReferenceFrame</a> (const Frame *const refFrame)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#aa4891a91c825effc65b73f1329ae49c7">settingAsReferenceFrameWillCreateALoop</a> (const Frame *const frame)</td></tr>
<tr><td colspan="2"><h2><a name="member-group"></a>
Frame modification</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a4cb0cf5ff79e1acf0755befdaceb6f4a">translate</a> (<a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;t)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#ac774331eeae8d29acc94f5653b2f2c3b">translate</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;t)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a9081ed23141a5980f028b21d58fa3290">translate</a> (float x, float y, float z)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a2ae644799a164d7519769ba393565c5d">translate</a> (float &amp;x, float &amp;y, float &amp;z)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a38dffd6ee0ad7e395b49082b2b94de33">rotate</a> (<a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;q)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#ac754417fa609300f980fcba5405c9989">rotate</a> (const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;q)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a7fe03bbf807b109c1edb849193d03aa8">rotate</a> (double q0, double q1, double q2, double q3)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#ab15e32161293dce94ae3df3bc3a7b0ad">rotate</a> (double &amp;q0, double &amp;q1, double &amp;q2, double &amp;q3)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a85f48572c1298bc3192f111e8b587bca">rotateAroundPoint</a> (<a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;rotation, const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;point)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a5f87bae05096c99fb3b30cf5bb52c891">rotateAroundPoint</a> (const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;rotation, const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;point)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a352fc1d1f806653677eabcdb8a5eb898">alignWithFrame</a> (const Frame *const frame, bool move=false, float threshold=0.85f)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#af97ae9e790033879dfcb9837a7312255">projectOnLine</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;origin, const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;direction)</td></tr>
<tr><td colspan="2"><h2><a name="member-group"></a>
Coordinate system transformation of 3D coordinates</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classqglviewer_1_1Vec.html">Vec</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#ac706b338b08d9d7b511fd84d0b6ecf96">coordinatesOf</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;src) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classqglviewer_1_1Vec.html">Vec</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a5bcb22a3f2e11e42e7469602b75b3c1e">inverseCoordinatesOf</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;src) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classqglviewer_1_1Vec.html">Vec</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a2b113688a0cab6c439dfbf598fd45e70">localCoordinatesOf</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;src) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classqglviewer_1_1Vec.html">Vec</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a4e6ac1c504a2f70fdbc0e7383c1aa7c7">localInverseCoordinatesOf</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;src) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classqglviewer_1_1Vec.html">Vec</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a8c3c1e66b248a0f29e304e6c786b9391">coordinatesOfIn</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;src, const Frame *const in) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classqglviewer_1_1Vec.html">Vec</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#aadad46a46365f6977e4aac6dc18318ce">coordinatesOfFrom</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;src, const Frame *const from) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a3718dc9cc825c674c8da3576b1448764">getCoordinatesOf</a> (const float src[3], float res[3]) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#aede4243bfe48e6d870a2417bbfc711a8">getInverseCoordinatesOf</a> (const float src[3], float res[3]) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#abe456b2ee906b9def0d2ec0c949a9497">getLocalCoordinatesOf</a> (const float src[3], float res[3]) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#adbd3252d2089f077e23e78345b3723c2">getLocalInverseCoordinatesOf</a> (const float src[3], float res[3]) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#af2748e8dd6a4edad38d195132a8c8b30">getCoordinatesOfIn</a> (const float src[3], float res[3], const Frame *const in) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a36a2d7b27ab27bcff37ab9cbfab20a17">getCoordinatesOfFrom</a> (const float src[3], float res[3], const Frame *const from) const </td></tr>
<tr><td colspan="2"><h2><a name="member-group"></a>
Coordinate system transformation of vectors</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classqglviewer_1_1Vec.html">Vec</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a05a3e18419f02427366a95b1e299f12e">transformOf</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;src) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classqglviewer_1_1Vec.html">Vec</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#aba2c6c46c1825a81f09d22322b03d9b5">inverseTransformOf</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;src) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classqglviewer_1_1Vec.html">Vec</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a37239448835f46771b9598a31b964cf2">localTransformOf</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;src) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classqglviewer_1_1Vec.html">Vec</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#ad36cf320ff7cf6c8f9a2ac527c924f9e">localInverseTransformOf</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;src) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classqglviewer_1_1Vec.html">Vec</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a01636f93c09d6fd9fca90cb671afdda0">transformOfIn</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;src, const Frame *const in) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classqglviewer_1_1Vec.html">Vec</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a3416ca5a53c1f2d932fca1906ec1c6c7">transformOfFrom</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;src, const Frame *const from) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#aac70b883f8e3635d88356cb08b1abae3">getTransformOf</a> (const float src[3], float res[3]) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a6a2eb1467ca31f7db460a2d6b7166a07">getInverseTransformOf</a> (const float src[3], float res[3]) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a6e4aeb1d5aafee31442cc3c82a6ee215">getLocalTransformOf</a> (const float src[3], float res[3]) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a62b201feca5e0ebecc03a71b9566d97c">getLocalInverseTransformOf</a> (const float src[3], float res[3]) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a7d36c3c2d4b004b3e5d296aa58541f9f">getTransformOfIn</a> (const float src[3], float res[3], const Frame *const in) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a4eed4b2770a62e5ebb32d3dcee642c52">getTransformOfFrom</a> (const float src[3], float res[3], const Frame *const from) const </td></tr>
<tr><td colspan="2"><h2><a name="member-group"></a>
Constraint on the displacement</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classqglviewer_1_1Constraint.html">Constraint</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a0974dfe336ed84a20adb8c6cdf8dedd9">constraint</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#adffa44cd173714b29f2441848a39c224">setConstraint</a> (<a class="el" href="classqglviewer_1_1Constraint.html">Constraint</a> *const constraint)</td></tr>
<tr><td colspan="2"><h2><a name="member-group"></a>
Associated matrices</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const GLdouble *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#aa12123cf45f68b9f7fe0526b70ab0047">matrix</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a4915640a54a6b48a99cbdd0cd42fec48">getMatrix</a> (GLdouble m[4][4]) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a15f0dc7596dc78437154302466ac3c0a">getMatrix</a> (GLdouble m[16]) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const GLdouble *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a39aa0648db05006e2b2f22ac5d971141">worldMatrix</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a45358fae434b3912ce81577dc7cf4fc9">getWorldMatrix</a> (GLdouble m[4][4]) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#ac808850371649942726dd474aba29ead">getWorldMatrix</a> (GLdouble m[16]) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a5408d08ab204157ec29f555b6813f9e4">setFromMatrix</a> (const GLdouble m[4][4])</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a0c4d51f142f43235e30198e7b8abc626">setFromMatrix</a> (const GLdouble m[16])</td></tr>
<tr><td colspan="2"><h2><a name="member-group"></a>
Inversion of the transformation</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Frame&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a4534c3188c217feb8d21465d4cefd4ad">inverse</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Frame&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a37d4da8cfd297273e7bb55538debaa3e">worldInverse</a> () const </td></tr>
<tr><td colspan="2"><h2><a name="member-group"></a>
XML representation</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QDomElement&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#a48e0e2dd26cd96418c8b889ceabe80f6">domElement</a> (const QString &amp;name, QDomDocument &amp;document) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqglviewer_1_1Frame.html#acd13d2ddeca530cb9f26ead47f7d25d3">initFromDOMElement</a> (const QDomElement &amp;element)</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>The Frame class represents a coordinate system, defined by a position and an orientation. </p>
<p>A Frame is a 3D coordinate system, represented by a <a class="el" href="classqglviewer_1_1Frame.html#abc38a05a597e07c9ff525122682adc50">position()</a> and an <a class="el" href="classqglviewer_1_1Frame.html#a691af39b54669fad8b4e73599de22094">orientation()</a>. The order of these transformations is important: the Frame is first translated <em>and</em> <em>then</em> rotated around the new translated origin.</p>
<p>A Frame is useful to define the position and orientation of a 3D rigid object, using its <a class="el" href="classqglviewer_1_1Frame.html#aa12123cf45f68b9f7fe0526b70ab0047">matrix()</a> method, as shown below: </p>
<div class="fragment"><pre class="fragment">  <span class="comment">// Builds a Frame at position (0.5,0,0) and oriented such that its Y axis is along the (1,1,1)</span>
  <span class="comment">// direction. One could also have used setPosition() and setOrientation().</span>
  <a class="code" href="classqglviewer_1_1Frame.html#ab71e6ee46f0c2593266f9a62d9c5e029">Frame</a> fr(Vec(0.5,0,0), Quaternion(Vec(0,1,0), Vec(1,1,1)));
  glPushMatrix();
  glMultMatrixd(fr.matrix());
  <span class="comment">// Draw your object here, in the local fr coordinate system.</span>
  glPopMatrix();
</pre></div><p>Many functions are provided to transform a 3D point from one coordinate system (Frame) to an other: see <a class="el" href="classqglviewer_1_1Frame.html#ac706b338b08d9d7b511fd84d0b6ecf96">coordinatesOf()</a>, <a class="el" href="classqglviewer_1_1Frame.html#a5bcb22a3f2e11e42e7469602b75b3c1e">inverseCoordinatesOf()</a>, <a class="el" href="classqglviewer_1_1Frame.html#a8c3c1e66b248a0f29e304e6c786b9391">coordinatesOfIn()</a>, <a class="el" href="classqglviewer_1_1Frame.html#aadad46a46365f6977e4aac6dc18318ce">coordinatesOfFrom()</a>...</p>
<p>You may also want to transform a 3D vector (such as a normal), which corresponds to applying only the rotational part of the frame transformation: see <a class="el" href="classqglviewer_1_1Frame.html#a05a3e18419f02427366a95b1e299f12e">transformOf()</a> and <a class="el" href="classqglviewer_1_1Frame.html#aba2c6c46c1825a81f09d22322b03d9b5">inverseTransformOf()</a>. See the <a href="../examples/frameTransform.html">frameTransform example</a> for an illustration.</p>
<p>The <a class="el" href="classqglviewer_1_1Frame.html#a388a5f38140104323aa51fc207fde642">translation()</a> and the <a class="el" href="classqglviewer_1_1Frame.html#a19ee9243c60f412dfc4eac3dcf45a5a1">rotation()</a> that are encapsulated in a Frame can also be used to represent a <em>rigid</em> <em>transformation</em> of space. Such a transformation can also be interpreted as a change of coordinate system, and the coordinate system conversion functions actually allow you to use a Frame as a rigid transformation. Use <a class="el" href="classqglviewer_1_1Frame.html#a5bcb22a3f2e11e42e7469602b75b3c1e">inverseCoordinatesOf()</a> (resp. <a class="el" href="classqglviewer_1_1Frame.html#ac706b338b08d9d7b511fd84d0b6ecf96">coordinatesOf()</a>) to apply the transformation (resp. its inverse). Note the inversion.</p>
<h3>Hierarchy of Frames</h3>
<p>The position and the orientation of a Frame are actually defined with respect to a <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a>. The default <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a> is the world coordinate system (represented by a <code>NULL</code> <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a>). If you <a class="el" href="classqglviewer_1_1Frame.html#abca9e0c2e40957fffeee4a52139facd8">setReferenceFrame()</a> to a different Frame, you must then differentiate:</p>
<ul>
<li>the <em>local</em> <a class="el" href="classqglviewer_1_1Frame.html#a388a5f38140104323aa51fc207fde642">translation()</a> and <a class="el" href="classqglviewer_1_1Frame.html#a19ee9243c60f412dfc4eac3dcf45a5a1">rotation()</a>, defined with respect to the <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a>,</li>
</ul>
<ul>
<li>the <em>global</em> <a class="el" href="classqglviewer_1_1Frame.html#abc38a05a597e07c9ff525122682adc50">position()</a> and <a class="el" href="classqglviewer_1_1Frame.html#a691af39b54669fad8b4e73599de22094">orientation()</a>, always defined with respect to the world coordinate system.</li>
</ul>
<p>A Frame is actually defined by its <a class="el" href="classqglviewer_1_1Frame.html#a388a5f38140104323aa51fc207fde642">translation()</a> with respect to its <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a>, and then by a <a class="el" href="classqglviewer_1_1Frame.html#a19ee9243c60f412dfc4eac3dcf45a5a1">rotation()</a> of the coordinate system around the new translated origin.</p>
<p>This terminology for <em>local</em> (<a class="el" href="classqglviewer_1_1Frame.html#a388a5f38140104323aa51fc207fde642">translation()</a> and <a class="el" href="classqglviewer_1_1Frame.html#a19ee9243c60f412dfc4eac3dcf45a5a1">rotation()</a>) and <em>global</em> (<a class="el" href="classqglviewer_1_1Frame.html#abc38a05a597e07c9ff525122682adc50">position()</a> and <a class="el" href="classqglviewer_1_1Frame.html#a691af39b54669fad8b4e73599de22094">orientation()</a>) definitions is used in all the methods' names and should be sufficient to prevent ambiguities. These notions are obviously identical when the <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a> is <code>NULL</code>, i.e. when the Frame is defined in the world coordinate system (the one you are in at the beginning of the <a class="el" href="classQGLViewer.html#abc45d04e5f5ce1fbd68f920fcdb2d0e0">QGLViewer::draw()</a> method, see the <a href="../introduction.html">introduction page</a>).</p>
<p>Frames can hence easily be organized in a tree hierarchy, which root is the world coordinate system. A loop in the hierarchy would result in an inconsistent (multiple) Frame definition. <a class="el" href="classqglviewer_1_1Frame.html#aa4891a91c825effc65b73f1329ae49c7">settingAsReferenceFrameWillCreateALoop()</a> checks this and prevents <a class="el" href="classqglviewer_1_1Frame.html#abca9e0c2e40957fffeee4a52139facd8">setReferenceFrame()</a> from creating such a loop.</p>
<p>This frame hierarchy is used in methods like <a class="el" href="classqglviewer_1_1Frame.html#a8c3c1e66b248a0f29e304e6c786b9391">coordinatesOfIn()</a>, <a class="el" href="classqglviewer_1_1Frame.html#aadad46a46365f6977e4aac6dc18318ce">coordinatesOfFrom()</a>... which allow coordinates (or vector) conversions from a Frame to any other one (including the world coordinate system).</p>
<p>However, one must note that this hierarchical representation is internal to the Frame classes. When the Frames represent OpenGL coordinates system, one should map this hierarchical representation to the OpenGL GL_MODELVIEW matrix stack. See the <a class="el" href="classqglviewer_1_1Frame.html#aa12123cf45f68b9f7fe0526b70ab0047">matrix()</a> documentation for details.</p>
<h3>Constraints</h3>
<p>An interesting feature of Frames is that their displacements can be constrained. When a <a class="el" href="classqglviewer_1_1Constraint.html" title="An interface class for Frame constraints.">Constraint</a> is attached to a Frame, it filters the input of <a class="el" href="classqglviewer_1_1Frame.html#a4cb0cf5ff79e1acf0755befdaceb6f4a">translate()</a> and <a class="el" href="classqglviewer_1_1Frame.html#a38dffd6ee0ad7e395b49082b2b94de33">rotate()</a>, and only the resulting filtered motion is applied to the Frame. The default <a class="el" href="classqglviewer_1_1Frame.html#a0974dfe336ed84a20adb8c6cdf8dedd9">constraint()</a> is <code>NULL</code> resulting in no filtering. Use <a class="el" href="classqglviewer_1_1Frame.html#adffa44cd173714b29f2441848a39c224">setConstraint()</a> to attach a <a class="el" href="classqglviewer_1_1Constraint.html" title="An interface class for Frame constraints.">Constraint</a> to a frame.</p>
<p>Constraints are especially usefull for the <a class="el" href="classqglviewer_1_1ManipulatedFrame.html" title="A ManipulatedFrame is a Frame that can be rotated and translated using the mouse.">ManipulatedFrame</a> instances, in order to forbid some mouse motions. See the <a href="../examples/constrainedFrame.html">constrainedFrame</a>, <a href="../examples/constrainedCamera.html">constrainedCamera</a> and <a href="../examples/luxo.html">luxo</a> examples for an illustration.</p>
<p>Classical constraints are provided for convenience (see <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>) and new constraints can very easily be implemented.</p>
<h3>Derived classes</h3>
<p>The <a class="el" href="classqglviewer_1_1ManipulatedFrame.html" title="A ManipulatedFrame is a Frame that can be rotated and translated using the mouse.">ManipulatedFrame</a> class inherits Frame and implements a mouse motion convertion, so that a Frame (and hence an object) can be manipulated in the scene with the mouse. </p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ab71e6ee46f0c2593266f9a62d9c5e029"></a><!-- doxytag: member="qglviewer::Frame::Frame" ref="ab71e6ee46f0c2593266f9a62d9c5e029" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Frame </td>
          <td>(</td>
          <td class="paramname">&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Creates a default Frame.</p>
<p>Its <a class="el" href="classqglviewer_1_1Frame.html#abc38a05a597e07c9ff525122682adc50">position()</a> is (0,0,0) and it has an identity <a class="el" href="classqglviewer_1_1Frame.html#a691af39b54669fad8b4e73599de22094">orientation()</a> <a class="el" href="classqglviewer_1_1Quaternion.html" title="The Quaternion class represents 3D rotations and orientations.">Quaternion</a>. The <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a> and the <a class="el" href="classqglviewer_1_1Frame.html#a0974dfe336ed84a20adb8c6cdf8dedd9">constraint()</a> are <code>NULL</code>. </p>

</div>
</div>
<a class="anchor" id="ae0c994a30d9a018000fe8ad66ff0a86d"></a><!-- doxytag: member="qglviewer::Frame::~Frame" ref="ae0c994a30d9a018000fe8ad66ff0a86d" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual ~Frame </td>
          <td>(</td>
          <td class="paramname">&#160;)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Virtual destructor. Empty. </p>

</div>
</div>
<a class="anchor" id="a7864fb955cec11fe78c3b2bb81230516"></a><!-- doxytag: member="qglviewer::Frame::Frame" ref="a7864fb955cec11fe78c3b2bb81230516" args="(const Frame &amp;frame)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Frame </td>
          <td>(</td>
          <td class="paramtype">const Frame &amp;&#160;</td>
          <td class="paramname"> <em>frame</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Copy constructor.</p>
<p>The <a class="el" href="classqglviewer_1_1Frame.html#a388a5f38140104323aa51fc207fde642">translation()</a> and <a class="el" href="classqglviewer_1_1Frame.html#a19ee9243c60f412dfc4eac3dcf45a5a1">rotation()</a> as well as <a class="el" href="classqglviewer_1_1Frame.html#a0974dfe336ed84a20adb8c6cdf8dedd9">constraint()</a> and <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a> pointers are copied. </p>

</div>
</div>
<a class="anchor" id="a2f649a1218291aa3776ce08d0a2879b1"></a><!-- doxytag: member="qglviewer::Frame::Frame" ref="a2f649a1218291aa3776ce08d0a2879b1" args="(const Vec &amp;position, const Quaternion &amp;orientation)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Frame </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&#160;</td>
          <td class="paramname"> <em>position</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;&#160;</td>
          <td class="paramname"> <em>orientation</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Creates a Frame with a <a class="el" href="classqglviewer_1_1Frame.html#abc38a05a597e07c9ff525122682adc50">position()</a> and an <a class="el" href="classqglviewer_1_1Frame.html#a691af39b54669fad8b4e73599de22094">orientation()</a>.</p>
<p>See the <a class="el" href="classqglviewer_1_1Vec.html" title="The Vec class represents 3D positions and 3D vectors.">Vec</a> and <a class="el" href="classqglviewer_1_1Quaternion.html" title="The Quaternion class represents 3D rotations and orientations.">Quaternion</a> documentations for convenient constructors and methods.</p>
<p>The Frame is defined in the world coordinate system (its <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a> is <code>NULL</code>). It has a <code>NULL</code> associated <a class="el" href="classqglviewer_1_1Frame.html#a0974dfe336ed84a20adb8c6cdf8dedd9">constraint()</a>. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a352fc1d1f806653677eabcdb8a5eb898"></a><!-- doxytag: member="qglviewer::Frame::alignWithFrame" ref="a352fc1d1f806653677eabcdb8a5eb898" args="(const Frame *const frame, bool move=false, float threshold=0.85f)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void alignWithFrame </td>
          <td>(</td>
          <td class="paramtype">const Frame *const &#160;</td>
          <td class="paramname"> <em>frame</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"> <em>move</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"> <em>threshold</em> = <code>0.85f</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Aligns the Frame with <code>frame</code>, so that two of their axis are parallel.</p>
<p>If one of the X, Y and Z axis of the Frame is almost parallel to any of the X, Y, or Z axis of <code>frame</code>, the Frame is rotated so that these two axis actually become parallel.</p>
<p>If, after this first rotation, two other axis are also almost parallel, a second alignment is performed. The two frames then have identical orientations, up to 90 degrees rotations.</p>
<p><code>threshold</code> measures how close two axis must be to be considered parallel. It is compared with the absolute values of the dot product of the normalized axis.</p>
<p>When <code>move</code> is set to <code>true</code>, the Frame <a class="el" href="classqglviewer_1_1Frame.html#abc38a05a597e07c9ff525122682adc50">position()</a> is also affected by the alignment. The new Frame <a class="el" href="classqglviewer_1_1Frame.html#abc38a05a597e07c9ff525122682adc50">position()</a> is such that the <code>frame</code> position (computed with <a class="el" href="classqglviewer_1_1Frame.html#ac706b338b08d9d7b511fd84d0b6ecf96">coordinatesOf()</a>, in the Frame coordinates system) does not change.</p>
<p><code>frame</code> may be <code>NULL</code> and then represents the world coordinate system (same convention than for the <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a>).</p>
<p>The rotation (and translation when <code>move</code> is <code>true</code>) applied to the Frame are filtered by the possible <a class="el" href="classqglviewer_1_1Frame.html#a0974dfe336ed84a20adb8c6cdf8dedd9">constraint()</a>. </p>

</div>
</div>
<a class="anchor" id="a0974dfe336ed84a20adb8c6cdf8dedd9"></a><!-- doxytag: member="qglviewer::Frame::constraint" ref="a0974dfe336ed84a20adb8c6cdf8dedd9" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classqglviewer_1_1Constraint.html">Constraint</a>* constraint </td>
          <td>(</td>
          <td class="paramname">&#160;)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the current constraint applied to the Frame.</p>
<p>A <code>NULL</code> value (default) means that no <a class="el" href="classqglviewer_1_1Constraint.html" title="An interface class for Frame constraints.">Constraint</a> is used to filter Frame translation and rotation. See the <a class="el" href="classqglviewer_1_1Constraint.html" title="An interface class for Frame constraints.">Constraint</a> class documentation for details.</p>
<p>You may have to use a <code>dynamic_cast</code> to convert the result to a <a class="el" href="classqglviewer_1_1Constraint.html" title="An interface class for Frame constraints.">Constraint</a> derived class. </p>

</div>
</div>
<a class="anchor" id="ac706b338b08d9d7b511fd84d0b6ecf96"></a><!-- doxytag: member="qglviewer::Frame::coordinatesOf" ref="ac706b338b08d9d7b511fd84d0b6ecf96" args="(const Vec &amp;src) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classqglviewer_1_1Vec.html">Vec</a> coordinatesOf </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&#160;</td>
          <td class="paramname"> <em>src</em>&#160;)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the Frame coordinates of a point <code>src</code> defined in the world coordinate system (converts from world to Frame).</p>
<p><a class="el" href="classqglviewer_1_1Frame.html#a5bcb22a3f2e11e42e7469602b75b3c1e">inverseCoordinatesOf()</a> performs the inverse convertion. <a class="el" href="classqglviewer_1_1Frame.html#a05a3e18419f02427366a95b1e299f12e">transformOf()</a> converts 3D vectors instead of 3D coordinates.</p>
<p>See the <a href="../examples/frameTransform.html">frameTransform example</a> for an illustration. </p>

</div>
</div>
<a class="anchor" id="aadad46a46365f6977e4aac6dc18318ce"></a><!-- doxytag: member="qglviewer::Frame::coordinatesOfFrom" ref="aadad46a46365f6977e4aac6dc18318ce" args="(const Vec &amp;src, const Frame *const from) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classqglviewer_1_1Vec.html">Vec</a> coordinatesOfFrom </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&#160;</td>
          <td class="paramname"> <em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const Frame *const &#160;</td>
          <td class="paramname"> <em>from</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the Frame coordinates of the point whose position in the <code>from</code> coordinate system is <code>src</code> (converts from <code>from</code> to Frame).</p>
<p><a class="el" href="classqglviewer_1_1Frame.html#a8c3c1e66b248a0f29e304e6c786b9391">coordinatesOfIn()</a> performs the inverse transformation. </p>

</div>
</div>
<a class="anchor" id="a8c3c1e66b248a0f29e304e6c786b9391"></a><!-- doxytag: member="qglviewer::Frame::coordinatesOfIn" ref="a8c3c1e66b248a0f29e304e6c786b9391" args="(const Vec &amp;src, const Frame *const in) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classqglviewer_1_1Vec.html">Vec</a> coordinatesOfIn </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&#160;</td>
          <td class="paramname"> <em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const Frame *const &#160;</td>
          <td class="paramname"> <em>in</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the <code>in</code> coordinates of the point whose position in the Frame coordinate system is <code>src</code> (converts from Frame to <code>in</code>).</p>
<p><a class="el" href="classqglviewer_1_1Frame.html#aadad46a46365f6977e4aac6dc18318ce">coordinatesOfFrom()</a> performs the inverse transformation. </p>

</div>
</div>
<a class="anchor" id="a48e0e2dd26cd96418c8b889ceabe80f6"></a><!-- doxytag: member="qglviewer::Frame::domElement" ref="a48e0e2dd26cd96418c8b889ceabe80f6" args="(const QString &amp;name, QDomDocument &amp;document) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QDomElement domElement </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"> <em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QDomDocument &amp;&#160;</td>
          <td class="paramname"> <em>document</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns an XML <code>QDomElement</code> that represents the Frame.</p>
<p><code>name</code> is the name of the QDomElement tag. <code>doc</code> is the <code>QDomDocument</code> factory used to create QDomElement.</p>
<p>The resulting QDomElement looks like: </p>
<div class="fragment"><pre class="fragment"> &lt;name&gt;
   &lt;<a class="code" href="classqglviewer_1_1Frame.html#abc38a05a597e07c9ff525122682adc50">position</a> x=<span class="stringliteral">&quot;..&quot;</span> y=<span class="stringliteral">&quot;..&quot;</span> z=<span class="stringliteral">&quot;..&quot;</span> /&gt;
   &lt;<a class="code" href="classqglviewer_1_1Frame.html#a691af39b54669fad8b4e73599de22094">orientation</a> q0=<span class="stringliteral">&quot;..&quot;</span> q1=<span class="stringliteral">&quot;..&quot;</span> q2=<span class="stringliteral">&quot;..&quot;</span> q3=<span class="stringliteral">&quot;..&quot;</span> /&gt;
 &lt;/name&gt;
</pre></div><p>Use <a class="el" href="classqglviewer_1_1Frame.html#acd13d2ddeca530cb9f26ead47f7d25d3">initFromDOMElement()</a> to restore the Frame state from the resulting <code>QDomElement</code>.</p>
<p>See <a class="el" href="classqglviewer_1_1Vec.html#a48e0e2dd26cd96418c8b889ceabe80f6">Vec::domElement()</a> for a complete example. See also <a class="el" href="classqglviewer_1_1Quaternion.html#a48e0e2dd26cd96418c8b889ceabe80f6">Quaternion::domElement()</a>, <a class="el" href="classqglviewer_1_1Camera.html#a48e0e2dd26cd96418c8b889ceabe80f6">Camera::domElement()</a>...</p>
<dl class="attention"><dt><b>Attention:</b></dt><dd>The <a class="el" href="classqglviewer_1_1Frame.html#a0974dfe336ed84a20adb8c6cdf8dedd9">constraint()</a> and <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a> are not saved in the QDomElement. </dd></dl>

<p>Reimplemented in <a class="el" href="classqglviewer_1_1ManipulatedCameraFrame.html#a48e0e2dd26cd96418c8b889ceabe80f6">ManipulatedCameraFrame</a>, and <a class="el" href="classqglviewer_1_1ManipulatedFrame.html#a48e0e2dd26cd96418c8b889ceabe80f6">ManipulatedFrame</a>.</p>

</div>
</div>
<a class="anchor" id="a3718dc9cc825c674c8da3576b1448764"></a><!-- doxytag: member="qglviewer::Frame::getCoordinatesOf" ref="a3718dc9cc825c674c8da3576b1448764" args="(const float src[3], float res[3]) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void getCoordinatesOf </td>
          <td>(</td>
          <td class="paramtype">const float&#160;</td>
          <td class="paramname"> <em>src</em>[3], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"> <em>res</em>[3]&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Same as <a class="el" href="classqglviewer_1_1Frame.html#ac706b338b08d9d7b511fd84d0b6ecf96">coordinatesOf()</a>, but with <code>float</code> parameters. </p>

</div>
</div>
<a class="anchor" id="a36a2d7b27ab27bcff37ab9cbfab20a17"></a><!-- doxytag: member="qglviewer::Frame::getCoordinatesOfFrom" ref="a36a2d7b27ab27bcff37ab9cbfab20a17" args="(const float src[3], float res[3], const Frame *const from) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void getCoordinatesOfFrom </td>
          <td>(</td>
          <td class="paramtype">const float&#160;</td>
          <td class="paramname"> <em>src</em>[3], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"> <em>res</em>[3], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const Frame *const &#160;</td>
          <td class="paramname"> <em>from</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Same as <a class="el" href="classqglviewer_1_1Frame.html#aadad46a46365f6977e4aac6dc18318ce">coordinatesOfFrom()</a>, but with <code>float</code> parameters. </p>

</div>
</div>
<a class="anchor" id="af2748e8dd6a4edad38d195132a8c8b30"></a><!-- doxytag: member="qglviewer::Frame::getCoordinatesOfIn" ref="af2748e8dd6a4edad38d195132a8c8b30" args="(const float src[3], float res[3], const Frame *const in) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void getCoordinatesOfIn </td>
          <td>(</td>
          <td class="paramtype">const float&#160;</td>
          <td class="paramname"> <em>src</em>[3], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"> <em>res</em>[3], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const Frame *const &#160;</td>
          <td class="paramname"> <em>in</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Same as <a class="el" href="classqglviewer_1_1Frame.html#a8c3c1e66b248a0f29e304e6c786b9391">coordinatesOfIn()</a>, but with <code>float</code> parameters. </p>

</div>
</div>
<a class="anchor" id="aede4243bfe48e6d870a2417bbfc711a8"></a><!-- doxytag: member="qglviewer::Frame::getInverseCoordinatesOf" ref="aede4243bfe48e6d870a2417bbfc711a8" args="(const float src[3], float res[3]) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void getInverseCoordinatesOf </td>
          <td>(</td>
          <td class="paramtype">const float&#160;</td>
          <td class="paramname"> <em>src</em>[3], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"> <em>res</em>[3]&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Same as <a class="el" href="classqglviewer_1_1Frame.html#a5bcb22a3f2e11e42e7469602b75b3c1e">inverseCoordinatesOf()</a>, but with <code>float</code> parameters. </p>

</div>
</div>
<a class="anchor" id="a6a2eb1467ca31f7db460a2d6b7166a07"></a><!-- doxytag: member="qglviewer::Frame::getInverseTransformOf" ref="a6a2eb1467ca31f7db460a2d6b7166a07" args="(const float src[3], float res[3]) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void getInverseTransformOf </td>
          <td>(</td>
          <td class="paramtype">const float&#160;</td>
          <td class="paramname"> <em>src</em>[3], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"> <em>res</em>[3]&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Same as <a class="el" href="classqglviewer_1_1Frame.html#aba2c6c46c1825a81f09d22322b03d9b5">inverseTransformOf()</a>, but with <code>float</code> parameters. </p>

</div>
</div>
<a class="anchor" id="abe456b2ee906b9def0d2ec0c949a9497"></a><!-- doxytag: member="qglviewer::Frame::getLocalCoordinatesOf" ref="abe456b2ee906b9def0d2ec0c949a9497" args="(const float src[3], float res[3]) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void getLocalCoordinatesOf </td>
          <td>(</td>
          <td class="paramtype">const float&#160;</td>
          <td class="paramname"> <em>src</em>[3], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"> <em>res</em>[3]&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Same as <a class="el" href="classqglviewer_1_1Frame.html#a2b113688a0cab6c439dfbf598fd45e70">localCoordinatesOf()</a>, but with <code>float</code> parameters. </p>

</div>
</div>
<a class="anchor" id="adbd3252d2089f077e23e78345b3723c2"></a><!-- doxytag: member="qglviewer::Frame::getLocalInverseCoordinatesOf" ref="adbd3252d2089f077e23e78345b3723c2" args="(const float src[3], float res[3]) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void getLocalInverseCoordinatesOf </td>
          <td>(</td>
          <td class="paramtype">const float&#160;</td>
          <td class="paramname"> <em>src</em>[3], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"> <em>res</em>[3]&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Same as <a class="el" href="classqglviewer_1_1Frame.html#a4e6ac1c504a2f70fdbc0e7383c1aa7c7">localInverseCoordinatesOf()</a>, but with <code>float</code> parameters. </p>

</div>
</div>
<a class="anchor" id="a62b201feca5e0ebecc03a71b9566d97c"></a><!-- doxytag: member="qglviewer::Frame::getLocalInverseTransformOf" ref="a62b201feca5e0ebecc03a71b9566d97c" args="(const float src[3], float res[3]) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void getLocalInverseTransformOf </td>
          <td>(</td>
          <td class="paramtype">const float&#160;</td>
          <td class="paramname"> <em>src</em>[3], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"> <em>res</em>[3]&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Same as <a class="el" href="classqglviewer_1_1Frame.html#ad36cf320ff7cf6c8f9a2ac527c924f9e">localInverseTransformOf()</a>, but with <code>float</code> parameters. </p>

</div>
</div>
<a class="anchor" id="a6e4aeb1d5aafee31442cc3c82a6ee215"></a><!-- doxytag: member="qglviewer::Frame::getLocalTransformOf" ref="a6e4aeb1d5aafee31442cc3c82a6ee215" args="(const float src[3], float res[3]) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void getLocalTransformOf </td>
          <td>(</td>
          <td class="paramtype">const float&#160;</td>
          <td class="paramname"> <em>src</em>[3], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"> <em>res</em>[3]&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Same as <a class="el" href="classqglviewer_1_1Frame.html#a37239448835f46771b9598a31b964cf2">localTransformOf()</a>, but with <code>float</code> parameters. </p>

</div>
</div>
<a class="anchor" id="a4915640a54a6b48a99cbdd0cd42fec48"></a><!-- doxytag: member="qglviewer::Frame::getMatrix" ref="a4915640a54a6b48a99cbdd0cd42fec48" args="(GLdouble m[4][4]) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void getMatrix </td>
          <td>(</td>
          <td class="paramtype">GLdouble&#160;</td>
          <td class="paramname"> <em>m</em>[4][4]&#160;)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p><code>GLdouble</code>[4][4] version of <a class="el" href="classqglviewer_1_1Frame.html#aa12123cf45f68b9f7fe0526b70ab0047">matrix()</a>. See also <a class="el" href="classqglviewer_1_1Frame.html#a45358fae434b3912ce81577dc7cf4fc9">getWorldMatrix()</a> and <a class="el" href="classqglviewer_1_1Frame.html#aa12123cf45f68b9f7fe0526b70ab0047">matrix()</a>. </p>

</div>
</div>
<a class="anchor" id="a15f0dc7596dc78437154302466ac3c0a"></a><!-- doxytag: member="qglviewer::Frame::getMatrix" ref="a15f0dc7596dc78437154302466ac3c0a" args="(GLdouble m[16]) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void getMatrix </td>
          <td>(</td>
          <td class="paramtype">GLdouble&#160;</td>
          <td class="paramname"> <em>m</em>[16]&#160;)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p><code>GLdouble</code>[16] version of <a class="el" href="classqglviewer_1_1Frame.html#aa12123cf45f68b9f7fe0526b70ab0047">matrix()</a>. See also <a class="el" href="classqglviewer_1_1Frame.html#a45358fae434b3912ce81577dc7cf4fc9">getWorldMatrix()</a> and <a class="el" href="classqglviewer_1_1Frame.html#aa12123cf45f68b9f7fe0526b70ab0047">matrix()</a>. </p>

</div>
</div>
<a class="anchor" id="ac47c3b7fd6023734ba40249bea1fd253"></a><!-- doxytag: member="qglviewer::Frame::getOrientation" ref="ac47c3b7fd6023734ba40249bea1fd253" args="(double &amp;q0, double &amp;q1, double &amp;q2, double &amp;q3) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void getOrientation </td>
          <td>(</td>
          <td class="paramtype">double &amp;&#160;</td>
          <td class="paramname"> <em>q0</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double &amp;&#160;</td>
          <td class="paramname"> <em>q1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double &amp;&#160;</td>
          <td class="paramname"> <em>q2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double &amp;&#160;</td>
          <td class="paramname"> <em>q3</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get the current orientation of the frame (same as <a class="el" href="classqglviewer_1_1Frame.html#a691af39b54669fad8b4e73599de22094">orientation()</a>). Parameters are the orientation <a class="el" href="classqglviewer_1_1Quaternion.html" title="The Quaternion class represents 3D rotations and orientations.">Quaternion</a> values. See also <a class="el" href="classqglviewer_1_1Frame.html#a6733704520780505759efdef38a68b8b">setOrientation()</a>.</p>
<p>The <code>q</code> are set to the <a class="el" href="classqglviewer_1_1Frame.html#a691af39b54669fad8b4e73599de22094">orientation()</a> of the Frame.</p>
<p>See <a class="el" href="classqglviewer_1_1Quaternion.html#a81ba24ffd95778f3ca4e51b2b9922f45">Quaternion::Quaternion(double, double, double, double)</a> for details on <code>q</code>. </p>

</div>
</div>
<a class="anchor" id="ab3ca600424074ccaf5ee078c8d3149c3"></a><!-- doxytag: member="qglviewer::Frame::getPosition" ref="ab3ca600424074ccaf5ee078c8d3149c3" args="(float &amp;x, float &amp;y, float &amp;z) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void getPosition </td>
          <td>(</td>
          <td class="paramtype">float &amp;&#160;</td>
          <td class="paramname"> <em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float &amp;&#160;</td>
          <td class="paramname"> <em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float &amp;&#160;</td>
          <td class="paramname"> <em>z</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p><code>x</code>, <code>y</code> and <code>z</code> are set to the <a class="el" href="classqglviewer_1_1Frame.html#abc38a05a597e07c9ff525122682adc50">position()</a> of the Frame. </p>

</div>
</div>
<a class="anchor" id="a475a20f772ff87508b673a586fc50bbb"></a><!-- doxytag: member="qglviewer::Frame::getRotation" ref="a475a20f772ff87508b673a586fc50bbb" args="(double &amp;q0, double &amp;q1, double &amp;q2, double &amp;q3) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void getRotation </td>
          <td>(</td>
          <td class="paramtype">double &amp;&#160;</td>
          <td class="paramname"> <em>q0</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double &amp;&#160;</td>
          <td class="paramname"> <em>q1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double &amp;&#160;</td>
          <td class="paramname"> <em>q2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double &amp;&#160;</td>
          <td class="paramname"> <em>q3</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The <code>q</code> are set to the <a class="el" href="classqglviewer_1_1Frame.html#a19ee9243c60f412dfc4eac3dcf45a5a1">rotation()</a> of the Frame.</p>
<p>See <a class="el" href="classqglviewer_1_1Quaternion.html#a81ba24ffd95778f3ca4e51b2b9922f45">Quaternion::Quaternion(double, double, double, double)</a> for details on <code>q</code>. </p>

</div>
</div>
<a class="anchor" id="aac70b883f8e3635d88356cb08b1abae3"></a><!-- doxytag: member="qglviewer::Frame::getTransformOf" ref="aac70b883f8e3635d88356cb08b1abae3" args="(const float src[3], float res[3]) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void getTransformOf </td>
          <td>(</td>
          <td class="paramtype">const float&#160;</td>
          <td class="paramname"> <em>src</em>[3], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"> <em>res</em>[3]&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Same as <a class="el" href="classqglviewer_1_1Frame.html#a05a3e18419f02427366a95b1e299f12e">transformOf()</a>, but with <code>float</code> parameters. </p>

</div>
</div>
<a class="anchor" id="a4eed4b2770a62e5ebb32d3dcee642c52"></a><!-- doxytag: member="qglviewer::Frame::getTransformOfFrom" ref="a4eed4b2770a62e5ebb32d3dcee642c52" args="(const float src[3], float res[3], const Frame *const from) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void getTransformOfFrom </td>
          <td>(</td>
          <td class="paramtype">const float&#160;</td>
          <td class="paramname"> <em>src</em>[3], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"> <em>res</em>[3], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const Frame *const &#160;</td>
          <td class="paramname"> <em>from</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Same as <a class="el" href="classqglviewer_1_1Frame.html#a3416ca5a53c1f2d932fca1906ec1c6c7">transformOfFrom()</a>, but with <code>float</code> parameters. </p>

</div>
</div>
<a class="anchor" id="a7d36c3c2d4b004b3e5d296aa58541f9f"></a><!-- doxytag: member="qglviewer::Frame::getTransformOfIn" ref="a7d36c3c2d4b004b3e5d296aa58541f9f" args="(const float src[3], float res[3], const Frame *const in) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void getTransformOfIn </td>
          <td>(</td>
          <td class="paramtype">const float&#160;</td>
          <td class="paramname"> <em>src</em>[3], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"> <em>res</em>[3], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const Frame *const &#160;</td>
          <td class="paramname"> <em>in</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Same as <a class="el" href="classqglviewer_1_1Frame.html#a01636f93c09d6fd9fca90cb671afdda0">transformOfIn()</a>, but with <code>float</code> parameters. </p>

</div>
</div>
<a class="anchor" id="a39804059e5c4e694a6cb13b71347da97"></a><!-- doxytag: member="qglviewer::Frame::getTranslation" ref="a39804059e5c4e694a6cb13b71347da97" args="(float &amp;x, float &amp;y, float &amp;z) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void getTranslation </td>
          <td>(</td>
          <td class="paramtype">float &amp;&#160;</td>
          <td class="paramname"> <em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float &amp;&#160;</td>
          <td class="paramname"> <em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float &amp;&#160;</td>
          <td class="paramname"> <em>z</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Fill <code>x</code>, <code>y</code> and <code>z</code> with the <a class="el" href="classqglviewer_1_1Frame.html#a388a5f38140104323aa51fc207fde642">translation()</a> of the Frame. </p>

</div>
</div>
<a class="anchor" id="ac808850371649942726dd474aba29ead"></a><!-- doxytag: member="qglviewer::Frame::getWorldMatrix" ref="ac808850371649942726dd474aba29ead" args="(GLdouble m[16]) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void getWorldMatrix </td>
          <td>(</td>
          <td class="paramtype">GLdouble&#160;</td>
          <td class="paramname"> <em>m</em>[16]&#160;)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>float[16] parameter version of <a class="el" href="classqglviewer_1_1Frame.html#a39aa0648db05006e2b2f22ac5d971141">worldMatrix()</a>. See also <a class="el" href="classqglviewer_1_1Frame.html#a4915640a54a6b48a99cbdd0cd42fec48">getMatrix()</a> and <a class="el" href="classqglviewer_1_1Frame.html#aa12123cf45f68b9f7fe0526b70ab0047">matrix()</a>. </p>

</div>
</div>
<a class="anchor" id="a45358fae434b3912ce81577dc7cf4fc9"></a><!-- doxytag: member="qglviewer::Frame::getWorldMatrix" ref="a45358fae434b3912ce81577dc7cf4fc9" args="(GLdouble m[4][4]) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void getWorldMatrix </td>
          <td>(</td>
          <td class="paramtype">GLdouble&#160;</td>
          <td class="paramname"> <em>m</em>[4][4]&#160;)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>float[4][4] parameter version of <a class="el" href="classqglviewer_1_1Frame.html#a39aa0648db05006e2b2f22ac5d971141">worldMatrix()</a>. See also <a class="el" href="classqglviewer_1_1Frame.html#a4915640a54a6b48a99cbdd0cd42fec48">getMatrix()</a> and <a class="el" href="classqglviewer_1_1Frame.html#aa12123cf45f68b9f7fe0526b70ab0047">matrix()</a>. </p>

</div>
</div>
<a class="anchor" id="acd13d2ddeca530cb9f26ead47f7d25d3"></a><!-- doxytag: member="qglviewer::Frame::initFromDOMElement" ref="acd13d2ddeca530cb9f26ead47f7d25d3" args="(const QDomElement &amp;element)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void initFromDOMElement </td>
          <td>(</td>
          <td class="paramtype">const QDomElement &amp;&#160;</td>
          <td class="paramname"> <em>element</em>&#160;)</td>
          <td><code> [virtual, slot]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Restores the Frame state from a <code>QDomElement</code> created by <a class="el" href="classqglviewer_1_1Frame.html#a48e0e2dd26cd96418c8b889ceabe80f6">domElement()</a>.</p>
<p>See <a class="el" href="classqglviewer_1_1Frame.html#a48e0e2dd26cd96418c8b889ceabe80f6">domElement()</a> for the <code>QDomElement</code> syntax. See the <a class="el" href="classqglviewer_1_1Vec.html#acd13d2ddeca530cb9f26ead47f7d25d3">Vec::initFromDOMElement()</a> and <a class="el" href="classqglviewer_1_1Quaternion.html#acd13d2ddeca530cb9f26ead47f7d25d3">Quaternion::initFromDOMElement()</a> documentations for details on default values if an argument is missing.</p>
<dl class="attention"><dt><b>Attention:</b></dt><dd>The <a class="el" href="classqglviewer_1_1Frame.html#a0974dfe336ed84a20adb8c6cdf8dedd9">constraint()</a> and <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a> are not restored by this method and are left unchanged. </dd></dl>

<p>Reimplemented in <a class="el" href="classqglviewer_1_1ManipulatedCameraFrame.html#acd13d2ddeca530cb9f26ead47f7d25d3">ManipulatedCameraFrame</a>, and <a class="el" href="classqglviewer_1_1ManipulatedFrame.html#acd13d2ddeca530cb9f26ead47f7d25d3">ManipulatedFrame</a>.</p>

</div>
</div>
<a class="anchor" id="ab55c2a4f1732b90057fae4b6037399de"></a><!-- doxytag: member="qglviewer::Frame::interpolated" ref="ab55c2a4f1732b90057fae4b6037399de" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void interpolated </td>
          <td>(</td>
          <td class="paramname">&#160;)</td>
          <td><code> [signal]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This signal is emitted when the Frame is interpolated by a <a class="el" href="classqglviewer_1_1KeyFrameInterpolator.html" title="A keyFrame Catmull-Rom Frame interpolator.">KeyFrameInterpolator</a>.</p>
<p>See the <a class="el" href="classqglviewer_1_1KeyFrameInterpolator.html" title="A keyFrame Catmull-Rom Frame interpolator.">KeyFrameInterpolator</a> documentation for details.</p>
<p>If a <a class="el" href="classqglviewer_1_1KeyFrameInterpolator.html" title="A keyFrame Catmull-Rom Frame interpolator.">KeyFrameInterpolator</a> is used to successively interpolate several Frames in your scene, connect the <a class="el" href="classqglviewer_1_1KeyFrameInterpolator.html#ab55c2a4f1732b90057fae4b6037399de">KeyFrameInterpolator::interpolated()</a> signal instead (identical, but independent of the interpolated Frame). </p>

</div>
</div>
<a class="anchor" id="a4534c3188c217feb8d21465d4cefd4ad"></a><!-- doxytag: member="qglviewer::Frame::inverse" ref="a4534c3188c217feb8d21465d4cefd4ad" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Frame inverse </td>
          <td>(</td>
          <td class="paramname">&#160;)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns a Frame representing the inverse of the Frame space transformation.</p>
<p>The <a class="el" href="classqglviewer_1_1Frame.html#a19ee9243c60f412dfc4eac3dcf45a5a1">rotation()</a> of the new Frame is the <a class="el" href="classqglviewer_1_1Quaternion.html#ac378ebc684d691dc25336b895f24a82e">Quaternion::inverse()</a> of the original rotation. Its <a class="el" href="classqglviewer_1_1Frame.html#a388a5f38140104323aa51fc207fde642">translation()</a> is the negated inverse rotated image of the original translation.</p>
<p>If a Frame is considered as a space rigid transformation (translation and rotation), the <a class="el" href="classqglviewer_1_1Frame.html#a4534c3188c217feb8d21465d4cefd4ad">inverse()</a> Frame performs the inverse transformation.</p>
<p>Only the local Frame transformation (i.e. defined with respect to the <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a>) is inverted. Use <a class="el" href="classqglviewer_1_1Frame.html#a37d4da8cfd297273e7bb55538debaa3e">worldInverse()</a> for a global inverse.</p>
<p>The resulting Frame has the same <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a> as the Frame and a <code>NULL</code> <a class="el" href="classqglviewer_1_1Frame.html#a0974dfe336ed84a20adb8c6cdf8dedd9">constraint()</a>.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>The scaling factor of the 4x4 matrix is 1.0. </dd></dl>

</div>
</div>
<a class="anchor" id="a5bcb22a3f2e11e42e7469602b75b3c1e"></a><!-- doxytag: member="qglviewer::Frame::inverseCoordinatesOf" ref="a5bcb22a3f2e11e42e7469602b75b3c1e" args="(const Vec &amp;src) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classqglviewer_1_1Vec.html">Vec</a> inverseCoordinatesOf </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&#160;</td>
          <td class="paramname"> <em>src</em>&#160;)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the world coordinates of the point whose position in the Frame coordinate system is <code>src</code> (converts from Frame to world).</p>
<p><a class="el" href="classqglviewer_1_1Frame.html#ac706b338b08d9d7b511fd84d0b6ecf96">coordinatesOf()</a> performs the inverse convertion. Use <a class="el" href="classqglviewer_1_1Frame.html#aba2c6c46c1825a81f09d22322b03d9b5">inverseTransformOf()</a> to transform 3D vectors instead of 3D coordinates. </p>

</div>
</div>
<a class="anchor" id="aba2c6c46c1825a81f09d22322b03d9b5"></a><!-- doxytag: member="qglviewer::Frame::inverseTransformOf" ref="aba2c6c46c1825a81f09d22322b03d9b5" args="(const Vec &amp;src) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classqglviewer_1_1Vec.html">Vec</a> inverseTransformOf </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&#160;</td>
          <td class="paramname"> <em>src</em>&#160;)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the world transform of the vector whose coordinates in the Frame coordinate system is <code>src</code> (converts vectors from Frame to world).</p>
<p><a class="el" href="classqglviewer_1_1Frame.html#a05a3e18419f02427366a95b1e299f12e">transformOf()</a> performs the inverse transformation. Use <a class="el" href="classqglviewer_1_1Frame.html#a5bcb22a3f2e11e42e7469602b75b3c1e">inverseCoordinatesOf()</a> to transform 3D coordinates instead of 3D vectors. </p>

</div>
</div>
<a class="anchor" id="a2b113688a0cab6c439dfbf598fd45e70"></a><!-- doxytag: member="qglviewer::Frame::localCoordinatesOf" ref="a2b113688a0cab6c439dfbf598fd45e70" args="(const Vec &amp;src) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classqglviewer_1_1Vec.html">Vec</a> localCoordinatesOf </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&#160;</td>
          <td class="paramname"> <em>src</em>&#160;)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the Frame coordinates of a point <code>src</code> defined in the <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a> coordinate system (converts from <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a> to Frame).</p>
<p><a class="el" href="classqglviewer_1_1Frame.html#a4e6ac1c504a2f70fdbc0e7383c1aa7c7">localInverseCoordinatesOf()</a> performs the inverse convertion. See also <a class="el" href="classqglviewer_1_1Frame.html#a37239448835f46771b9598a31b964cf2">localTransformOf()</a>. </p>

</div>
</div>
<a class="anchor" id="a4e6ac1c504a2f70fdbc0e7383c1aa7c7"></a><!-- doxytag: member="qglviewer::Frame::localInverseCoordinatesOf" ref="a4e6ac1c504a2f70fdbc0e7383c1aa7c7" args="(const Vec &amp;src) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classqglviewer_1_1Vec.html">Vec</a> localInverseCoordinatesOf </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&#160;</td>
          <td class="paramname"> <em>src</em>&#160;)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a> coordinates of a point <code>src</code> defined in the Frame coordinate system (converts from Frame to <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a>).</p>
<p><a class="el" href="classqglviewer_1_1Frame.html#a2b113688a0cab6c439dfbf598fd45e70">localCoordinatesOf()</a> performs the inverse convertion. See also <a class="el" href="classqglviewer_1_1Frame.html#ad36cf320ff7cf6c8f9a2ac527c924f9e">localInverseTransformOf()</a>. </p>

</div>
</div>
<a class="anchor" id="ad36cf320ff7cf6c8f9a2ac527c924f9e"></a><!-- doxytag: member="qglviewer::Frame::localInverseTransformOf" ref="ad36cf320ff7cf6c8f9a2ac527c924f9e" args="(const Vec &amp;src) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classqglviewer_1_1Vec.html">Vec</a> localInverseTransformOf </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&#160;</td>
          <td class="paramname"> <em>src</em>&#160;)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a> transform of a vector <code>src</code> defined in the Frame coordinate system (converts vectors from Frame to <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a>).</p>
<p><a class="el" href="classqglviewer_1_1Frame.html#a37239448835f46771b9598a31b964cf2">localTransformOf()</a> performs the inverse transformation. See also <a class="el" href="classqglviewer_1_1Frame.html#a4e6ac1c504a2f70fdbc0e7383c1aa7c7">localInverseCoordinatesOf()</a>. </p>

</div>
</div>
<a class="anchor" id="a37239448835f46771b9598a31b964cf2"></a><!-- doxytag: member="qglviewer::Frame::localTransformOf" ref="a37239448835f46771b9598a31b964cf2" args="(const Vec &amp;src) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classqglviewer_1_1Vec.html">Vec</a> localTransformOf </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&#160;</td>
          <td class="paramname"> <em>src</em>&#160;)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the Frame transform of a vector <code>src</code> defined in the <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a> coordinate system (converts vectors from <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a> to Frame).</p>
<p><a class="el" href="classqglviewer_1_1Frame.html#ad36cf320ff7cf6c8f9a2ac527c924f9e">localInverseTransformOf()</a> performs the inverse transformation. See also <a class="el" href="classqglviewer_1_1Frame.html#a2b113688a0cab6c439dfbf598fd45e70">localCoordinatesOf()</a>. </p>

</div>
</div>
<a class="anchor" id="aa12123cf45f68b9f7fe0526b70ab0047"></a><!-- doxytag: member="qglviewer::Frame::matrix" ref="aa12123cf45f68b9f7fe0526b70ab0047" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const GLdouble * matrix </td>
          <td>(</td>
          <td class="paramname">&#160;)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the 4x4 OpenGL transformation matrix represented by the Frame.</p>
<p>This method should be used in conjunction with <code>glMultMatrixd()</code> to modify the OpenGL modelview matrix from a Frame hierarchy. With this Frame hierarchy: </p>
<div class="fragment"><pre class="fragment">  <a class="code" href="classqglviewer_1_1Frame.html#ab71e6ee46f0c2593266f9a62d9c5e029">Frame</a>* body     = <span class="keyword">new</span> <a class="code" href="classqglviewer_1_1Frame.html#ab71e6ee46f0c2593266f9a62d9c5e029">Frame</a>();
  <a class="code" href="classqglviewer_1_1Frame.html#ab71e6ee46f0c2593266f9a62d9c5e029">Frame</a>* leftArm  = <span class="keyword">new</span> <a class="code" href="classqglviewer_1_1Frame.html#ab71e6ee46f0c2593266f9a62d9c5e029">Frame</a>();
  <a class="code" href="classqglviewer_1_1Frame.html#ab71e6ee46f0c2593266f9a62d9c5e029">Frame</a>* rightArm = <span class="keyword">new</span> <a class="code" href="classqglviewer_1_1Frame.html#ab71e6ee46f0c2593266f9a62d9c5e029">Frame</a>();
  leftArm-&gt;setReferenceFrame(body);
  rightArm-&gt;setReferenceFrame(body);
</pre></div><p>The associated OpenGL drawing code should look like: </p>
<div class="fragment"><pre class="fragment">  <span class="keywordtype">void</span> Viewer::draw()
  {
    glPushMatrix();
    glMultMatrixd(body-&gt;matrix());
    drawBody();

    glPushMatrix();
    glMultMatrixd(leftArm-&gt;matrix());
    drawArm();
    glPopMatrix();

    glPushMatrix();
    glMultMatrixd(rightArm-&gt;matrix());
    drawArm();
    glPopMatrix();

    glPopMatrix();
  }
</pre></div><p> Note the use of nested <code>glPushMatrix()</code> and <code>glPopMatrix()</code> blocks to represent the frame hierarchy: <code>leftArm</code> and <code>rightArm</code> are both correctly drawn with respect to the <code>body</code> coordinate system.</p>
<p>This matrix only represents the local Frame transformation (i.e. with respect to the <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a>). Use <a class="el" href="classqglviewer_1_1Frame.html#a39aa0648db05006e2b2f22ac5d971141">worldMatrix()</a> to get the full Frame transformation matrix (i.e. from the world to the Frame coordinate system). These two match when the <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a> is <code>NULL</code>.</p>
<p>The result is only valid until the next call to <a class="el" href="classqglviewer_1_1Frame.html#aa12123cf45f68b9f7fe0526b70ab0047">matrix()</a>, <a class="el" href="classqglviewer_1_1Frame.html#a4915640a54a6b48a99cbdd0cd42fec48">getMatrix()</a>, <a class="el" href="classqglviewer_1_1Frame.html#a39aa0648db05006e2b2f22ac5d971141">worldMatrix()</a> or <a class="el" href="classqglviewer_1_1Frame.html#a45358fae434b3912ce81577dc7cf4fc9">getWorldMatrix()</a>. Use it immediately (as above) or use <a class="el" href="classqglviewer_1_1Frame.html#a4915640a54a6b48a99cbdd0cd42fec48">getMatrix()</a> instead.</p>
<dl class="attention"><dt><b>Attention:</b></dt><dd>The OpenGL format of the result is the transpose of the actual mathematical European representation (translation is on the last <em>line</em> instead of the last <em>column</em>).</dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>The scaling factor of the 4x4 matrix is 1.0. </dd></dl>

</div>
</div>
<a class="anchor" id="ab6722375e68e03d151762ebfc83c5459"></a><!-- doxytag: member="qglviewer::Frame::modified" ref="ab6722375e68e03d151762ebfc83c5459" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void modified </td>
          <td>(</td>
          <td class="paramname">&#160;)</td>
          <td><code> [signal]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This signal is emitted whenever the <a class="el" href="classqglviewer_1_1Frame.html#abc38a05a597e07c9ff525122682adc50">position()</a> or the <a class="el" href="classqglviewer_1_1Frame.html#a691af39b54669fad8b4e73599de22094">orientation()</a> of the Frame is modified.</p>
<p>Connect this signal to any object that must be notified: </p>
<div class="fragment"><pre class="fragment">    QObject::connect(myFrame, SIGNAL(<a class="code" href="classqglviewer_1_1Frame.html#ab6722375e68e03d151762ebfc83c5459">modified</a>()), myObject, SLOT(update()));
</pre></div><p> Use the <a class="el" href="classQGLViewer.html#a32d7a506084c50fd97a24f94d9ca4864">QGLViewer::QGLViewerPool()</a> to connect the signal to all the viewers.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>If your Frame is part of a Frame hierarchy (see <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a>), a modification of one of the parents of this Frame will <em>not</em> emit this signal. Use code like this to change this behavior (you can do this recursively for all the <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a> until the <code>NULL</code> world root frame is encountered): <div class="fragment"><pre class="fragment">    <span class="comment">// Emits the Frame modified() signal when its referenceFrame() is modified().</span>
    connect(myFrame-&gt;referenceFrame(), SIGNAL(<a class="code" href="classqglviewer_1_1Frame.html#ab6722375e68e03d151762ebfc83c5459">modified</a>()), myFrame, SIGNAL(<a class="code" href="classqglviewer_1_1Frame.html#ab6722375e68e03d151762ebfc83c5459">modified</a>()));
</pre></div></dd></dl>
<dl class="attention"><dt><b>Attention:</b></dt><dd>Connecting this signal to a QGLWidget::updateGL() slot (or a method that calls it) will prevent you from modifying the Frame <em>inside</em> your <a class="el" href="classQGLViewer.html#abc45d04e5f5ce1fbd68f920fcdb2d0e0">QGLViewer::draw()</a> method as it would result in an infinite loop. However, <a class="el" href="classQGLViewer.html#abc45d04e5f5ce1fbd68f920fcdb2d0e0">QGLViewer::draw()</a> should not modify the scene.</dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>For efficiency reasons, this signal is emitted even if the Frame is not actually modified, for instance with translate(Vec(0,0,0)) or setPosition(<a class="el" href="classqglviewer_1_1Frame.html#abc38a05a597e07c9ff525122682adc50">position()</a>). </dd></dl>

</div>
</div>
<a class="anchor" id="aeb0f5ceffbb62f990b89b200d6ce728c"></a><!-- doxytag: member="qglviewer::Frame::operator=" ref="aeb0f5ceffbb62f990b89b200d6ce728c" args="(const Frame &amp;frame)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Frame &amp; operator= </td>
          <td>(</td>
          <td class="paramtype">const Frame &amp;&#160;</td>
          <td class="paramname"> <em>frame</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Equal operator.</p>
<p>The <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a> and <a class="el" href="classqglviewer_1_1Frame.html#a0974dfe336ed84a20adb8c6cdf8dedd9">constraint()</a> pointers are copied.</p>
<dl class="attention"><dt><b>Attention:</b></dt><dd>Signal and slot connections are not copied. </dd></dl>

</div>
</div>
<a class="anchor" id="a691af39b54669fad8b4e73599de22094"></a><!-- doxytag: member="qglviewer::Frame::orientation" ref="a691af39b54669fad8b4e73599de22094" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> orientation </td>
          <td>(</td>
          <td class="paramname">&#160;)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the orientation of the Frame, defined in the world coordinate system. See also <a class="el" href="classqglviewer_1_1Frame.html#abc38a05a597e07c9ff525122682adc50">position()</a>, <a class="el" href="classqglviewer_1_1Frame.html#a6733704520780505759efdef38a68b8b">setOrientation()</a> and <a class="el" href="classqglviewer_1_1Frame.html#a19ee9243c60f412dfc4eac3dcf45a5a1">rotation()</a>. </p>

</div>
</div>
<a class="anchor" id="abc38a05a597e07c9ff525122682adc50"></a><!-- doxytag: member="qglviewer::Frame::position" ref="abc38a05a597e07c9ff525122682adc50" 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> position </td>
          <td>(</td>
          <td class="paramname">&#160;)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the position of the Frame, defined in the world coordinate system. See also <a class="el" href="classqglviewer_1_1Frame.html#a691af39b54669fad8b4e73599de22094">orientation()</a>, <a class="el" href="classqglviewer_1_1Frame.html#a24f5da9b3f4bf4e71dfad7a74a932e52">setPosition()</a> and <a class="el" href="classqglviewer_1_1Frame.html#a388a5f38140104323aa51fc207fde642">translation()</a>. </p>

</div>
</div>
<a class="anchor" id="af97ae9e790033879dfcb9837a7312255"></a><!-- doxytag: member="qglviewer::Frame::projectOnLine" ref="af97ae9e790033879dfcb9837a7312255" args="(const Vec &amp;origin, const Vec &amp;direction)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void projectOnLine </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&#160;</td>
          <td class="paramname"> <em>origin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&#160;</td>
          <td class="paramname"> <em>direction</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Translates the Frame so that its <a class="el" href="classqglviewer_1_1Frame.html#abc38a05a597e07c9ff525122682adc50">position()</a> lies on the line defined by <code>origin</code> and <code>direction</code> (defined in the world coordinate system).</p>
<p>Simply uses an orthogonal projection. <code>direction</code> does not need to be normalized. </p>

</div>
</div>
<a class="anchor" id="a9794b079db5f492e8804631d3d23baec"></a><!-- doxytag: member="qglviewer::Frame::referenceFrame" ref="a9794b079db5f492e8804631d3d23baec" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const Frame* referenceFrame </td>
          <td>(</td>
          <td class="paramname">&#160;)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the reference Frame, in which coordinates system the Frame is defined.</p>
<p>The <a class="el" href="classqglviewer_1_1Frame.html#a388a5f38140104323aa51fc207fde642">translation()</a> and <a class="el" href="classqglviewer_1_1Frame.html#a19ee9243c60f412dfc4eac3dcf45a5a1">rotation()</a> of the Frame are defined with respect to the <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a> coordinate system. A <code>NULL</code> <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a> (default value) means that the Frame is defined in the world coordinate system.</p>
<p>Use <a class="el" href="classqglviewer_1_1Frame.html#abc38a05a597e07c9ff525122682adc50">position()</a> and <a class="el" href="classqglviewer_1_1Frame.html#a691af39b54669fad8b4e73599de22094">orientation()</a> to recursively convert values along the <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a> chain and to get values expressed in the world coordinate system. The values match when the <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a> is <code>NULL</code>.</p>
<p>Use <a class="el" href="classqglviewer_1_1Frame.html#abca9e0c2e40957fffeee4a52139facd8">setReferenceFrame()</a> to set this value and create a Frame hierarchy. Convenient functions allow you to convert 3D coordinates from one Frame to an other: see <a class="el" href="classqglviewer_1_1Frame.html#ac706b338b08d9d7b511fd84d0b6ecf96">coordinatesOf()</a>, <a class="el" href="classqglviewer_1_1Frame.html#a2b113688a0cab6c439dfbf598fd45e70">localCoordinatesOf()</a>, <a class="el" href="classqglviewer_1_1Frame.html#a8c3c1e66b248a0f29e304e6c786b9391">coordinatesOfIn()</a> and their inverse functions.</p>
<p>Vectors can also be converted using <a class="el" href="classqglviewer_1_1Frame.html#a05a3e18419f02427366a95b1e299f12e">transformOf()</a>, transformOfIn, <a class="el" href="classqglviewer_1_1Frame.html#a37239448835f46771b9598a31b964cf2">localTransformOf()</a> and their inverse functions. </p>

</div>
</div>
<a class="anchor" id="a38dffd6ee0ad7e395b49082b2b94de33"></a><!-- doxytag: member="qglviewer::Frame::rotate" ref="a38dffd6ee0ad7e395b49082b2b94de33" args="(Quaternion &amp;q)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void rotate </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;&#160;</td>
          <td class="paramname"> <em>q</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Same as <a class="el" href="classqglviewer_1_1Frame.html#ac754417fa609300f980fcba5405c9989">rotate(const Quaternion&amp;)</a> but <code>q</code> may be modified to satisfy the rotation <a class="el" href="classqglviewer_1_1Frame.html#a0974dfe336ed84a20adb8c6cdf8dedd9">constraint()</a>. Its new value corresponds to the rotation that has actually been applied to the Frame. </p>

</div>
</div>
<a class="anchor" id="a7fe03bbf807b109c1edb849193d03aa8"></a><!-- doxytag: member="qglviewer::Frame::rotate" ref="a7fe03bbf807b109c1edb849193d03aa8" args="(double q0, double q1, double q2, double q3)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void rotate </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"> <em>q0</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"> <em>q1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"> <em>q2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"> <em>q3</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Same as <a class="el" href="classqglviewer_1_1Frame.html#ac754417fa609300f980fcba5405c9989">rotate(const Quaternion&amp;)</a> but with <code>float</code> <a class="el" href="classqglviewer_1_1Quaternion.html" title="The Quaternion class represents 3D rotations and orientations.">Quaternion</a> parameters. </p>

</div>
</div>
<a class="anchor" id="ac754417fa609300f980fcba5405c9989"></a><!-- doxytag: member="qglviewer::Frame::rotate" ref="ac754417fa609300f980fcba5405c9989" args="(const Quaternion &amp;q)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void rotate </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;&#160;</td>
          <td class="paramname"> <em>q</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Rotates the Frame by <code>q</code> (defined in the Frame coordinate system): R = R*q.</p>
<p>The rotation actually applied to the Frame may differ from <code>q</code> since it can be filtered by the <a class="el" href="classqglviewer_1_1Frame.html#a0974dfe336ed84a20adb8c6cdf8dedd9">constraint()</a>. Use <a class="el" href="classqglviewer_1_1Frame.html#a38dffd6ee0ad7e395b49082b2b94de33">rotate(Quaternion&amp;)</a> or <a class="el" href="classqglviewer_1_1Frame.html#a9d4ab1388820d002d44304c5463fbfbd">setRotationWithConstraint()</a> to retrieve the filtered rotation value. Use <a class="el" href="classqglviewer_1_1Frame.html#a857aacdb88a574ec4a363335f6152a1e">setRotation()</a> to directly rotate the Frame without taking the <a class="el" href="classqglviewer_1_1Frame.html#a0974dfe336ed84a20adb8c6cdf8dedd9">constraint()</a> into account.</p>
<p>See also <a class="el" href="classqglviewer_1_1Frame.html#ac774331eeae8d29acc94f5653b2f2c3b">translate(const Vec&amp;)</a>. Emits the <a class="el" href="classqglviewer_1_1Frame.html#ab6722375e68e03d151762ebfc83c5459">modified()</a> signal. </p>

</div>
</div>
<a class="anchor" id="ab15e32161293dce94ae3df3bc3a7b0ad"></a><!-- doxytag: member="qglviewer::Frame::rotate" ref="ab15e32161293dce94ae3df3bc3a7b0ad" args="(double &amp;q0, double &amp;q1, double &amp;q2, double &amp;q3)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void rotate </td>
          <td>(</td>
          <td class="paramtype">double &amp;&#160;</td>
          <td class="paramname"> <em>q0</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double &amp;&#160;</td>
          <td class="paramname"> <em>q1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double &amp;&#160;</td>
          <td class="paramname"> <em>q2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double &amp;&#160;</td>
          <td class="paramname"> <em>q3</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Same as <a class="el" href="classqglviewer_1_1Frame.html#a38dffd6ee0ad7e395b49082b2b94de33">rotate(Quaternion&amp;)</a> but with <code>float</code> <a class="el" href="classqglviewer_1_1Quaternion.html" title="The Quaternion class represents 3D rotations and orientations.">Quaternion</a> parameters. </p>

</div>
</div>
<a class="anchor" id="a5f87bae05096c99fb3b30cf5bb52c891"></a><!-- doxytag: member="qglviewer::Frame::rotateAroundPoint" ref="a5f87bae05096c99fb3b30cf5bb52c891" args="(const Quaternion &amp;rotation, const Vec &amp;point)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void rotateAroundPoint </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;&#160;</td>
          <td class="paramname"> <em>rotation</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&#160;</td>
          <td class="paramname"> <em>point</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Same as <a class="el" href="classqglviewer_1_1Frame.html#a85f48572c1298bc3192f111e8b587bca">rotateAroundPoint()</a>, but with a <code>const</code> <code>rotation</code> <a class="el" href="classqglviewer_1_1Quaternion.html" title="The Quaternion class represents 3D rotations and orientations.">Quaternion</a>. Note that the actual rotation may differ since it can be filtered by the <a class="el" href="classqglviewer_1_1Frame.html#a0974dfe336ed84a20adb8c6cdf8dedd9">constraint()</a>. </p>

</div>
</div>
<a class="anchor" id="a85f48572c1298bc3192f111e8b587bca"></a><!-- doxytag: member="qglviewer::Frame::rotateAroundPoint" ref="a85f48572c1298bc3192f111e8b587bca" args="(Quaternion &amp;rotation, const Vec &amp;point)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void rotateAroundPoint </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;&#160;</td>
          <td class="paramname"> <em>rotation</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&#160;</td>
          <td class="paramname"> <em>point</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Makes the Frame <a class="el" href="classqglviewer_1_1Frame.html#a38dffd6ee0ad7e395b49082b2b94de33">rotate()</a> by <code>rotation</code> around <code>point</code>.</p>
<p><code>point</code> is defined in the world coordinate system, while the <code>rotation</code> axis is defined in the Frame coordinate system.</p>
<p>If the Frame has a <a class="el" href="classqglviewer_1_1Frame.html#a0974dfe336ed84a20adb8c6cdf8dedd9">constraint()</a>, <code>rotation</code> is first constrained using <a class="el" href="classqglviewer_1_1Constraint.html#a5de5f38e75b58476b7926171dba4b31b">Constraint::constrainRotation()</a>. The translation which results from the filtered rotation around <code>point</code> is then computed and filtered using <a class="el" href="classqglviewer_1_1Constraint.html#ab7d724965c6765209f47c1abe7f7b7b4">Constraint::constrainTranslation()</a>. The new <code>rotation</code> value corresponds to the rotation that has actually been applied to the Frame.</p>
<p>Emits the <a class="el" href="classqglviewer_1_1Frame.html#ab6722375e68e03d151762ebfc83c5459">modified()</a> signal. </p>

</div>
</div>
<a class="anchor" id="a19ee9243c60f412dfc4eac3dcf45a5a1"></a><!-- doxytag: member="qglviewer::Frame::rotation" ref="a19ee9243c60f412dfc4eac3dcf45a5a1" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> rotation </td>
          <td>(</td>
          <td class="paramname">&#160;)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the Frame rotation, defined with respect to the <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a>.</p>
<p>Use <a class="el" href="classqglviewer_1_1Frame.html#a691af39b54669fad8b4e73599de22094">orientation()</a> to get the result in the world coordinates. These two values are identical when the <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a> is <code>NULL</code> (default).</p>
<p>See also <a class="el" href="classqglviewer_1_1Frame.html#a857aacdb88a574ec4a363335f6152a1e">setRotation()</a> and <a class="el" href="classqglviewer_1_1Frame.html#a9d4ab1388820d002d44304c5463fbfbd">setRotationWithConstraint()</a>.</p>
<p>Returns the current <a class="el" href="classqglviewer_1_1Quaternion.html" title="The Quaternion class represents 3D rotations and orientations.">Quaternion</a> orientation. See <a class="el" href="classqglviewer_1_1Frame.html#a857aacdb88a574ec4a363335f6152a1e">setRotation()</a>. </p>

</div>
</div>
<a class="anchor" id="adffa44cd173714b29f2441848a39c224"></a><!-- doxytag: member="qglviewer::Frame::setConstraint" ref="adffa44cd173714b29f2441848a39c224" args="(Constraint *const constraint)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void setConstraint </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classqglviewer_1_1Constraint.html">Constraint</a> *const &#160;</td>
          <td class="paramname"> <em>constraint</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Sets the <a class="el" href="classqglviewer_1_1Frame.html#a0974dfe336ed84a20adb8c6cdf8dedd9">constraint()</a> attached to the Frame.</p>
<p>A <code>NULL</code> value means no constraint. The previous <a class="el" href="classqglviewer_1_1Frame.html#a0974dfe336ed84a20adb8c6cdf8dedd9">constraint()</a> should be deleted by the calling method if needed. </p>

</div>
</div>
<a class="anchor" id="a0c4d51f142f43235e30198e7b8abc626"></a><!-- doxytag: member="qglviewer::Frame::setFromMatrix" ref="a0c4d51f142f43235e30198e7b8abc626" args="(const GLdouble m[16])" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void setFromMatrix </td>
          <td>(</td>
          <td class="paramtype">const GLdouble&#160;</td>
          <td class="paramname"> <em>m</em>[16]&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Sets the Frame from an OpenGL matrix representation (rotation in the upper left 3x3 matrix and translation on the last line).</p>
<p>Hence, if a code fragment looks like: </p>
<div class="fragment"><pre class="fragment"> GLdouble m[16]={...};
 glMultMatrixd(m);
</pre></div><p> It is equivalent to write: </p>
<div class="fragment"><pre class="fragment"> <a class="code" href="classqglviewer_1_1Frame.html#ab71e6ee46f0c2593266f9a62d9c5e029">Frame</a> fr;
 fr.setFromMatrix(m);
 glMultMatrixd(fr.matrix());
</pre></div><p>Using this conversion, you can benefit from the powerful Frame transformation methods to translate points and vectors to and from the Frame coordinate system to any other Frame coordinate system (including the world coordinate system). See <a class="el" href="classqglviewer_1_1Frame.html#ac706b338b08d9d7b511fd84d0b6ecf96">coordinatesOf()</a> and <a class="el" href="classqglviewer_1_1Frame.html#a05a3e18419f02427366a95b1e299f12e">transformOf()</a>.</p>
<p>Emits the <a class="el" href="classqglviewer_1_1Frame.html#ab6722375e68e03d151762ebfc83c5459">modified()</a> signal. See also <a class="el" href="classqglviewer_1_1Frame.html#aa12123cf45f68b9f7fe0526b70ab0047">matrix()</a>, <a class="el" href="classqglviewer_1_1Frame.html#a4915640a54a6b48a99cbdd0cd42fec48">getMatrix()</a> and <a class="el" href="classqglviewer_1_1Quaternion.html#a1880f20e8080ee670b6a88ed0c7d69ac">Quaternion::setFromRotationMatrix()</a>.</p>
<dl class="attention"><dt><b>Attention:</b></dt><dd>A Frame does not contain a scale factor. The possible scaling in <code>m</code> will not be converted into the Frame by this method. </dd></dl>

</div>
</div>
<a class="anchor" id="a5408d08ab204157ec29f555b6813f9e4"></a><!-- doxytag: member="qglviewer::Frame::setFromMatrix" ref="a5408d08ab204157ec29f555b6813f9e4" args="(const GLdouble m[4][4])" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void setFromMatrix </td>
          <td>(</td>
          <td class="paramtype">const GLdouble&#160;</td>
          <td class="paramname"> <em>m</em>[4][4]&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This is an overloaded method provided for convenience. Same as <a class="el" href="classqglviewer_1_1Frame.html#a5408d08ab204157ec29f555b6813f9e4">setFromMatrix()</a>. </p>

</div>
</div>
<a class="anchor" id="ae3ac2bf6dcfe21252d40325789503ce6"></a><!-- doxytag: member="qglviewer::Frame::setOrientation" ref="ae3ac2bf6dcfe21252d40325789503ce6" args="(double q0, double q1, double q2, double q3)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void setOrientation </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"> <em>q0</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"> <em>q1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"> <em>q2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"> <em>q3</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Same as <a class="el" href="classqglviewer_1_1Frame.html#a6733704520780505759efdef38a68b8b">setOrientation()</a>, but with <code>float</code> parameters. </p>

</div>
</div>
<a class="anchor" id="a6733704520780505759efdef38a68b8b"></a><!-- doxytag: member="qglviewer::Frame::setOrientation" ref="a6733704520780505759efdef38a68b8b" args="(const Quaternion &amp;orientation)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void setOrientation </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;&#160;</td>
          <td class="paramname"> <em>orientation</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Sets the <a class="el" href="classqglviewer_1_1Frame.html#a691af39b54669fad8b4e73599de22094">orientation()</a> of the Frame, defined in the world coordinate system. Emits the <a class="el" href="classqglviewer_1_1Frame.html#ab6722375e68e03d151762ebfc83c5459">modified()</a> signal.</p>
<p>Use <a class="el" href="classqglviewer_1_1Frame.html#a857aacdb88a574ec4a363335f6152a1e">setRotation()</a> to define the <em>local</em> frame rotation (with respect to the <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a>). The potential <a class="el" href="classqglviewer_1_1Frame.html#a0974dfe336ed84a20adb8c6cdf8dedd9">constraint()</a> of the Frame is not taken into account, use <a class="el" href="classqglviewer_1_1Frame.html#a8b69106a268d78daf27d32854d455da4">setOrientationWithConstraint()</a> instead. </p>

</div>
</div>
<a class="anchor" id="a8b69106a268d78daf27d32854d455da4"></a><!-- doxytag: member="qglviewer::Frame::setOrientationWithConstraint" ref="a8b69106a268d78daf27d32854d455da4" args="(Quaternion &amp;orientation)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void setOrientationWithConstraint </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;&#160;</td>
          <td class="paramname"> <em>orientation</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Same as <a class="el" href="classqglviewer_1_1Frame.html#a6733704520780505759efdef38a68b8b">setOrientation()</a>, but <code>orientation</code> is modified so that the potential <a class="el" href="classqglviewer_1_1Frame.html#a0974dfe336ed84a20adb8c6cdf8dedd9">constraint()</a> of the Frame is satisfied. See also <a class="el" href="classqglviewer_1_1Frame.html#a5081403cb47f1324edae5278d5438a38">setPositionWithConstraint()</a> and <a class="el" href="classqglviewer_1_1Frame.html#a9d4ab1388820d002d44304c5463fbfbd">setRotationWithConstraint()</a>. </p>

</div>
</div>
<a class="anchor" id="aff7308b903966afc6c87b5cd766a9083"></a><!-- doxytag: member="qglviewer::Frame::setPosition" ref="aff7308b903966afc6c87b5cd766a9083" args="(float x, float y, float z)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void setPosition </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"> <em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"> <em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"> <em>z</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Same as <a class="el" href="classqglviewer_1_1Frame.html#a24f5da9b3f4bf4e71dfad7a74a932e52">setPosition()</a>, but with <code>float</code> parameters. </p>

</div>
</div>
<a class="anchor" id="a24f5da9b3f4bf4e71dfad7a74a932e52"></a><!-- doxytag: member="qglviewer::Frame::setPosition" ref="a24f5da9b3f4bf4e71dfad7a74a932e52" args="(const Vec &amp;position)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void setPosition </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&#160;</td>
          <td class="paramname"> <em>position</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Sets the <a class="el" href="classqglviewer_1_1Frame.html#abc38a05a597e07c9ff525122682adc50">position()</a> of the Frame, defined in the world coordinate system. Emits the <a class="el" href="classqglviewer_1_1Frame.html#ab6722375e68e03d151762ebfc83c5459">modified()</a> signal.</p>
<p>Use <a class="el" href="classqglviewer_1_1Frame.html#ae5495cd791858225ba7c85ce39329704">setTranslation()</a> to define the <em>local</em> frame translation (with respect to the <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a>). The potential <a class="el" href="classqglviewer_1_1Frame.html#a0974dfe336ed84a20adb8c6cdf8dedd9">constraint()</a> of the Frame is not taken into account, use <a class="el" href="classqglviewer_1_1Frame.html#a5081403cb47f1324edae5278d5438a38">setPositionWithConstraint()</a> instead. </p>

</div>
</div>
<a class="anchor" id="a47912d16be51eb85d68d3dcb4a4fb087"></a><!-- doxytag: member="qglviewer::Frame::setPositionAndOrientation" ref="a47912d16be51eb85d68d3dcb4a4fb087" args="(const Vec &amp;position, const Quaternion &amp;orientation)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void setPositionAndOrientation </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&#160;</td>
          <td class="paramname"> <em>position</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;&#160;</td>
          <td class="paramname"> <em>orientation</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Same as successive calls to <a class="el" href="classqglviewer_1_1Frame.html#a24f5da9b3f4bf4e71dfad7a74a932e52">setPosition()</a> and then <a class="el" href="classqglviewer_1_1Frame.html#a6733704520780505759efdef38a68b8b">setOrientation()</a>.</p>
<p>Only one <a class="el" href="classqglviewer_1_1Frame.html#ab6722375e68e03d151762ebfc83c5459">modified()</a> signal is emitted, which is convenient if this signal is connected to a <a class="el" href="classQGLViewer.html#ae12b7378efbffabc24a133ca1deb19ae">QGLViewer::updateGL()</a> slot. See also <a class="el" href="classqglviewer_1_1Frame.html#a0fbfd129a52b36b6753cc1589ff87a48">setTranslationAndRotation()</a> and <a class="el" href="classqglviewer_1_1Frame.html#a8501c5582c1aa2a82a929ce36439ab3a">setPositionAndOrientationWithConstraint()</a>. </p>

</div>
</div>
<a class="anchor" id="a8501c5582c1aa2a82a929ce36439ab3a"></a><!-- doxytag: member="qglviewer::Frame::setPositionAndOrientationWithConstraint" ref="a8501c5582c1aa2a82a929ce36439ab3a" args="(Vec &amp;position, Quaternion &amp;orientation)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void setPositionAndOrientationWithConstraint </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&#160;</td>
          <td class="paramname"> <em>position</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;&#160;</td>
          <td class="paramname"> <em>orientation</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Same as <a class="el" href="classqglviewer_1_1Frame.html#a47912d16be51eb85d68d3dcb4a4fb087">setPositionAndOrientation()</a> but <code>position</code> and <code>orientation</code> are modified to satisfy the constraint. Emits the <a class="el" href="classqglviewer_1_1Frame.html#ab6722375e68e03d151762ebfc83c5459">modified()</a> signal. </p>

</div>
</div>
<a class="anchor" id="a5081403cb47f1324edae5278d5438a38"></a><!-- doxytag: member="qglviewer::Frame::setPositionWithConstraint" ref="a5081403cb47f1324edae5278d5438a38" args="(Vec &amp;position)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void setPositionWithConstraint </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&#160;</td>
          <td class="paramname"> <em>position</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Same as <a class="el" href="classqglviewer_1_1Frame.html#a24f5da9b3f4bf4e71dfad7a74a932e52">setPosition()</a>, but <code>position</code> is modified so that the potential <a class="el" href="classqglviewer_1_1Frame.html#a0974dfe336ed84a20adb8c6cdf8dedd9">constraint()</a> of the Frame is satisfied. See also <a class="el" href="classqglviewer_1_1Frame.html#a8b69106a268d78daf27d32854d455da4">setOrientationWithConstraint()</a> and <a class="el" href="classqglviewer_1_1Frame.html#a7f3395d24d164a7af9a8b99e4e6bafc0">setTranslationWithConstraint()</a>. </p>

</div>
</div>
<a class="anchor" id="abca9e0c2e40957fffeee4a52139facd8"></a><!-- doxytag: member="qglviewer::Frame::setReferenceFrame" ref="abca9e0c2e40957fffeee4a52139facd8" args="(const Frame *const refFrame)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void setReferenceFrame </td>
          <td>(</td>
          <td class="paramtype">const Frame *const &#160;</td>
          <td class="paramname"> <em>refFrame</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Sets the <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a> of the Frame.</p>
<p>The Frame <a class="el" href="classqglviewer_1_1Frame.html#a388a5f38140104323aa51fc207fde642">translation()</a> and <a class="el" href="classqglviewer_1_1Frame.html#a19ee9243c60f412dfc4eac3dcf45a5a1">rotation()</a> are then defined in the <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a> coordinate system. Use <a class="el" href="classqglviewer_1_1Frame.html#abc38a05a597e07c9ff525122682adc50">position()</a> and <a class="el" href="classqglviewer_1_1Frame.html#a691af39b54669fad8b4e73599de22094">orientation()</a> to express these in the world coordinate system.</p>
<p>Emits the <a class="el" href="classqglviewer_1_1Frame.html#ab6722375e68e03d151762ebfc83c5459">modified()</a> signal if <code>refFrame</code> differs from the current <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a>.</p>
<p>Using this method, you can create a hierarchy of Frames. This hierarchy needs to be a tree, which root is the world coordinate system (i.e. a <code>NULL</code> <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a>). A warning is printed and no action is performed if setting <code>refFrame</code> as the <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a> would create a loop in the Frame hierarchy (see <a class="el" href="classqglviewer_1_1Frame.html#aa4891a91c825effc65b73f1329ae49c7">settingAsReferenceFrameWillCreateALoop()</a>). </p>

</div>
</div>
<a class="anchor" id="a26c462ecae655fa82c4d2efa42f9cd2e"></a><!-- doxytag: member="qglviewer::Frame::setRotation" ref="a26c462ecae655fa82c4d2efa42f9cd2e" args="(double q0, double q1, double q2, double q3)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void setRotation </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"> <em>q0</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"> <em>q1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"> <em>q2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"> <em>q3</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Same as <a class="el" href="classqglviewer_1_1Frame.html#a857aacdb88a574ec4a363335f6152a1e">setRotation()</a> but with <code>float</code> <a class="el" href="classqglviewer_1_1Quaternion.html" title="The Quaternion class represents 3D rotations and orientations.">Quaternion</a> parameters. </p>

</div>
</div>
<a class="anchor" id="a857aacdb88a574ec4a363335f6152a1e"></a><!-- doxytag: member="qglviewer::Frame::setRotation" ref="a857aacdb88a574ec4a363335f6152a1e" args="(const Quaternion &amp;rotation)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void setRotation </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;&#160;</td>
          <td class="paramname"> <em>rotation</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Set the current rotation <a class="el" href="classqglviewer_1_1Quaternion.html" title="The Quaternion class represents 3D rotations and orientations.">Quaternion</a>. See <a class="el" href="classqglviewer_1_1Frame.html#a19ee9243c60f412dfc4eac3dcf45a5a1">rotation()</a> and the different <a class="el" href="classqglviewer_1_1Quaternion.html" title="The Quaternion class represents 3D rotations and orientations.">Quaternion</a> constructors. Emits the <a class="el" href="classqglviewer_1_1Frame.html#ab6722375e68e03d151762ebfc83c5459">modified()</a> signal. See also <a class="el" href="classqglviewer_1_1Frame.html#ae5495cd791858225ba7c85ce39329704">setTranslation()</a> and <a class="el" href="classqglviewer_1_1Frame.html#a9d4ab1388820d002d44304c5463fbfbd">setRotationWithConstraint()</a>.</p>
<p>Sets the <a class="el" href="classqglviewer_1_1Frame.html#a19ee9243c60f412dfc4eac3dcf45a5a1">rotation()</a> of the Frame, locally defined with respect to the <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a>. Emits the <a class="el" href="classqglviewer_1_1Frame.html#ab6722375e68e03d151762ebfc83c5459">modified()</a> signal.</p>
<p>Use <a class="el" href="classqglviewer_1_1Frame.html#a6733704520780505759efdef38a68b8b">setOrientation()</a> to define the world coordinates <a class="el" href="classqglviewer_1_1Frame.html#a691af39b54669fad8b4e73599de22094">orientation()</a>. The potential <a class="el" href="classqglviewer_1_1Frame.html#a0974dfe336ed84a20adb8c6cdf8dedd9">constraint()</a> of the Frame is not taken into account, use <a class="el" href="classqglviewer_1_1Frame.html#a9d4ab1388820d002d44304c5463fbfbd">setRotationWithConstraint()</a> instead. </p>

</div>
</div>
<a class="anchor" id="a9d4ab1388820d002d44304c5463fbfbd"></a><!-- doxytag: member="qglviewer::Frame::setRotationWithConstraint" ref="a9d4ab1388820d002d44304c5463fbfbd" args="(Quaternion &amp;rotation)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void setRotationWithConstraint </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;&#160;</td>
          <td class="paramname"> <em>rotation</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Same as <a class="el" href="classqglviewer_1_1Frame.html#a857aacdb88a574ec4a363335f6152a1e">setRotation()</a>, but <code>rotation</code> is modified so that the potential <a class="el" href="classqglviewer_1_1Frame.html#a0974dfe336ed84a20adb8c6cdf8dedd9">constraint()</a> of the Frame is satisfied.</p>
<p>Emits the <a class="el" href="classqglviewer_1_1Frame.html#ab6722375e68e03d151762ebfc83c5459">modified()</a> signal. See also <a class="el" href="classqglviewer_1_1Frame.html#a7f3395d24d164a7af9a8b99e4e6bafc0">setTranslationWithConstraint()</a> and <a class="el" href="classqglviewer_1_1Frame.html#a8b69106a268d78daf27d32854d455da4">setOrientationWithConstraint()</a>. </p>

</div>
</div>
<a class="anchor" id="aa4891a91c825effc65b73f1329ae49c7"></a><!-- doxytag: member="qglviewer::Frame::settingAsReferenceFrameWillCreateALoop" ref="aa4891a91c825effc65b73f1329ae49c7" args="(const Frame *const frame)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool settingAsReferenceFrameWillCreateALoop </td>
          <td>(</td>
          <td class="paramtype">const Frame *const &#160;</td>
          <td class="paramname"> <em>frame</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns <code>true</code> if setting <code>frame</code> as the Frame's <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a> would create a loop in the Frame hierarchy. </p>

</div>
</div>
<a class="anchor" id="ae5495cd791858225ba7c85ce39329704"></a><!-- doxytag: member="qglviewer::Frame::setTranslation" ref="ae5495cd791858225ba7c85ce39329704" args="(const Vec &amp;translation)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void setTranslation </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&#160;</td>
          <td class="paramname"> <em>translation</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Sets the <a class="el" href="classqglviewer_1_1Frame.html#a388a5f38140104323aa51fc207fde642">translation()</a> of the frame, locally defined with respect to the <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a>. Emits the <a class="el" href="classqglviewer_1_1Frame.html#ab6722375e68e03d151762ebfc83c5459">modified()</a> signal.</p>
<p>Use <a class="el" href="classqglviewer_1_1Frame.html#a24f5da9b3f4bf4e71dfad7a74a932e52">setPosition()</a> to define the world coordinates <a class="el" href="classqglviewer_1_1Frame.html#abc38a05a597e07c9ff525122682adc50">position()</a>. Use <a class="el" href="classqglviewer_1_1Frame.html#a7f3395d24d164a7af9a8b99e4e6bafc0">setTranslationWithConstraint()</a> to take into account the potential <a class="el" href="classqglviewer_1_1Frame.html#a0974dfe336ed84a20adb8c6cdf8dedd9">constraint()</a> of the Frame. </p>

</div>
</div>
<a class="anchor" id="aeafb612e3ad0d6a81de91884eb4bdef1"></a><!-- doxytag: member="qglviewer::Frame::setTranslation" ref="aeafb612e3ad0d6a81de91884eb4bdef1" args="(float x, float y, float z)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void setTranslation </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"> <em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"> <em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"> <em>z</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Same as <a class="el" href="classqglviewer_1_1Frame.html#ae5495cd791858225ba7c85ce39329704">setTranslation()</a>, but with <code>float</code> parameters. </p>

</div>
</div>
<a class="anchor" id="a0fbfd129a52b36b6753cc1589ff87a48"></a><!-- doxytag: member="qglviewer::Frame::setTranslationAndRotation" ref="a0fbfd129a52b36b6753cc1589ff87a48" args="(const Vec &amp;translation, const Quaternion &amp;rotation)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void setTranslationAndRotation </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&#160;</td>
          <td class="paramname"> <em>translation</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> &amp;&#160;</td>
          <td class="paramname"> <em>rotation</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Same as successive calls to <a class="el" href="classqglviewer_1_1Frame.html#ae5495cd791858225ba7c85ce39329704">setTranslation()</a> and then <a class="el" href="classqglviewer_1_1Frame.html#a857aacdb88a574ec4a363335f6152a1e">setRotation()</a>.</p>
<p>Only one <a class="el" href="classqglviewer_1_1Frame.html#ab6722375e68e03d151762ebfc83c5459">modified()</a> signal is emitted, which is convenient if this signal is connected to a <a class="el" href="classQGLViewer.html#ae12b7378efbffabc24a133ca1deb19ae">QGLViewer::updateGL()</a> slot. See also <a class="el" href="classqglviewer_1_1Frame.html#a47912d16be51eb85d68d3dcb4a4fb087">setPositionAndOrientation()</a> and <a class="el" href="classqglviewer_1_1Frame.html#a3a08480e8de4a36536ff95e0f05303db">setTranslationAndRotationWithConstraint()</a>. </p>

</div>
</div>
<a class="anchor" id="a3a08480e8de4a36536ff95e0f05303db"></a><!-- doxytag: member="qglviewer::Frame::setTranslationAndRotationWithConstraint" ref="a3a08480e8de4a36536ff95e0f05303db" args="(Vec &amp;translation, Quaternion &amp;rotation)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void setTranslationAndRotationWithConstraint </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&#160;</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_1Quaternion.html">Quaternion</a> &amp;&#160;</td>
          <td class="paramname"> <em>rotation</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Same as <a class="el" href="classqglviewer_1_1Frame.html#a0fbfd129a52b36b6753cc1589ff87a48">setTranslationAndRotation()</a>, but <code>translation</code> and <code>orientation</code> are modified to satisfy the <a class="el" href="classqglviewer_1_1Frame.html#a0974dfe336ed84a20adb8c6cdf8dedd9">constraint()</a>. Emits the <a class="el" href="classqglviewer_1_1Frame.html#ab6722375e68e03d151762ebfc83c5459">modified()</a> signal. </p>

</div>
</div>
<a class="anchor" id="a7f3395d24d164a7af9a8b99e4e6bafc0"></a><!-- doxytag: member="qglviewer::Frame::setTranslationWithConstraint" ref="a7f3395d24d164a7af9a8b99e4e6bafc0" args="(Vec &amp;translation)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void setTranslationWithConstraint </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&#160;</td>
          <td class="paramname"> <em>translation</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Same as <a class="el" href="classqglviewer_1_1Frame.html#ae5495cd791858225ba7c85ce39329704">setTranslation()</a>, but <code>translation</code> is modified so that the potential <a class="el" href="classqglviewer_1_1Frame.html#a0974dfe336ed84a20adb8c6cdf8dedd9">constraint()</a> of the Frame is satisfied.</p>
<p>Emits the <a class="el" href="classqglviewer_1_1Frame.html#ab6722375e68e03d151762ebfc83c5459">modified()</a> signal. See also <a class="el" href="classqglviewer_1_1Frame.html#a9d4ab1388820d002d44304c5463fbfbd">setRotationWithConstraint()</a> and <a class="el" href="classqglviewer_1_1Frame.html#a5081403cb47f1324edae5278d5438a38">setPositionWithConstraint()</a>. </p>

</div>
</div>
<a class="anchor" id="a05a3e18419f02427366a95b1e299f12e"></a><!-- doxytag: member="qglviewer::Frame::transformOf" ref="a05a3e18419f02427366a95b1e299f12e" args="(const Vec &amp;src) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classqglviewer_1_1Vec.html">Vec</a> transformOf </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&#160;</td>
          <td class="paramname"> <em>src</em>&#160;)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the Frame transform of a vector <code>src</code> defined in the world coordinate system (converts vectors from world to Frame).</p>
<p><a class="el" href="classqglviewer_1_1Frame.html#aba2c6c46c1825a81f09d22322b03d9b5">inverseTransformOf()</a> performs the inverse transformation. <a class="el" href="classqglviewer_1_1Frame.html#ac706b338b08d9d7b511fd84d0b6ecf96">coordinatesOf()</a> converts 3D coordinates instead of 3D vectors (here only the rotational part of the transformation is taken into account).</p>
<p>See the <a href="../examples/frameTransform.html">frameTransform example</a> for an illustration. </p>

</div>
</div>
<a class="anchor" id="a3416ca5a53c1f2d932fca1906ec1c6c7"></a><!-- doxytag: member="qglviewer::Frame::transformOfFrom" ref="a3416ca5a53c1f2d932fca1906ec1c6c7" args="(const Vec &amp;src, const Frame *const from) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classqglviewer_1_1Vec.html">Vec</a> transformOfFrom </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&#160;</td>
          <td class="paramname"> <em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const Frame *const &#160;</td>
          <td class="paramname"> <em>from</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the Frame transform of the vector whose coordinates in the <code>from</code> coordinate system is <code>src</code> (converts vectors from <code>from</code> to Frame).</p>
<p><a class="el" href="classqglviewer_1_1Frame.html#a01636f93c09d6fd9fca90cb671afdda0">transformOfIn()</a> performs the inverse transformation. </p>

</div>
</div>
<a class="anchor" id="a01636f93c09d6fd9fca90cb671afdda0"></a><!-- doxytag: member="qglviewer::Frame::transformOfIn" ref="a01636f93c09d6fd9fca90cb671afdda0" args="(const Vec &amp;src, const Frame *const in) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classqglviewer_1_1Vec.html">Vec</a> transformOfIn </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&#160;</td>
          <td class="paramname"> <em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const Frame *const &#160;</td>
          <td class="paramname"> <em>in</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the <code>in</code> transform of the vector whose coordinates in the Frame coordinate system is <code>src</code> (converts vectors from Frame to <code>in</code>).</p>
<p><a class="el" href="classqglviewer_1_1Frame.html#a3416ca5a53c1f2d932fca1906ec1c6c7">transformOfFrom()</a> performs the inverse transformation. </p>

</div>
</div>
<a class="anchor" id="ac774331eeae8d29acc94f5653b2f2c3b"></a><!-- doxytag: member="qglviewer::Frame::translate" ref="ac774331eeae8d29acc94f5653b2f2c3b" args="(const Vec &amp;t)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void translate </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&#160;</td>
          <td class="paramname"> <em>t</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Translates the Frame of <code>t</code> (defined in the Frame coordinate system).</p>
<p>The translation actually applied to the Frame may differ from <code>t</code> since it can be filtered by the <a class="el" href="classqglviewer_1_1Frame.html#a0974dfe336ed84a20adb8c6cdf8dedd9">constraint()</a>. Use <a class="el" href="classqglviewer_1_1Frame.html#a4cb0cf5ff79e1acf0755befdaceb6f4a">translate(Vec&amp;)</a> or <a class="el" href="classqglviewer_1_1Frame.html#a7f3395d24d164a7af9a8b99e4e6bafc0">setTranslationWithConstraint()</a> to retrieve the filtered translation value. Use <a class="el" href="classqglviewer_1_1Frame.html#ae5495cd791858225ba7c85ce39329704">setTranslation()</a> to directly translate the Frame without taking the <a class="el" href="classqglviewer_1_1Frame.html#a0974dfe336ed84a20adb8c6cdf8dedd9">constraint()</a> into account.</p>
<p>See also <a class="el" href="classqglviewer_1_1Frame.html#ac754417fa609300f980fcba5405c9989">rotate(const Quaternion&amp;)</a>. Emits the <a class="el" href="classqglviewer_1_1Frame.html#ab6722375e68e03d151762ebfc83c5459">modified()</a> signal. </p>

</div>
</div>
<a class="anchor" id="a9081ed23141a5980f028b21d58fa3290"></a><!-- doxytag: member="qglviewer::Frame::translate" ref="a9081ed23141a5980f028b21d58fa3290" args="(float x, float y, float z)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void translate </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"> <em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"> <em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"> <em>z</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Same as <a class="el" href="classqglviewer_1_1Frame.html#ac774331eeae8d29acc94f5653b2f2c3b">translate(const Vec&amp;)</a> but with <code>float</code> parameters. </p>

</div>
</div>
<a class="anchor" id="a4cb0cf5ff79e1acf0755befdaceb6f4a"></a><!-- doxytag: member="qglviewer::Frame::translate" ref="a4cb0cf5ff79e1acf0755befdaceb6f4a" args="(Vec &amp;t)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void translate </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&#160;</td>
          <td class="paramname"> <em>t</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Same as <a class="el" href="classqglviewer_1_1Frame.html#ac774331eeae8d29acc94f5653b2f2c3b">translate(const Vec&amp;)</a> but <code>t</code> may be modified to satisfy the translation <a class="el" href="classqglviewer_1_1Frame.html#a0974dfe336ed84a20adb8c6cdf8dedd9">constraint()</a>. Its new value corresponds to the translation that has actually been applied to the Frame. </p>

</div>
</div>
<a class="anchor" id="a2ae644799a164d7519769ba393565c5d"></a><!-- doxytag: member="qglviewer::Frame::translate" ref="a2ae644799a164d7519769ba393565c5d" args="(float &amp;x, float &amp;y, float &amp;z)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void translate </td>
          <td>(</td>
          <td class="paramtype">float &amp;&#160;</td>
          <td class="paramname"> <em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float &amp;&#160;</td>
          <td class="paramname"> <em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float &amp;&#160;</td>
          <td class="paramname"> <em>z</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Same as <a class="el" href="classqglviewer_1_1Frame.html#a4cb0cf5ff79e1acf0755befdaceb6f4a">translate(Vec&amp;)</a> but with <code>float</code> parameters. </p>

</div>
</div>
<a class="anchor" id="a388a5f38140104323aa51fc207fde642"></a><!-- doxytag: member="qglviewer::Frame::translation" ref="a388a5f38140104323aa51fc207fde642" 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> translation </td>
          <td>(</td>
          <td class="paramname">&#160;)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the Frame translation, defined with respect to the <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a>.</p>
<p>Use <a class="el" href="classqglviewer_1_1Frame.html#abc38a05a597e07c9ff525122682adc50">position()</a> to get the result in the world coordinates. These two values are identical when the <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a> is <code>NULL</code> (default).</p>
<p>See also <a class="el" href="classqglviewer_1_1Frame.html#ae5495cd791858225ba7c85ce39329704">setTranslation()</a> and <a class="el" href="classqglviewer_1_1Frame.html#a7f3395d24d164a7af9a8b99e4e6bafc0">setTranslationWithConstraint()</a>. </p>

</div>
</div>
<a class="anchor" id="a37d4da8cfd297273e7bb55538debaa3e"></a><!-- doxytag: member="qglviewer::Frame::worldInverse" ref="a37d4da8cfd297273e7bb55538debaa3e" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Frame worldInverse </td>
          <td>(</td>
          <td class="paramname">&#160;)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the <a class="el" href="classqglviewer_1_1Frame.html#a4534c3188c217feb8d21465d4cefd4ad">inverse()</a> of the Frame world transformation.</p>
<p>The <a class="el" href="classqglviewer_1_1Frame.html#a691af39b54669fad8b4e73599de22094">orientation()</a> of the new Frame is the <a class="el" href="classqglviewer_1_1Quaternion.html#ac378ebc684d691dc25336b895f24a82e">Quaternion::inverse()</a> of the original orientation. Its <a class="el" href="classqglviewer_1_1Frame.html#abc38a05a597e07c9ff525122682adc50">position()</a> is the negated and inverse rotated image of the original position.</p>
<p>The result Frame has a <code>NULL</code> <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a> and a <code>NULL</code> <a class="el" href="classqglviewer_1_1Frame.html#a0974dfe336ed84a20adb8c6cdf8dedd9">constraint()</a>.</p>
<p>Use <a class="el" href="classqglviewer_1_1Frame.html#a4534c3188c217feb8d21465d4cefd4ad">inverse()</a> for a local (i.e. with respect to <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a>) transformation inverse. </p>

</div>
</div>
<a class="anchor" id="a39aa0648db05006e2b2f22ac5d971141"></a><!-- doxytag: member="qglviewer::Frame::worldMatrix" ref="a39aa0648db05006e2b2f22ac5d971141" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const GLdouble * worldMatrix </td>
          <td>(</td>
          <td class="paramname">&#160;)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the 4x4 OpenGL transformation matrix represented by the Frame.</p>
<p>This method should be used in conjunction with <code>glMultMatrixd()</code> to modify the OpenGL modelview matrix from a Frame: </p>
<div class="fragment"><pre class="fragment">  <span class="comment">// The modelview here corresponds to the world coordinate system.</span>
  <a class="code" href="classqglviewer_1_1Frame.html#ab71e6ee46f0c2593266f9a62d9c5e029">Frame</a> fr(pos, Quaternion(from, to));
  glPushMatrix();
  glMultMatrixd(fr.worldMatrix());
  <span class="comment">// draw object in the fr coordinate system.</span>
  glPopMatrix();
</pre></div><p>This matrix represents the global Frame transformation: the entire <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a> hierarchy is taken into account to define the Frame transformation from the world coordinate system. Use <a class="el" href="classqglviewer_1_1Frame.html#aa12123cf45f68b9f7fe0526b70ab0047">matrix()</a> to get the local Frame transformation matrix (i.e. defined with respect to the <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a>). These two match when the <a class="el" href="classqglviewer_1_1Frame.html#a9794b079db5f492e8804631d3d23baec">referenceFrame()</a> is <code>NULL</code>.</p>
<p>The OpenGL format of the result is the transpose of the actual mathematical European representation (translation is on the last <em>line</em> instead of the last <em>column</em>).</p>
<dl class="attention"><dt><b>Attention:</b></dt><dd>The result is only valid until the next call to <a class="el" href="classqglviewer_1_1Frame.html#aa12123cf45f68b9f7fe0526b70ab0047">matrix()</a>, <a class="el" href="classqglviewer_1_1Frame.html#a4915640a54a6b48a99cbdd0cd42fec48">getMatrix()</a>, <a class="el" href="classqglviewer_1_1Frame.html#a39aa0648db05006e2b2f22ac5d971141">worldMatrix()</a> or <a class="el" href="classqglviewer_1_1Frame.html#a45358fae434b3912ce81577dc7cf4fc9">getWorldMatrix()</a>. Use it immediately (as above) or use <a class="el" href="classqglviewer_1_1Frame.html#a45358fae434b3912ce81577dc7cf4fc9">getWorldMatrix()</a> instead.</dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>The scaling factor of the 4x4 matrix is 1.0. </dd></dl>

</div>
</div>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address class="footer"><small>Generated on Mon Dec 6 2010 01:42:48 for libQGLViewer by&#160;
<a href="http://www.doxygen.org/index.html">
doxygen</a> 1.7.2 </small></address>
</body>
</html>