diff options
Diffstat (limited to '')
-rw-r--r-- | docs/doxygen/nel/a02709.html | 356 |
1 files changed, 356 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a02709.html b/docs/doxygen/nel/a02709.html new file mode 100644 index 00000000..44c893bb --- /dev/null +++ b/docs/doxygen/nel/a02709.html @@ -0,0 +1,356 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> +<title>NeL: NL3D::CLandscapeFaceVectorManager class Reference</title> +<link href="doxygen.css" rel="stylesheet" type="text/css"> +</head><body> +<!-- Generated by Doxygen 1.3.6 --> +<div class="qindex"> <form class="search" action="search.php" method="get"> +<a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a> | <span class="search"><u>S</u>earch for <input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div> +<h1>NL3D::CLandscapeFaceVectorManager Class Reference</h1><code>#include <<a class="el" href="a05869.html">landscape_face_vector_manager.h</a>></code> +<p> +<hr><a name="_details"></a><h2>Detailed Description</h2> +Fast Allocate blocks of faces, according to the size of the block. <dl compact><dt><b>Author:</b></dt><dd>Lionel Berenguier <p> +Nevrax France </dd></dl> +<dl compact><dt><b>Date:</b></dt><dd>2001 </dd></dl> + +<p> + +<p> +Definition at line <a class="el" href="a05869.html#l00044">44</a> of file <a class="el" href="a05869.html">landscape_face_vector_manager.h</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> </td><td class="memItemRight" valign=bottom><a class="el" href="a02709.html#NL3D_1_1CLandscapeFaceVectorManagera0">CLandscapeFaceVectorManager</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="#NL3D_1_1CLandscapeFaceVectorManagera0"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a11">uint32</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a02709.html#NL3D_1_1CLandscapeFaceVectorManagera1">createFaceVector</a> (<a class="el" href="a04558.html#a15">uint</a> numTri)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02709.html#NL3D_1_1CLandscapeFaceVectorManagera2">deleteFaceVector</a> (<a class="el" href="a04558.html#a11">uint32</a> *fv)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">delete a faceVector. NB: no check. <a href="#NL3D_1_1CLandscapeFaceVectorManagera2"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02709.html#NL3D_1_1CLandscapeFaceVectorManagera3">purge</a> ()</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="a02709.html#NL3D_1_1CLandscapeFaceVectorManagera4">~CLandscapeFaceVectorManager</a> ()</td></tr> + +<tr><td colspan=2><br><h2>Private Member Functions</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02709.html#NL3D_1_1CLandscapeFaceVectorManagerd0">getBlockIdFromNumTri</a> (<a class="el" href="a04558.html#a15">uint</a> numTris)</td></tr> + +<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector< <a class="el" href="a04558.html#a11">uint32</a> * > </td><td class="memItemRight" valign=bottom><a class="el" href="a02709.html#NL3D_1_1CLandscapeFaceVectorManagerr0">_Blocks</a></td></tr> + +</table> +<hr><h2>Constructor & Destructor Documentation</h2> +<a class="anchor" name="NL3D_1_1CLandscapeFaceVectorManagera0" doxytag="NL3D::CLandscapeFaceVectorManager::CLandscapeFaceVectorManager" ></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"> NL3D::CLandscapeFaceVectorManager::CLandscapeFaceVectorManager </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Constructor. +<p> + +<p> +Definition at line <a class="el" href="a05868.html#l00045">45</a> of file <a class="el" href="a05868.html">landscape_face_vector_manager.cpp</a>. +<p> +References <a class="el" href="a05869.html#l00065">_Blocks</a>, and <a class="el" href="a05868.html#l00041">NL3D_FACE_VECTOR_NUMBLOCK</a>. +<p> +<div class="fragment"><pre>00046 { +00047 <span class="comment">// Allow 2^32 triangles at max. each list i has at max 2^i triangles.</span> +00048 <a class="code" href="a02709.html#NL3D_1_1CLandscapeFaceVectorManagerr0">_Blocks</a>.resize(NL3D_FACE_VECTOR_NUMBLOCK, NULL); +00049 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CLandscapeFaceVectorManagera4" doxytag="NL3D::CLandscapeFaceVectorManager::~CLandscapeFaceVectorManager" ></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"> NL3D::CLandscapeFaceVectorManager::~<a class="el" href="a02709.html">CLandscapeFaceVectorManager</a> </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05868.html#l00052">52</a> of file <a class="el" href="a05868.html">landscape_face_vector_manager.cpp</a>. +<p> +References <a class="el" href="a05868.html#l00058">purge()</a>. +<p> +<div class="fragment"><pre>00053 { +00054 <a class="code" href="a02709.html#NL3D_1_1CLandscapeFaceVectorManagera3">purge</a>(); +00055 } +</pre></div> </td> + </tr> +</table> +<hr><h2>Member Function Documentation</h2> +<a class="anchor" name="NL3D_1_1CLandscapeFaceVectorManagera1" doxytag="NL3D::CLandscapeFaceVectorManager::createFaceVector" ></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="a04558.html#a11">uint32</a> * NL3D::CLandscapeFaceVectorManager::createFaceVector </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname1" valign="top" nowrap> <em>numTri</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +return an Array of Tris with this Format: NumTris, index0, index1, index2.... NB: NumTris really means number of triangles, not number of indexes (which is 3*)! +<p> +Definition at line <a class="el" href="a05868.html#l00083">83</a> of file <a class="el" href="a05868.html">landscape_face_vector_manager.cpp</a>. +<p> +References <a class="el" href="a05869.html#l00065">_Blocks</a>, <a class="el" href="a05868.html#l00077">getBlockIdFromNumTri()</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05981.html#l00100">uint32</a>. +<p> +Referenced by <a class="el" href="a06491.html#l00198">NL3D::CTessBlock::createFaceVectorFar0()</a>, <a class="el" href="a06491.html#l00242">NL3D::CTessBlock::createFaceVectorFar1()</a>, and <a class="el" href="a06491.html#l00302">NL3D::CTessBlock::createFaceVectorTile()</a>. +<p> +<div class="fragment"><pre>00084 { +00085 <span class="comment">// get the BlockId from the number of tri in this fv</span> +00086 <a class="code" href="a04558.html#a15">uint</a> blockId= <a class="code" href="a02709.html#NL3D_1_1CLandscapeFaceVectorManagerd0">getBlockIdFromNumTri</a>(numTri); +00087 +00088 <span class="comment">// If no more free FaceVector, allocate.</span> +00089 <span class="keywordflow">if</span>(<a class="code" href="a02709.html#NL3D_1_1CLandscapeFaceVectorManagerr0">_Blocks</a>[blockId]==NULL) +00090 { +00091 <span class="comment">// Allocate a block of max tris. +1 is for the NumTris entry at index 0.</span> +00092 <a class="code" href="a04558.html#a15">uint</a> numTriMax= 1<<blockId; +00093 <span class="comment">// allocate max of (sizeof(uint32*), (numTriMax*3+1)*sizeof(uint32));</span> +00094 <a class="code" href="a04558.html#a15">uint</a> sizeInByteToAllocate= max(<span class="keyword">sizeof</span>(<a class="code" href="a04558.html#a11">uint32</a>*), (numTriMax*3+1)*<span class="keyword">sizeof</span>(uint32)); +00095 <a class="code" href="a02709.html#NL3D_1_1CLandscapeFaceVectorManagerr0">_Blocks</a>[blockId]= <span class="keyword">new</span> <a class="code" href="a04558.html#a11">uint32</a>[sizeInByteToAllocate/4]; +00096 <span class="comment">// Init it as a free faceVector, with no Next.</span> +00097 *(<a class="code" href="a04558.html#a11">uint32</a>**)<a class="code" href="a02709.html#NL3D_1_1CLandscapeFaceVectorManagerr0">_Blocks</a>[blockId]= NULL; +00098 } +00099 +00100 <span class="comment">// Pop a FaceVector from the free list.</span> +00101 <a class="code" href="a04558.html#a11">uint32</a> *ret= <a class="code" href="a02709.html#NL3D_1_1CLandscapeFaceVectorManagerr0">_Blocks</a>[blockId]; +00102 <span class="comment">// Make the head list point to next</span> +00103 _Blocks[blockId]= *(<a class="code" href="a04558.html#a11">uint32</a>**)ret; +00104 +00105 <span class="comment">// There is numTri triangles.</span> +00106 *ret= numTri; +00107 +00108 <span class="keywordflow">return</span> ret; +00109 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CLandscapeFaceVectorManagera2" doxytag="NL3D::CLandscapeFaceVectorManager::deleteFaceVector" ></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 NL3D::CLandscapeFaceVectorManager::deleteFaceVector </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a11">uint32</a> * </td> + <td class="mdname1" valign="top" nowrap> <em>fv</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +delete a faceVector. NB: no check. +<p> + +<p> +Definition at line <a class="el" href="a05868.html#l00112">112</a> of file <a class="el" href="a05868.html">landscape_face_vector_manager.cpp</a>. +<p> +References <a class="el" href="a05869.html#l00065">_Blocks</a>, <a class="el" href="a05868.html#l00077">getBlockIdFromNumTri()</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05981.html#l00100">uint32</a>. +<p> +Referenced by <a class="el" href="a06491.html#l00213">NL3D::CTessBlock::deleteFaceVectorFar0()</a>, <a class="el" href="a06491.html#l00256">NL3D::CTessBlock::deleteFaceVectorFar1()</a>, and <a class="el" href="a06491.html#l00329">NL3D::CTessBlock::deleteFaceVectorTile()</a>. +<p> +<div class="fragment"><pre>00113 { +00114 <span class="comment">// get the BlockId from the number of tri in this fv (ie *fv)</span> +00115 <a class="code" href="a04558.html#a15">uint</a> blockId= <a class="code" href="a02709.html#NL3D_1_1CLandscapeFaceVectorManagerd0">getBlockIdFromNumTri</a>(*fv); +00116 +00117 <span class="comment">// Append this block to the free list. Write the ptr directly on fv.</span> +00118 *(<a class="code" href="a04558.html#a11">uint32</a>**)fv= <a class="code" href="a02709.html#NL3D_1_1CLandscapeFaceVectorManagerr0">_Blocks</a>[blockId]; +00119 _Blocks[blockId]= fv; +00120 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CLandscapeFaceVectorManagerd0" doxytag="NL3D::CLandscapeFaceVectorManager::getBlockIdFromNumTri" ></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="a04558.html#a15">uint</a> NL3D::CLandscapeFaceVectorManager::getBlockIdFromNumTri </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname1" valign="top" nowrap> <em>numTris</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [private]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05868.html#l00077">77</a> of file <a class="el" href="a05868.html">landscape_face_vector_manager.cpp</a>. +<p> +References <a class="el" href="a05586.html#l00358">NLMISC::getPowerOf2()</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +Referenced by <a class="el" href="a05868.html#l00083">createFaceVector()</a>, and <a class="el" href="a05868.html#l00112">deleteFaceVector()</a>. +<p> +<div class="fragment"><pre>00078 { +00079 <span class="keywordflow">return</span> <a class="code" href="a05378.html#a263">getPowerOf2</a>(numTris); +00080 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CLandscapeFaceVectorManagera3" doxytag="NL3D::CLandscapeFaceVectorManager::purge" ></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 NL3D::CLandscapeFaceVectorManager::purge </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05868.html#l00058">58</a> of file <a class="el" href="a05868.html">landscape_face_vector_manager.cpp</a>. +<p> +References <a class="el" href="a05869.html#l00065">_Blocks</a>, <a class="el" href="a05868.html#l00041">NL3D_FACE_VECTOR_NUMBLOCK</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05981.html#l00100">uint32</a>. +<p> +Referenced by <a class="el" href="a05868.html#l00052">~CLandscapeFaceVectorManager()</a>. +<p> +<div class="fragment"><pre>00059 { +00060 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0; i<<a class="code" href="a04445.html#a0">NL3D_FACE_VECTOR_NUMBLOCK</a>; i++) +00061 { +00062 <a class="code" href="a04558.html#a11">uint32</a> *ptr= <a class="code" href="a02709.html#NL3D_1_1CLandscapeFaceVectorManagerr0">_Blocks</a>[i]; +00063 <span class="comment">// For each node in list, delete.</span> +00064 <span class="keywordflow">while</span>(ptr) +00065 { +00066 <span class="comment">// Get the ptr on next free list.</span> +00067 <a class="code" href="a04558.html#a11">uint32</a> *next= *(<a class="code" href="a04558.html#a11">uint32</a>**)ptr; +00068 <span class="keyword">delete</span> [] ptr; +00069 ptr= next; +00070 } +00071 <span class="comment">// list is empty.</span> +00072 _Blocks[i]= NULL; +00073 } +00074 } +</pre></div> </td> + </tr> +</table> +<hr><h2>Field Documentation</h2> +<a class="anchor" name="NL3D_1_1CLandscapeFaceVectorManagerr0" doxytag="NL3D::CLandscapeFaceVectorManager::_Blocks" ></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"> std::vector<<a class="el" href="a04558.html#a11">uint32</a>*> <a class="el" href="a02709.html#NL3D_1_1CLandscapeFaceVectorManagerr0">NL3D::CLandscapeFaceVectorManager::_Blocks</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05869.html#l00065">65</a> of file <a class="el" href="a05869.html">landscape_face_vector_manager.h</a>. +<p> +Referenced by <a class="el" href="a05868.html#l00045">CLandscapeFaceVectorManager()</a>, <a class="el" href="a05868.html#l00083">createFaceVector()</a>, <a class="el" href="a05868.html#l00112">deleteFaceVector()</a>, and <a class="el" href="a05868.html#l00058">purge()</a>. </td> + </tr> +</table> +<hr>The documentation for this class was generated from the following files:<ul> +<li><a class="el" href="a05869.html">landscape_face_vector_manager.h</a><li><a class="el" href="a05868.html">landscape_face_vector_manager.cpp</a></ul> +<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 06:48:38 2004 for NeL by +<a href="http://www.doxygen.org/index.html"> +<img src="doxygen.png" alt="doxygen" align="middle" border=0 > +</a>1.3.6 </small></address> +</body> +</html> |