Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > bad97183153701b09df5fae1052b1c30 > files > 1162

crystalspace-doc-1.2.1-5mdv2010.0.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>Crystal Space 1.2.1: csVector3Array Class Reference (Crystal Space 1.2.1 Public API Reference)</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="head">
 <tr height="59">
  <td class="head" width="202" valign="bottom" style="padding-left:0;"><a href="http://www.crystalspace3d.org/"><img src="csblur.png" width="236" height="59" alt="CrystalSpace" border="0"></a></td>
  <td class="head"><h2>Public API Reference</h2></td>
 </tr>
 <tr height="11">
  <td colspan="2" class="headshadow" valign="top" style="padding-left:0;"><img src="csblurb.png" width="236" height="11" alt="" border="0"></td>
 </tr>
</table>
<div class="content">
<!-- Generated by Doxygen 1.5.3 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
    <li class="current"><a href="classes.html"><span>Classes</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul>
</div>
<div class="tabs">
  <ul>
    <li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
    <li><a href="annotated.html"><span>Class&nbsp;List</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>
<h1>csVector3Array Class Reference<br>
<small>
[<a class="el" href="group__geom__utils.html">Geometry utilities</a>]</small>
</h1><!-- doxytag: class="csVector3Array" --><!-- doxytag: inherits="csPoly3D" -->This is actually the same class as <a class="el" href="classcsPoly3D.html" title="The following class represents a general 3D polygon.">csPoly3D</a>.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="poly3d_8h-source.html">csgeom/poly3d.h</a>&gt;</code>
<p>
<div class="dynheader">
Inheritance diagram for csVector3Array:</div>
<div class="dynsection">
<p><center><img src="classcsVector3Array__inherit__graph.png" border="0" usemap="#csVector3Array__inherit__map" alt="Inheritance graph"></center>
<map name="csVector3Array__inherit__map">
<area shape="rect" href="classcsPoly3D.html" title="The following class represents a general 3D polygon." alt="" coords="25,7,105,33"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>

<p>
<a href="classcsVector3Array-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">size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsVector3Array.html#5ab909b1e3e2a8d137d215138e9da4e4">AddVertexSmart</a> (float x, float y, float z)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add a vertex but first check if it isn't already present in the array.  <a href="#5ab909b1e3e2a8d137d215138e9da4e4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsVector3Array.html#f99afaa87a3a56fb079dd18d156167bf">AddVertexSmart</a> (const <a class="el" href="classcsVector3.html">csVector3</a> &amp;v)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add a vertex but first check if it isn't already present in the array.  <a href="#f99afaa87a3a56fb079dd18d156167bf"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6620a9debf30dc21e1b6799981d94281"></a><!-- doxytag: member="csVector3Array::csVector3Array" ref="6620a9debf30dc21e1b6799981d94281" args="(size_t start_size=10)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsVector3Array.html#6620a9debf30dc21e1b6799981d94281">csVector3Array</a> (size_t start_size=10)</td></tr>

<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="structcsCompressVertex.html">csCompressVertex</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsVector3Array.html#b852f84f399e943da4ce277dfc6e7333">CompressVertices</a> (<a class="el" href="classcsArray.html">csArray</a>&lt; <a class="el" href="classcsVector3.html">csVector3</a> &gt; &amp;<a class="el" href="classcsPoly3D.html#d32a70d5d3e92f3cd67b5c63a6d317bd">vertices</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compress an array of vertices (i.e.  <a href="#b852f84f399e943da4ce277dfc6e7333"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="structcsCompressVertex.html">csCompressVertex</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsVector3Array.html#7d2bc04a153d216e452a5603434f0edb">CompressVertices</a> (<a class="el" href="classcsVector3.html">csVector3</a> *<a class="el" href="classcsPoly3D.html#d32a70d5d3e92f3cd67b5c63a6d317bd">vertices</a>, size_t num_vertices, <a class="el" href="classcsVector3.html">csVector3</a> *&amp;new_vertices, size_t &amp;new_count)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compress an array of vertices (i.e.  <a href="#7d2bc04a153d216e452a5603434f0edb"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
This is actually the same class as <a class="el" href="classcsPoly3D.html" title="The following class represents a general 3D polygon.">csPoly3D</a>. 
<p>
But it has been renamed to make it clear that it is for other uses. It also adds some functionality specific to that use. In particular this class is more used to hold an unordered collection of 3D vectors. 
<p>Definition at line <a class="el" href="poly3d_8h-source.html#l00365">365</a> of file <a class="el" href="poly3d_8h-source.html">poly3d.h</a>.</p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="5ab909b1e3e2a8d137d215138e9da4e4"></a><!-- doxytag: member="csVector3Array::AddVertexSmart" ref="5ab909b1e3e2a8d137d215138e9da4e4" args="(float x, float y, float z)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t csVector3Array::AddVertexSmart           </td>
          <td>(</td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>z</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Add a vertex but first check if it isn't already present in the array. 
<p>
Return the index that the vertex was added too. 
</div>
</div><p>
<a class="anchor" name="f99afaa87a3a56fb079dd18d156167bf"></a><!-- doxytag: member="csVector3Array::AddVertexSmart" ref="f99afaa87a3a56fb079dd18d156167bf" args="(const csVector3 &amp;v)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t csVector3Array::AddVertexSmart           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classcsVector3.html">csVector3</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>v</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Add a vertex but first check if it isn't already present in the array. 
<p>
Return the index that the vertex was added too. 
<p>Definition at line <a class="el" href="poly3d_8h-source.html#l00374">374</a> of file <a class="el" href="poly3d_8h-source.html">poly3d.h</a>.</p>

<p>References <a class="el" href="vector3_8h-source.html#l00067">csVector3::x</a>, <a class="el" href="vector3_8h-source.html#l00069">csVector3::y</a>, and <a class="el" href="vector3_8h-source.html#l00071">csVector3::z</a>.</p>

</div>
</div><p>
<a class="anchor" name="b852f84f399e943da4ce277dfc6e7333"></a><!-- doxytag: member="csVector3Array::CompressVertices" ref="b852f84f399e943da4ce277dfc6e7333" args="(csArray&lt; csVector3 &gt; &amp;vertices)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="structcsCompressVertex.html">csCompressVertex</a>* csVector3Array::CompressVertices           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classcsArray.html">csArray</a>&lt; <a class="el" href="classcsVector3.html">csVector3</a> &gt; &amp;&nbsp;</td>
          <td class="paramname"> <em>vertices</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Compress an array of vertices (i.e. 
<p>
remove all duplicated vertices). Returns an array of <a class="el" href="structcsCompressVertex.html" title="This structure is used by csVector3Array::CompressVertices().">csCompressVertex</a> which can be used to map from the old index to the new one. The 'vertices' table will be modified with the new compressed vertices. If this function returns 0 there is nothing to do (i.e. no duplicate vertices). Otherwise you have to 'delete[]' the returned array. 
</div>
</div><p>
<a class="anchor" name="7d2bc04a153d216e452a5603434f0edb"></a><!-- doxytag: member="csVector3Array::CompressVertices" ref="7d2bc04a153d216e452a5603434f0edb" args="(csVector3 *vertices, size_t num_vertices, csVector3 *&amp;new_vertices, size_t &amp;new_count)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="structcsCompressVertex.html">csCompressVertex</a>* csVector3Array::CompressVertices           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classcsVector3.html">csVector3</a> *&nbsp;</td>
          <td class="paramname"> <em>vertices</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>num_vertices</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classcsVector3.html">csVector3</a> *&amp;&nbsp;</td>
          <td class="paramname"> <em>new_vertices</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t &amp;&nbsp;</td>
          <td class="paramname"> <em>new_count</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Compress an array of vertices (i.e. 
<p>
remove all duplicated vertices). Returns an array of <a class="el" href="structcsCompressVertex.html" title="This structure is used by csVector3Array::CompressVertices().">csCompressVertex</a> which can be used to map from the old index to the new one. 'new_count' will be set to the new number of unique vertices (and 'new_vertices' will be the new vertex table with that size). The size of the returned array is 'num_vertices' though since it has to be indexed with the original vertex array. If this function returns 0 there is nothing to do (i.e. no duplicate vertices). Otherwise you have to 'delete[]' the returned array. 
</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li>csgeom/<a class="el" href="poly3d_8h-source.html">poly3d.h</a></ul>
<hr size="1"><address><small>Generated for Crystal Space 1.2.1 by 
<a href="http://www.doxygen.org/index.html">doxygen</a> 1.5.3 
</small></address> </div></body> </html>