Sophie

Sophie

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

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

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

<tr><td class="memItemLeft" nowrap align=right valign=top>virtual&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1TriangleSetConstraint.html#a1">~TriangleSetConstraint</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1TriangleSetConstraint.html#a2">constrainTranslation</a> (<a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;, <a class="el" href="classqglviewer_1_1Frame.html">Frame</a> *const)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>unsigned int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1TriangleSetConstraint.html#a3">addPoint</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;p)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>unsigned int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1TriangleSetConstraint.html#a4">addTriangle</a> (const unsigned int i0, const unsigned int i1, const unsigned int i2)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1TriangleSetConstraint.html#a5">indexOfPoint</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;p) const</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>unsigned int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1TriangleSetConstraint.html#a6">currentTriangle</a> () const</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1TriangleSetConstraint.html#a7">setCurrentTriangle</a> (const unsigned int ct)</td></tr>

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

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1TriangleSetConstraint.html#a9">setEpsilon</a> (const float e)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classqglviewer_1_1Vec.html">Vec</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1TriangleSetConstraint.html#a10">point</a> (unsigned int index) const</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1TriangleSetConstraint.html#a11">neighTriangle</a> (unsigned int index, unsigned short edge) const</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>unsigned int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1TriangleSetConstraint.html#a12">trianglePoint</a> (unsigned int index, unsigned short nb) const</td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A translation <a class="el" href="classqglviewer_1_1Constraint.html">Constraint</a> defined with respect to a set of triangles. 
<p>
Define your path (connected set of triangles) using <a class="el" href="classqglviewer_1_1TriangleSetConstraint.html#a3">addPoint()</a> and <a class="el" href="classqglviewer_1_1TriangleSetConstraint.html#a4">addTriangle()</a>. The frame will then be constrained to move on this path.<p>
Development version. Many things need to be cleared.<p>
See <a href="../examples/triSetConstraint.html">triSetConstraint</a> for an illustration. 
<p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a name="a0" doxytag="qglviewer::TriangleSetConstraint::TriangleSetConstraint"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="classqglviewer_1_1TriangleSetConstraint.html">TriangleSetConstraint</a> </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline]</code></td>
        </tr>

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

<p>
Create an empty <a class="el" href="classqglviewer_1_1TriangleSetConstraint.html">TriangleSetConstraint</a>. <a class="el" href="classqglviewer_1_1TriangleSetConstraint.html#a6">currentTriangle()</a> set to 0.     </td>
  </tr>
</table>
<a name="a1" doxytag="qglviewer::TriangleSetConstraint::~TriangleSetConstraint"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual ~<a class="el" href="classqglviewer_1_1TriangleSetConstraint.html">TriangleSetConstraint</a> </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline, virtual]</code></td>
        </tr>

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

<p>
Virtual empty destructor.     </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a name="a3" doxytag="qglviewer::TriangleSetConstraint::addPoint"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> unsigned int addPoint </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>p</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

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

<p>
Add a point to the triangle set. Use <a class="el" href="classqglviewer_1_1TriangleSetConstraint.html#a4">addTriangle()</a> to create a triangle with this point. Returns the index of the point in the internal list.<p>
If this point is within a range of <a class="el" href="classqglviewer_1_1TriangleSetConstraint.html#a8">epsilon()</a> around an already entered point, the point is not added. The returned index is the one of the first point. See <a class="el" href="classqglviewer_1_1TriangleSetConstraint.html#a5">indexOfPoint()</a>.     </td>
  </tr>
</table>
<a name="a4" doxytag="qglviewer::TriangleSetConstraint::addTriangle"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> unsigned int addTriangle </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const unsigned int&nbsp;</td>
          <td class="mdname" nowrap> <em>i0</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const unsigned int&nbsp;</td>
          <td class="mdname" nowrap> <em>i1</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const unsigned int&nbsp;</td>
          <td class="mdname" nowrap> <em>i2</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

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

<p>
Add a triangle between the three points whose indexes are given. Point are added with <a class="el" href="classqglviewer_1_1TriangleSetConstraint.html#a3">addPoint()</a>, which returns their index. Returns the index of the created triangle (used by <a class="el" href="classqglviewer_1_1TriangleSetConstraint.html#a6">currentTriangle()</a>).     </td>
  </tr>
</table>
<a name="a2" doxytag="qglviewer::TriangleSetConstraint::constrainTranslation"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void constrainTranslation </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>trans</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="classqglviewer_1_1Frame.html">Frame</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>const</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [virtual]</code></td>
        </tr>

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

<p>
Constrain the translation <code>trans</code> with respect to a path defined by a triangle set. See <a class="el" href="classqglviewer_1_1TriangleSetConstraint.html#a4">addTriangle()</a> and <a class="el" href="classqglviewer_1_1TriangleSetConstraint.html#a3">addPoint()</a>. 
<p>
Reimplemented from <a class="el" href="classqglviewer_1_1Constraint.html#a1">Constraint</a>.    </td>
  </tr>
</table>
<a name="a6" doxytag="qglviewer::TriangleSetConstraint::currentTriangle"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> unsigned int currentTriangle </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [inline]</code></td>
        </tr>

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

<p>
The index of the triangle the frame is currently on. Changes as the frame moves on the triangle set.     </td>
  </tr>
</table>
<a name="a8" doxytag="qglviewer::TriangleSetConstraint::epsilon"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> float epsilon </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [inline]</code></td>
        </tr>

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

<p>
The current value of epsilon, used to determine identical points in <a class="el" href="classqglviewer_1_1TriangleSetConstraint.html#a3">addPoint()</a>.     </td>
  </tr>
</table>
<a name="a5" doxytag="qglviewer::TriangleSetConstraint::indexOfPoint"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> int indexOfPoint </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>p</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const</td>
        </tr>

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

<p>
Returns the index of point <code>in</code> the point list. Returns -1 if not found. Two points are declared identical if their distance is lower or equal than <a class="el" href="classqglviewer_1_1TriangleSetConstraint.html#a8">epsilon()</a>.     </td>
  </tr>
</table>
<a name="a11" doxytag="qglviewer::TriangleSetConstraint::neighTriangle"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> int neighTriangle </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">unsigned int&nbsp;</td>
          <td class="mdname" nowrap> <em>index</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>unsigned short&nbsp;</td>
          <td class="mdname" nowrap> <em>edge</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> const<code> [inline]</code></td>
        </tr>

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

<p>
Returns the adjacent triangle of triangle <code>index</code>, along its edge <code>edge</code>.     </td>
  </tr>
</table>
<a name="a10" doxytag="qglviewer::TriangleSetConstraint::point"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> point </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">unsigned int&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>index</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [inline]</code></td>
        </tr>

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

<p>
Returns the coordinates of the point at <code>index</code>.     </td>
  </tr>
</table>
<a name="a7" doxytag="qglviewer::TriangleSetConstraint::setCurrentTriangle"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void setCurrentTriangle </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const unsigned int&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>ct</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

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

<p>
Use this function to initialize the constraint. You should give the index of the triangle the frame is currently on (use <a class="el" href="classqglviewer_1_1Frame.html#z33_1">Frame::setPosition()</a> to move the frame if needed). If the constraint is lost and <a class="el" href="classqglviewer_1_1TriangleSetConstraint.html#a6">currentTriangle()</a> is not valid, the frame will be positioned back to the center of the previous <a class="el" href="classqglviewer_1_1TriangleSetConstraint.html#a6">currentTriangle()</a>.     </td>
  </tr>
</table>
<a name="a9" doxytag="qglviewer::TriangleSetConstraint::setEpsilon"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void setEpsilon </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const float&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>e</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline]</code></td>
        </tr>

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

<p>
Set the current value of epsilon, used to determine identical points in <a class="el" href="classqglviewer_1_1TriangleSetConstraint.html#a3">addPoint()</a>. Default value is 0.0.     </td>
  </tr>
</table>
<a name="a12" doxytag="qglviewer::TriangleSetConstraint::trianglePoint"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> unsigned int trianglePoint </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">unsigned int&nbsp;</td>
          <td class="mdname" nowrap> <em>index</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>unsigned short&nbsp;</td>
          <td class="mdname" nowrap> <em>nb</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> const<code> [inline]</code></td>
        </tr>

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

<p>
Returns the index of the <code>nb</code> point of triangle <code>index</code>.     </td>
  </tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Wed Feb 11 17:22:08 2004 for libQGLViewer by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
</a>1.3.3 </small></address>
</body>
</html>