Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > f37f2c0b149d5391818dc5157943cda0 > files > 234

gnome-chemistry-utils-devel-0.10.8-3mdv2010.0.i586.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>The Gnome Chemistry Utils: gcu::Matrix Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="classes.html"><span>Class&nbsp;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="namespacegcu.html">gcu</a>::<a class="el" href="classgcu_1_1Matrix.html">Matrix</a>
  </div>
</div>
<div class="contents">
<h1>gcu::Matrix Class Reference</h1><!-- doxytag: class="gcu::Matrix" -->
<p><code>#include &lt;<a class="el" href="matrix_8h_source.html">gcu/matrix.h</a>&gt;</code></p>

<p><a href="classgcu_1_1Matrix-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcu_1_1Matrix.html#a80257f73182ab589930c1d0f13740bc3">Matrix</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcu_1_1Matrix.html#a2241fb13c82207ababfc26294e22b269">~Matrix</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcu_1_1Matrix.html#aaea63ae261a4e9cdce92a47d9326140c">Matrix</a> (double Psi, double Theta, double Phi, <a class="el" href="namespacegcu.html#a61b2c1e88b71e939f229107e8bc5615a">MatrixType</a> Type)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcu_1_1Matrix.html#a4562cc4213b226bdb5b9f50a73466e88">Matrix</a> (double x11, double x12, double x13, double x21, double x22, double x23, double x31, double x32, double x33)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classgcu_1_1Matrix.html">Matrix</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcu_1_1Matrix.html#aa8e0fca97ec76c9401c6874badab16db">operator*</a> (<a class="el" href="classgcu_1_1Matrix.html">Matrix</a> const &amp;cMat) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classgcu_1_1Matrix.html">Matrix</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcu_1_1Matrix.html#af764fcd6e477df4d1f61cbce7618ba4d">operator=</a> (<a class="el" href="classgcu_1_1Matrix.html">Matrix</a> const &amp;cMat)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcu_1_1Matrix.html#a0705c5d58d5cad20851db4502717ad67">Euler</a> (double &amp;Psi, double &amp;Theta, double &amp;Phi)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcu_1_1Matrix.html#a6e78a3e4d8624d596073810d6ffc5f3b">Transform</a> (double &amp;dx, double &amp;dy, double &amp;dz) const </td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>This class provides some operations related to rotation of a solid in space. The matrices are 3x3. </p>

<p>Definition at line <a class="el" href="matrix_8h_source.html#l00049">49</a> of file <a class="el" href="matrix_8h_source.html">matrix.h</a>.</p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a80257f73182ab589930c1d0f13740bc3"></a><!-- doxytag: member="gcu::Matrix::Matrix" ref="a80257f73182ab589930c1d0f13740bc3" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">gcu::Matrix::Matrix </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Default constructor. Members are not initialized. This constructor is rarely used. </p>

</div>
</div>
<a class="anchor" id="a2241fb13c82207ababfc26294e22b269"></a><!-- doxytag: member="gcu::Matrix::~Matrix" ref="a2241fb13c82207ababfc26294e22b269" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual gcu::Matrix::~Matrix </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The destructor of <a class="el" href="classgcu_1_1Matrix.html">Matrix</a>. </p>

</div>
</div>
<a class="anchor" id="aaea63ae261a4e9cdce92a47d9326140c"></a><!-- doxytag: member="gcu::Matrix::Matrix" ref="aaea63ae261a4e9cdce92a47d9326140c" args="(double Psi, double Theta, double Phi, MatrixType Type)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">gcu::Matrix::Matrix </td>
          <td>(</td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>Psi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>Theta</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>Phi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacegcu.html#a61b2c1e88b71e939f229107e8bc5615a">MatrixType</a>&nbsp;</td>
          <td class="paramname"> <em>Type</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>Psi,:</em>&nbsp;</td><td>precession angle. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>Theta,:</em>&nbsp;</td><td>nutaton angle. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>Phi,:</em>&nbsp;</td><td>rotation angle. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>Type,:</em>&nbsp;</td><td>the type of the <a class="el" href="classgcu_1_1Matrix.html">Matrix</a>.</td></tr>
  </table>
  </dd>
</dl>
<p>Constructs a <a class="el" href="classgcu_1_1Matrix.html">Matrix</a> instance starting from three angles and the type. if Type is euler or antieuler, the angles are the Euler's angles. If Type is rotation, the values have a somewhat different meaning: they are the angles describing the rotation applied to a solid; the resulting matrix is then multiplied by the current "euler" matrix to give the new euler matrix. The code used in CrystalView::Rotate and in <a class="el" href="structGtkChem3DViewer.html">GtkChem3DViewer</a> code is (when mouse has moved by x and y on the screen): </p>
<div class="fragment"><pre class="fragment">        gdouble z = sqrt(x*x + y*y);
        <a class="code" href="classgcu_1_1Matrix.html#a80257f73182ab589930c1d0f13740bc3">Matrix</a> Mat(0, (y &gt; 0)? - acos(x/z) :acos(x/z), z * M_PI / 90., rotation);
        m_Euler = Mat * m_Euler;
</pre></div><p> The (M_PI / 90.) factor is arbitrary here. </p>

</div>
</div>
<a class="anchor" id="a4562cc4213b226bdb5b9f50a73466e88"></a><!-- doxytag: member="gcu::Matrix::Matrix" ref="a4562cc4213b226bdb5b9f50a73466e88" args="(double x11, double x12, double x13, double x21, double x22, double x23, double x31, double x32, double x33)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">gcu::Matrix::Matrix </td>
          <td>(</td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>x11</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>x12</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>x13</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>x21</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>x22</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>x23</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>x31</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>x32</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>x33</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>x11,:</em>&nbsp;</td><td>value to use at first line and first column of the matrix. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>x12,:</em>&nbsp;</td><td>value to use at first line and second column of the matrix. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>x13,:</em>&nbsp;</td><td>value to use at first line and third column of the matrix. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>x21,:</em>&nbsp;</td><td>value to use at second line and first column of the matrix. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>x22,:</em>&nbsp;</td><td>value to use at second line and second column of the matrix. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>x23,:</em>&nbsp;</td><td>value to use at second line and third column of the matrix. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>x31,:</em>&nbsp;</td><td>value to use at third line and first column of the matrix. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>x32,:</em>&nbsp;</td><td>value to use at third line and second column of the matrix. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>x33,:</em>&nbsp;</td><td>value to use at third line and third column of the matrix.</td></tr>
  </table>
  </dd>
</dl>
<p>Constructs a matrix from its components. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a0705c5d58d5cad20851db4502717ad67"></a><!-- doxytag: member="gcu::Matrix::Euler" ref="a0705c5d58d5cad20851db4502717ad67" args="(double &amp;Psi, double &amp;Theta, double &amp;Phi)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void gcu::Matrix::Euler </td>
          <td>(</td>
          <td class="paramtype">double &amp;&nbsp;</td>
          <td class="paramname"> <em>Psi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double &amp;&nbsp;</td>
          <td class="paramname"> <em>Theta</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double &amp;&nbsp;</td>
          <td class="paramname"> <em>Phi</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>Psi,:</em>&nbsp;</td><td>precession angle. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>Theta,:</em>&nbsp;</td><td>nutaton angle. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>Phi,:</em>&nbsp;</td><td>rotation angle.</td></tr>
  </table>
  </dd>
</dl>
<p>Get the Euler's angles associated to a "euler" <a class="el" href="classgcu_1_1Matrix.html">Matrix</a> as defined in MatrixType. </p>

</div>
</div>
<a class="anchor" id="aa8e0fca97ec76c9401c6874badab16db"></a><!-- doxytag: member="gcu::Matrix::operator*" ref="aa8e0fca97ec76c9401c6874badab16db" args="(Matrix const &amp;cMat) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classgcu_1_1Matrix.html">Matrix</a>&amp; gcu::Matrix::operator* </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classgcu_1_1Matrix.html">Matrix</a> const &amp;&nbsp;</td>
          <td class="paramname"> <em>cMat</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>cMat,:</em>&nbsp;</td><td>a <a class="el" href="classgcu_1_1Matrix.html">Matrix</a> instance to use in the multiplication.</td></tr>
  </table>
  </dd>
</dl>
<p>The matricial multiplication operator. </p>

</div>
</div>
<a class="anchor" id="af764fcd6e477df4d1f61cbce7618ba4d"></a><!-- doxytag: member="gcu::Matrix::operator=" ref="af764fcd6e477df4d1f61cbce7618ba4d" args="(Matrix const &amp;cMat)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classgcu_1_1Matrix.html">Matrix</a>&amp; gcu::Matrix::operator= </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classgcu_1_1Matrix.html">Matrix</a> const &amp;&nbsp;</td>
          <td class="paramname"> <em>cMat</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>cMat,:</em>&nbsp;</td><td>the <a class="el" href="classgcu_1_1Matrix.html">Matrix</a> instance to copy.</td></tr>
  </table>
  </dd>
</dl>
<p>Copies a <a class="el" href="classgcu_1_1Matrix.html">Matrix</a> instance into another one. </p>

</div>
</div>
<a class="anchor" id="a6e78a3e4d8624d596073810d6ffc5f3b"></a><!-- doxytag: member="gcu::Matrix::Transform" ref="a6e78a3e4d8624d596073810d6ffc5f3b" args="(double &amp;dx, double &amp;dy, double &amp;dz) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void gcu::Matrix::Transform </td>
          <td>(</td>
          <td class="paramtype">double &amp;&nbsp;</td>
          <td class="paramname"> <em>dx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double &amp;&nbsp;</td>
          <td class="paramname"> <em>dy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double &amp;&nbsp;</td>
          <td class="paramname"> <em>dz</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>dx,:</em>&nbsp;</td><td>the x coordinate. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dy,:</em>&nbsp;</td><td>the y coordinate. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dz,:</em>&nbsp;</td><td>the z coordinate.</td></tr>
  </table>
  </dd>
</dl>
<p>Initially, dx, dy and dz are the components of the vector to transform (multiply) by the matrix and after execution of this method, dx, dy and dz are the components of the transformed vector. So initial values are lost. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="matrix_8h_source.html">matrix.h</a></li>
</ul>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 6 18:33:55 2009 for The Gnome Chemistry Utils by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
</html>