Sophie

Sophie

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

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: Vec 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>Vec Class Reference</h1>A 3D point and vector class.  
<a href="#_details">More...</a>
<p>
<a href="classqglviewer_1_1Vec-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Setting Vec values</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_1Vec.html#z135_0">Vec</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default constructor. Default value is (0,0,0). </em> <a href="#z135_0"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Vec.html#z135_1">Vec</a> (const float X, const float Y, const float Z)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Standard constructor with the x,y and z values. </em> <a href="#z135_1"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>template&lt;class C&gt; &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Vec.html#z135_2">Vec</a> (const C &amp;c)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Universal explicit converter from any class to <a class="el" href="classqglviewer_1_1Vec.html">Vec</a>. </em> <a href="#z135_2"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Vec.html#z135_3">operator=</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;v)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Classical = operator. </em> <a href="#z135_3"></a><em><br><br></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_1Vec.html#z135_4">setValue</a> (const float X, const float Y, const float Z)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the current value. Faster than using operator equal with a temporary Vec(x,y,z). </em> <a href="#z135_4"></a><em><br><br></td></tr>
<tr><td colspan=2><br><h2>Access values</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Vec.html#z137_0">operator[]</a> (int i) const</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Bracket operator, with a constant return value. </em> <a href="#z137_0"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>float &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Vec.html#z137_1">operator[]</a> (int i)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Bracket operator, returns an l-value. </em> <a href="#z137_1"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>const float *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Vec.html#z137_2">address</a> () const</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The memory address of the vector. Useful as an argument for glVertex3fv, glNormal3fv... </em> <a href="#z137_2"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Vec.html#z137_3">operator const float *</a> () const</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Dereferencing operator that returns the memory address of the vector. Same as <a class="el" href="classqglviewer_1_1Vec.html#z137_2">address()</a>. </em> <a href="#z137_3"></a><em><br><br></td></tr>
<tr><td colspan=2><br><h2>Calculus</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Vec.html#z139_0">operator+=</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;a)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds <code>a</code> to the vector. </em> <a href="#z139_0"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Vec.html#z139_1">operator-=</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;a)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Subtracts <code>a</code> to the vector. </em> <a href="#z139_1"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Vec.html#z139_2">operator *=</a> (float k)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Multiply the vector by a scalar. </em> <a href="#z139_2"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Vec.html#z139_3">operator/=</a> (float k)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Divides the vector by a scalar. If the library was compiled with the "debug" qt <code>CONFIG</code> flag, tests for null value. </em> <a href="#z139_3"></a><em><br><br></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_1Vec.html#z139_4">operator+</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;a, const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;b)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the sum of the two vectors. </em> <a href="#z139_4"></a><em><br><br></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_1Vec.html#z139_5">operator-</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;a, const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;b)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the difference of the two vectors. </em> <a href="#z139_5"></a><em><br><br></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_1Vec.html#z139_6">operator-</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;a)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Unary minus operator. </em> <a href="#z139_6"></a><em><br><br></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_1Vec.html#z139_7">operator *</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;a, const float k)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the product of the vector with a scalar. </em> <a href="#z139_7"></a><em><br><br></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_1Vec.html#z139_8">operator *</a> (float k, const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;a)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the product of the vector with a scalar. </em> <a href="#z139_8"></a><em><br><br></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_1Vec.html#z139_9">operator/</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;a, const float k)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the division of the vector with a scalar. If the library was compiled with the "debug" qt <code>CONFIG</code> flag, tests for null value. </em> <a href="#z139_9"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Vec.html#z139_10">operator!=</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;a, const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;b)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Comparison based on the squared norm of the difference vector, see operator==. </em> <a href="#z139_10"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Vec.html#z139_11">operator==</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;a, const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;b)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Comparison based on the <em>squared</em> norm of the difference vector, epsilon=1E-10. </em> <a href="#z139_11"></a><em><br><br></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_1Vec.html#z139_12">operator *</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;a, const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;b)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Dot product. </em> <a href="#z139_12"></a><em><br><br></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_1Vec.html#z139_13">cross</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;a, const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;b)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Cross product of the two vectors. Mind the order ! </em> <a href="#z139_13"></a><em><br><br></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_1Vec.html#z139_14">operator^</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;a, const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;b)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Cross product of the two vectors. See also <a class="el" href="classqglviewer_1_1Vec.html#z139_13">cross()</a>. </em> <a href="#z139_14"></a><em><br><br></td></tr>
<tr><td colspan=2><br><h2>Norm of the vector</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Vec.html#z141_0">sqNorm</a> () const</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the <em>squared</em> norm of the <a class="el" href="classqglviewer_1_1Vec.html">Vec</a>. </em> <a href="#z141_0"></a><em><br><br></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_1Vec.html#z141_1">norm</a> () const</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the norm of the vector. </em> <a href="#z141_1"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Vec.html#z141_2">normalize</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Normalizes the <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> and returns the norm value. If the library was compiled with the "debug" qt <code>CONFIG</code> flag, tests for null value. </em> <a href="#z141_2"></a><em><br><br></td></tr>
<tr><td colspan=2><br><h2>Vec projection</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Vec.html#z143_0">projectOnAxis</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;dir)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Projects on the axis whose direction is dir (and that passes through the origin). </em> <a href="#z143_0"></a><em><br><br></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_1Vec.html#z143_1">projectOnPlane</a> (const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;n)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Projects on the plane whose normal is n and that passes through the origin. </em> <a href="#z143_1"></a><em><br><br></td></tr>
<tr><td colspan=2><br><h2>XML representation.</h2></td></tr>
<tr><td colspan=2>These methods are used by higher level class (Camera, KeyFrameInterpolator...) to save and restore the state of the Vec they hold. <br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>QDomElement&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Vec.html#z145_0">domElement</a> (const QString &amp;name, QDomDocument &amp;doc) 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_1Vec.html#z145_1">initFromDOMElement</a> (const QDomElement &amp;de)</td></tr>

<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classqglviewer_1_1Vec.html#o0">x</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The internal data representation is public. One can use v.x, v.y, v.z. </em> <a href="#o0"></a><em><br><br></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_1Vec.html#o1">y</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The internal data representation is public. One can use v.x, v.y, v.z. </em> <a href="#o1"></a><em><br><br></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_1Vec.html#o2">z</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The internal data representation is public. One can use v.x, v.y, v.z. </em> <a href="#o2"></a><em><br><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A 3D point and vector class. 
<p>
<a class="el" href="classqglviewer_1_1Vec.html">Vec</a> is a <a class="el" href="classQGLViewer.html">QGLViewer</a> internal class, used to represent 3D positions and 3D vectors. It is part of the <code>qglviewer</code> namespace. You can use it in your programs by specifying <code>qglviewer::Vec</code>, or by using the qglviewer namespace : <div class="fragment"><pre> <span class="keyword">using</span> <span class="keyword">namespace </span>qglviewer; 
</pre></div><p>
<code><a class="el" href="classqglviewer_1_1Vec.html">Vec</a></code> implements a universal explicit converter, based on the [] <code>operator</code>. Everywhere a <code>const</code> <code><a class="el" href="classqglviewer_1_1Vec.html">Vec</a>&amp;</code> argument is expected, you can use your own 3D point type instead, as long as it implements the [] operator : <div class="fragment"><pre>    <span class="keywordtype">float</span> <a class="code" href="classqglviewer_1_1Vec.html#z137_0">operator[] </a>(<span class="keyword">const</span> <span class="keywordtype">int</span> i)<span class="keyword"> const </span>{ respectively <span class="keywordflow">return</span> x, y or <a class="code" href="classqglviewer_1_1Vec.html#o2">z</a> <span class="keywordflow">for</span> i=0, 1 or 2 };
</pre></div><p>
The following code is hence valid : <div class="fragment"><pre>    <span class="comment">// class myVector implements the [] operator</span>
    myVector mv;
    fr.setPosition( <a class="code" href="classqglviewer_1_1Vec.html">qglviewer::Vec</a>(mv) );
    <span class="comment">// or if you use namespace qglviewer</span>
    fr.setPosition( <a class="code" href="classqglviewer_1_1Vec.html#z135_0">Vec</a>(mv) );
</pre></div><p>
When <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> is used as a return value, a classical float[3] version of the function is always available.<p>
You can also convert a <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> result to your own class, using code such as : <div class="fragment"><pre>    <a class="code" href="classqglviewer_1_1Vec.html">qglviewer::Vec</a> sc = sceneCenter();
    myVector.x() = sc.<a class="code" href="classqglviewer_1_1Vec.html#o0">x</a>;    <span class="comment">// or sc[0]</span>
    myVector.y() = sc.<a class="code" href="classqglviewer_1_1Vec.html#o1">y</a>;    <span class="comment">// or sc[1]</span>
    myVector.z() = sc.<a class="code" href="classqglviewer_1_1Vec.html#o2">z</a>;    <span class="comment">// or sc[2]</span>
</pre></div>See also the <a class="el" href="classqglviewer_1_1Quaternion.html">Quaternion</a> and the <a class="el" href="classqglviewer_1_1Frame.html">Frame</a> documentation. 
<p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a name="z135_0" doxytag="qglviewer::Vec::Vec"></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> </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, explicit]</code></td>
        </tr>

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

<p>
Default constructor. Default value is (0,0,0). 
<p>
    </td>
  </tr>
</table>
<a name="z135_1" doxytag="qglviewer::Vec::Vec"></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> </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const float&nbsp;</td>
          <td class="mdname" nowrap> <em>X</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const float&nbsp;</td>
          <td class="mdname" nowrap> <em>Y</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const float&nbsp;</td>
          <td class="mdname" nowrap> <em>Z</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [inline, explicit]</code></td>
        </tr>

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

<p>
Standard constructor with the x,y and z values. 
<p>
    </td>
  </tr>
</table>
<a name="z135_2" doxytag="qglviewer::Vec::Vec"></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> </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const C &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>c</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline, explicit]</code></td>
        </tr>

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

<p>
Universal explicit converter from any class to <a class="el" href="classqglviewer_1_1Vec.html">Vec</a>. 
<p>
<div class="fragment"><pre>      <span class="comment">// Declared in class MyVec</span>
      <span class="keywordtype">float</span> <a class="code" href="classqglviewer_1_1Vec.html#z137_0">operator[]</a>(<span class="keywordtype">int</span> i)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> (x, y or <a class="code" href="classqglviewer_1_1Vec.html#o2">z</a>); }

      <span class="comment">// Then you can use</span>
      MyVec v(...);
      camera()-&gt;setPosition( <a class="code" href="classqglviewer_1_1Vec.html">qglviewer::Vec</a>(v) );
</pre></div>    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a name="z137_2" doxytag="qglviewer::Vec::address"></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"> const float* address </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 memory address of the vector. Useful as an argument for glVertex3fv, glNormal3fv... 
<p>
    </td>
  </tr>
</table>
<a name="z145_0" doxytag="qglviewer::Vec::domElement"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> QDomElement domElement </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const QString &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>name</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>QDomDocument &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>doc</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> const</td>
        </tr>

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

<p>
Creates an XML QDomElement that represents the <a class="el" href="classqglviewer_1_1Vec.html">Vec</a>. <code>name</code> is the name of the QDomElement tag. You need to provide the QDomDocument <code>doc</code> that will hold the resulting element. Typical usage would be: <div class="fragment"><pre> QDomDocument doc(<span class="stringliteral">"myDocument"</span>);
 Vec sunPos;
 <span class="comment">// ...</span>
 anyNode.addElement(sunPos.domElement(<span class="stringliteral">"sunPosition"</span>, doc));
 <span class="comment">// ...</span>
</pre></div>Use <a class="el" href="classqglviewer_1_1Vec.html#z145_1">initFromDOMElement()</a> to restore the <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> state from the resulting domElement.<p>
See also <a class="el" href="classqglviewer_1_1Quaternion.html#z129_0">Quaternion::domElement()</a>, <a class="el" href="classqglviewer_1_1Camera.html#z23_0">Camera::domElement()</a>, <a class="el" href="classqglviewer_1_1KeyFrameInterpolator.html#z59_0">KeyFrameInterpolator::domElement()</a>...     </td>
  </tr>
</table>
<a name="z145_1" doxytag="qglviewer::Vec::initFromDOMElement"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void initFromDOMElement </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const QDomElement &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>de</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

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

<p>
Restore the <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> state from a QDomElement created by <a class="el" href="classqglviewer_1_1Vec.html#z145_0">domElement()</a>. The QDomElement must contain the <em>x</em>, <em>y</em> and <em>z</em> attributes, otherwise these fields are set to 0.0.     </td>
  </tr>
</table>
<a name="z141_1" doxytag="qglviewer::Vec::norm"></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 norm </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [inline]</code></td>
        </tr>

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

<p>
Returns the norm of the vector. 
<p>
    </td>
  </tr>
</table>
<a name="z141_2" doxytag="qglviewer::Vec::normalize"></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>&amp; normalize </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>
Normalizes the <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> and returns the norm value. If the library was compiled with the "debug" qt <code>CONFIG</code> flag, tests for null value. 
<p>
    </td>
  </tr>
</table>
<a name="z139_2" doxytag="qglviewer::Vec::operator *="></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>&amp; operator *= </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">float&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>k</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>
Multiply the vector by a scalar. 
<p>
    </td>
  </tr>
</table>
<a name="z137_3" doxytag="qglviewer::Vec::operator const float *"></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"> operator const float * </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>
Dereferencing operator that returns the memory address of the vector. Same as <a class="el" href="classqglviewer_1_1Vec.html#z137_2">address()</a>. 
<p>
    </td>
  </tr>
</table>
<a name="z139_0" doxytag="qglviewer::Vec::operator+="></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>&amp; operator+= </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>a</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>
Adds <code>a</code> to the vector. 
<p>
    </td>
  </tr>
</table>
<a name="z139_1" doxytag="qglviewer::Vec::operator-="></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>&amp; operator-= </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>a</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>
Subtracts <code>a</code> to the vector. 
<p>
    </td>
  </tr>
</table>
<a name="z139_3" doxytag="qglviewer::Vec::operator/="></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>&amp; operator/= </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">float&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>k</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>
Divides the vector by a scalar. If the library was compiled with the "debug" qt <code>CONFIG</code> flag, tests for null value. 
<p>
    </td>
  </tr>
</table>
<a name="z135_3" doxytag="qglviewer::Vec::operator="></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>&amp; operator= </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>v</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>
Classical = operator. 
<p>
    </td>
  </tr>
</table>
<a name="z137_1" doxytag="qglviewer::Vec::operator[]"></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&amp; operator[] </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">int&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>i</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>
Bracket operator, returns an l-value. 
<p>
    </td>
  </tr>
</table>
<a name="z137_0" doxytag="qglviewer::Vec::operator[]"></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 operator[] </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">int&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>i</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>
Bracket operator, with a constant return value. 
<p>
    </td>
  </tr>
</table>
<a name="z143_0" doxytag="qglviewer::Vec::projectOnAxis"></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 projectOnAxis </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>dir</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>
Projects on the axis whose direction is dir (and that passes through the origin). 
<p>
<dl compact><dt><b>Attention:</b></dt><dd>The axis direction vector must be normalized. This is checked if the library was compiled with the "debug" qt <code>CONFIG</code> flag. </dd></dl>
    </td>
  </tr>
</table>
<a name="z143_1" doxytag="qglviewer::Vec::projectOnPlane"></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 projectOnPlane </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>n</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>
Projects on the plane whose normal is n and that passes through the origin. 
<p>
<dl compact><dt><b>Attention:</b></dt><dd>The plane normal vector must be normalized. This is checked in the debug library release. </dd></dl>
    </td>
  </tr>
</table>
<a name="z135_4" doxytag="qglviewer::Vec::setValue"></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 setValue </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const float&nbsp;</td>
          <td class="mdname" nowrap> <em>X</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const float&nbsp;</td>
          <td class="mdname" nowrap> <em>Y</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const float&nbsp;</td>
          <td class="mdname" nowrap> <em>Z</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><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. Faster than using operator equal with a temporary Vec(x,y,z). 
<p>
    </td>
  </tr>
</table>
<a name="z141_0" doxytag="qglviewer::Vec::sqNorm"></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 sqNorm </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [inline]</code></td>
        </tr>

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

<p>
Returns the <em>squared</em> norm of the <a class="el" href="classqglviewer_1_1Vec.html">Vec</a>. 
<p>
    </td>
  </tr>
</table>
<hr><h2>Friends And Related Function Documentation</h2>
<a name="z139_13" doxytag="qglviewer::Vec::cross"></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> cross </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="mdname" nowrap> <em>a</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>b</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [friend]</code></td>
        </tr>

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

<p>
Cross product of the two vectors. Mind the order ! 
<p>
    </td>
  </tr>
</table>
<a name="z139_12" doxytag="qglviewer::Vec::operator *"></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 operator * </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="mdname" nowrap> <em>a</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>b</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [friend]</code></td>
        </tr>

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

<p>
Dot product. 
<p>
    </td>
  </tr>
</table>
<a name="z139_8" doxytag="qglviewer::Vec::operator *"></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> operator * </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">float&nbsp;</td>
          <td class="mdname" nowrap> <em>k</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>a</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [friend]</code></td>
        </tr>

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

<p>
Returns the product of the vector with a scalar. 
<p>
    </td>
  </tr>
</table>
<a name="z139_7" doxytag="qglviewer::Vec::operator *"></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> operator * </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="mdname" nowrap> <em>a</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const float&nbsp;</td>
          <td class="mdname" nowrap> <em>k</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [friend]</code></td>
        </tr>

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

<p>
Returns the product of the vector with a scalar. 
<p>
    </td>
  </tr>
</table>
<a name="z139_10" doxytag="qglviewer::Vec::operator!="></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> bool operator!= </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="mdname" nowrap> <em>a</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>b</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [friend]</code></td>
        </tr>

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

<p>
Comparison based on the squared norm of the difference vector, see operator==. 
<p>
    </td>
  </tr>
</table>
<a name="z139_4" doxytag="qglviewer::Vec::operator+"></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> operator+ </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="mdname" nowrap> <em>a</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>b</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [friend]</code></td>
        </tr>

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

<p>
Returns the sum of the two vectors. 
<p>
    </td>
  </tr>
</table>
<a name="z139_6" doxytag="qglviewer::Vec::operator-"></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> operator- </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>a</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [friend]</code></td>
        </tr>

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

<p>
Unary minus operator. 
<p>
    </td>
  </tr>
</table>
<a name="z139_5" doxytag="qglviewer::Vec::operator-"></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> operator- </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="mdname" nowrap> <em>a</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>b</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [friend]</code></td>
        </tr>

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

<p>
Returns the difference of the two vectors. 
<p>
    </td>
  </tr>
</table>
<a name="z139_9" doxytag="qglviewer::Vec::operator/"></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> operator/ </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="mdname" nowrap> <em>a</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const float&nbsp;</td>
          <td class="mdname" nowrap> <em>k</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [friend]</code></td>
        </tr>

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

<p>
Returns the division of the vector with a scalar. If the library was compiled with the "debug" qt <code>CONFIG</code> flag, tests for null value. 
<p>
    </td>
  </tr>
</table>
<a name="z139_11" doxytag="qglviewer::Vec::operator=="></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> bool operator== </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="mdname" nowrap> <em>a</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>b</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [friend]</code></td>
        </tr>

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

<p>
Comparison based on the <em>squared</em> norm of the difference vector, epsilon=1E-10. 
<p>
    </td>
  </tr>
</table>
<a name="z139_14" doxytag="qglviewer::Vec::operator^"></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> operator^ </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="mdname" nowrap> <em>a</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="classqglviewer_1_1Vec.html">Vec</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>b</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [friend]</code></td>
        </tr>

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

<p>
Cross product of the two vectors. See also <a class="el" href="classqglviewer_1_1Vec.html#z139_13">cross()</a>. 
<p>
    </td>
  </tr>
</table>
<hr><h2>Member Data Documentation</h2>
<a name="o0" doxytag="qglviewer::Vec::x"></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 <a class="el" href="classqglviewer_1_1Vec.html#o0">x</a>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
The internal data representation is public. One can use v.x, v.y, v.z. 
<p>
    </td>
  </tr>
</table>
<a name="o1" doxytag="qglviewer::Vec::y"></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 <a class="el" href="classqglviewer_1_1Vec.html#o1">y</a>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
The internal data representation is public. One can use v.x, v.y, v.z. 
<p>
    </td>
  </tr>
</table>
<a name="o2" doxytag="qglviewer::Vec::z"></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 <a class="el" href="classqglviewer_1_1Vec.html#o2">z</a>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
The internal data representation is public. One can use v.x, v.y, v.z. 
<p>
    </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>