diff options
Diffstat (limited to 'docs/doxygen/nel/src_23d_2zone_8h-source.html')
-rw-r--r-- | docs/doxygen/nel/src_23d_2zone_8h-source.html | 413 |
1 files changed, 413 insertions, 0 deletions
diff --git a/docs/doxygen/nel/src_23d_2zone_8h-source.html b/docs/doxygen/nel/src_23d_2zone_8h-source.html new file mode 100644 index 00000000..f2a4db6f --- /dev/null +++ b/docs/doxygen/nel/src_23d_2zone_8h-source.html @@ -0,0 +1,413 @@ +<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> +<HTML> +<HEAD> + <TITLE>nevrax.org : docs</TITLE> + <LINK REL=stylesheet TYPE="text/css" HREF="http://www.nevrax.org/inc/css/nevrax.css"> + <link href="doxygen.css" rel="stylesheet" type="text/css"> +</HEAD> +<BODY MARGINHEIGHT="0" MARGINWIDTH="0"> + +<!-- uplinks --> +<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0> + <TR> + <TD WIDTH=16><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD> + <TD WIDTH=140 BGCOLOR=#dddddd><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="140" HEIGHT="16" BORDER=0 ALT=""></TD> + <TD WIDTH=16><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD> + <TD><IMG width=6 height=14 SRC="http://www.nevrax.org/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle> <A CLASS=uplinks HREF=http://www.nevrax.org><b>Home</B></FONT></A> </TD> + <TD><IMG width=6 height=14 SRC="http://www.nevrax.org/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle> <A CLASS=uplinks HREF=http://www.nevrax.com><b>nevrax.com</B></FONT></A> </TD> + </TR> +</TABLE> + +<!-- banner Nevrax --> +<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 WIDTH=100%> + <TR><TD BGCOLOR="#000000" BACKGROUND="http://www.nevrax.org/inc/img/black_banner.jpg"><A HREF="http://www.nevrax.org"><IMG SRC="http://www.nevrax.org/inc/img/nevrax.gif" WIDTH="170" HEIGHT="45" BORDER=0 ALT="Nevrax" ></A></TD></TR> +</TABLE> + +<!-- main table --> +<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 height=100%> + <TR> + <TD WIDTH=16><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="10" BORDER=0 ALT=""></TD> + <TD WIDTH=140 BGCOLOR=#dddddd VALIGN=TOP ALIGN=middle><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT=""> + + <!------ Begin Box ------> + <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR=black><TR><TD><TABLE border=0 cellspacing=2 cellpadding=0 width=120><tr><TD ALIGN=middle bgcolor=black> + <FONT COLOR=white FACE="sans-serif"><B>Nevrax.org</B></FONT></TD></TR><tr><td colspan=2 bgcolor=#FFFFFF> + <TABLE cellspacing=0 cellpadding=1 border=0> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/news/" TITLE="Rubrique news"><img width=13 height=15 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-news.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/news/" TITLE="News">News</a></td></tr> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/mail/" TITLE="Rubrique mail"><img width=15 height=11 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-mail.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/mail/" TITLE="Mailing list archive">Mailing-list</a></td></tr> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/docs/" TITLE="Rubrique docs"><img width=14 height=16 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-docs.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/docs/" TITLE="Documentation">Documentation</a></td></tr> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/cvs/" TITLE="Rubrique cvs"><img width=13 height=17 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-cvs.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/cvs/" TITLE="CVS Web">CVS</a></td></tr> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/bugs/" TITLE="Rubrique bugs"><img width=20 height=16 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-bugs.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/bugs/" TITLE="Bugtracking">Bugs</a></td></tr> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/GPL.php3" TITLE="Rubrique license"><img width=18 height=12 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-gpl.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/GPL.php3" TITLE="License">License</a></td></tr> + </TABLE> + </TD></TR></TABLE></TD></TR></TABLE> + <!------ End Box ------> + + </TD> + <TD WIDTH=15><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD> + <TD ALIGN=left valign=top><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT=""> + +<!-- title --> +<TABLE background="http://www.nevrax.org/inc/img/redline.gif" CELLSPACING=0 CELLPADDING=0 BORDER=0 width=100%><tr><td> +<A HREF="http://www.nevrax.org/docs/"><img src="http://www.nevrax.org/inc/img/t_docs.gif" ALT="Docs" HEIGHT=20 BORDER=0></A> +</td><td><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="1" HEIGHT="1" BORDER=0 ALT=""> +</td></tr></table> + + +<!-- block --> +<TABLE bgcolor="#dddddd" CELLSPACING=0 CELLPADDING=0 BORDER=0 width=100%><tr><td width=1% valign=middle><img width=6 height=14 hspace=2 vspace=2 src="http://www.nevrax.org/inc/img/reddots.gif"></TD> + <TD><B>Documentation</B></TD> + <TD ALIGN=RIGHT> </td> +</tr></table> +<!-- Generated by Doxygen 1.2.14 --> +<center> +<a class="qindex" href="index.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">Compound List</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">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> <a class="qindex" href="pages.html">Related Pages</a> <a class="qindexRef" doxygen="_cgi:http://www.nevrax.org/cgi-bin/nel-search.cgi" href="http://www.nevrax.org/cgi-bin/nel-search.cgi">Search</a> </center> +<hr><h1>zone.h</h1><a href="src_23d_2zone_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 +00007 <font class="comment">/* Copyright, 2000 Nevrax Ltd.</font> +00008 <font class="comment"> *</font> +00009 <font class="comment"> * This file is part of NEVRAX NEL.</font> +00010 <font class="comment"> * NEVRAX NEL is free software; you can redistribute it and/or modify</font> +00011 <font class="comment"> * it under the terms of the GNU General Public License as published by</font> +00012 <font class="comment"> * the Free Software Foundation; either version 2, or (at your option)</font> +00013 <font class="comment"> * any later version.</font> +00014 <font class="comment"></font> +00015 <font class="comment"> * NEVRAX NEL is distributed in the hope that it will be useful, but</font> +00016 <font class="comment"> * WITHOUT ANY WARRANTY; without even the implied warranty of</font> +00017 <font class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</font> +00018 <font class="comment"> * General Public License for more details.</font> +00019 <font class="comment"></font> +00020 <font class="comment"> * You should have received a copy of the GNU General Public License</font> +00021 <font class="comment"> * along with NEVRAX NEL; see the file COPYING. If not, write to the</font> +00022 <font class="comment"> * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,</font> +00023 <font class="comment"> * MA 02111-1307, USA.</font> +00024 <font class="comment"> */</font> +00025 +00026 <font class="preprocessor">#ifndef NL_ZONE_H</font> +00027 <font class="preprocessor"></font><font class="preprocessor">#define NL_ZONE_H</font> +00028 <font class="preprocessor"></font> +00029 <font class="preprocessor">#include "<a class="code" href="types__nl_8h.html">nel/misc/types_nl.h</a>"</font> +00030 <font class="preprocessor">#include "<a class="code" href="smart__ptr_8h.html">nel/misc/smart_ptr.h</a>"</font> +00031 <font class="preprocessor">#include "<a class="code" href="stream_8h.html">nel/misc/stream.h</a>"</font> +00032 <font class="preprocessor">#include "<a class="code" href="debug_8h.html">nel/misc/debug.h</a>"</font> +00033 <font class="preprocessor">#include "<a class="code" href="tessellation_8h.html">3d/tessellation.h</a>"</font> +00034 <font class="preprocessor">#include "<a class="code" href="patch_8h.html">3d/patch.h</a>"</font> +00035 <font class="preprocessor">#include "<a class="code" href="bezier__patch_8h.html">3d/bezier_patch.h</a>"</font> +00036 <font class="preprocessor">#include "<a class="code" href="point__light__named_8h.html">3d/point_light_named.h</a>"</font> +00037 <font class="preprocessor">#include "<a class="code" href="point__light__named__array_8h.html">3d/point_light_named_array.h</a>"</font> +00038 <font class="preprocessor">#include <stdio.h></font> +00039 <font class="preprocessor">#include <vector></font> +00040 <font class="preprocessor">#include <map></font> +00041 +00042 +00043 <font class="keyword">namespace </font>NL3D +00044 { +00045 +00046 +00047 <font class="keyword">class </font>CZone; +00048 <font class="keyword">class </font>CLandscape; +00049 +00050 <font class="keyword">using</font> <a class="code" href="classNLMISC_1_1CAABBoxExt.html">NLMISC::CAABBoxExt</a>; +00051 +00052 +00053 <font class="comment">// ***************************************************************************</font> +00054 <font class="keyword">typedef</font> std::map<uint16, CZone*> <a class="code" href="namespaceNL3D.html#a303">TZoneMap</a>; +00055 <font class="keyword">typedef</font> std::map<uint16, CZone*>::iterator <a class="code" href="namespaceNL3D.html#a304">ItZoneMap</a>; +00056 +00057 +00058 <font class="comment">// ***************************************************************************</font> +<a name="l00062"></a><a class="code" href="structNL3D_1_1CBorderVertex.html">00062</a> <font class="comment"></font><font class="keyword">struct </font>CBorderVertex +00063 { +00064 <font class="comment">// The index of vertex in the current zone to bind.</font> +<a name="l00065"></a><a class="code" href="structNL3D_1_1CBorderVertex.html#m0">00065</a> <a class="code" href="types__nl_8h.html#a7">uint16</a> <a class="code" href="structNL3D_1_1CBorderVertex.html#m0">CurrentVertex</a>; +00066 <font class="comment">// The neighbor zone Id.</font> +<a name="l00067"></a><a class="code" href="structNL3D_1_1CBorderVertex.html#m1">00067</a> <a class="code" href="types__nl_8h.html#a7">uint16</a> <a class="code" href="structNL3D_1_1CBorderVertex.html#m1">NeighborZoneId</a>; +00068 <font class="comment">// The index of vertex in the neighbor zone to bind to CurrentVertex.</font> +<a name="l00069"></a><a class="code" href="structNL3D_1_1CBorderVertex.html#m2">00069</a> <a class="code" href="types__nl_8h.html#a7">uint16</a> <a class="code" href="structNL3D_1_1CBorderVertex.html#m2">NeighborVertex</a>; +00070 +00071 <font class="keywordtype">void</font> <a class="code" href="structNL3D_1_1CBorderVertex.html#a0">serial</a>(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &f); +00072 }; +00073 +00074 +00075 <font class="comment">// ***************************************************************************</font> +<a name="l00083"></a><a class="code" href="structNL3D_1_1CPatchInfo.html">00083</a> <font class="comment"></font><font class="keyword">struct </font>CPatchInfo +00084 { +00085 <font class="keyword">public</font>: +00086 +<a name="l00092"></a><a class="code" href="structNL3D_1_1CPatchInfo_1_1CBindInfo.html">00092</a> <font class="keyword">struct </font>CBindInfo +00093 { +<a name="l00098"></a><a class="code" href="structNL3D_1_1CPatchInfo_1_1CBindInfo.html#m0">00098</a> <a class="code" href="types__nl_8h.html#a5">uint8</a> <a class="code" href="structNL3D_1_1CPatchInfo_1_1CBindInfo.html#m0">NPatchs</a>; +00099 +<a name="l00101"></a><a class="code" href="structNL3D_1_1CPatchInfo_1_1CBindInfo.html#m1">00101</a> <a class="code" href="types__nl_8h.html#a7">uint16</a> <a class="code" href="structNL3D_1_1CPatchInfo_1_1CBindInfo.html#m1">ZoneId</a>; +<a name="l00103"></a><a class="code" href="structNL3D_1_1CPatchInfo_1_1CBindInfo.html#m2">00103</a> <a class="code" href="types__nl_8h.html#a7">uint16</a> <a class="code" href="structNL3D_1_1CPatchInfo_1_1CBindInfo.html#m2">Next</a>[4]; +<a name="l00105"></a><a class="code" href="structNL3D_1_1CPatchInfo_1_1CBindInfo.html#m3">00105</a> <a class="code" href="types__nl_8h.html#a5">uint8</a> <a class="code" href="structNL3D_1_1CPatchInfo_1_1CBindInfo.html#m3">Edge</a>[4]; +00106 +00107 <font class="keyword">public</font>: +00108 <font class="keywordtype">void</font> <a class="code" href="structNL3D_1_1CPatchInfo_1_1CBindInfo.html#a0">serial</a>(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &f); +<a name="l00109"></a><a class="code" href="structNL3D_1_1CPatchInfo_1_1CBindInfo.html#a1">00109</a> <a class="code" href="structNL3D_1_1CPatchInfo_1_1CBindInfo.html#a1">CBindInfo</a>() {<a class="code" href="structNL3D_1_1CPatchInfo_1_1CBindInfo.html#m0">NPatchs</a>=0;} +00110 }; +00111 +00112 +00113 <font class="keyword">public</font>: +00115 <font class="comment">// @{</font> +<a name="l00117"></a><a class="code" href="structNL3D_1_1CPatchInfo.html#z836_2">00117</a> <font class="comment"> CBezierPatch Patch;</font> +<a name="l00119"></a><a class="code" href="structNL3D_1_1CPatchInfo.html#z836_4">00119</a> <font class="comment"> uint8 OrderS, OrderT;</font> +<a name="l00121"></a><a class="code" href="structNL3D_1_1CPatchInfo.html#z836_5">00121</a> <font class="comment"> float ErrorSize;</font> +<a name="l00123"></a><a class="code" href="structNL3D_1_1CPatchInfo.html#z836_6">00123</a> <font class="comment"> uint16 BaseVertices[4];</font> +00124 +<a name="l00127"></a><a class="code" href="structNL3D_1_1CPatchInfo.html#z836_7">00127</a> <a class="code" href="types__nl_8h.html#a5">uint8</a> <a class="code" href="structNL3D_1_1CPatchInfo.html#z836_7">Flags</a>; +00128 +00129 +<a name="l00131"></a><a class="code" href="structNL3D_1_1CPatchInfo.html#z836_8">00131</a> <a class="code" href="types__nl_8h.html#a5">uint8</a> <a class="code" href="structNL3D_1_1CPatchInfo.html#z836_8">NoiseRotation</a>; +00132 +00134 <font class="keywordtype">void</font> <a class="code" href="structNL3D_1_1CPatchInfo.html#z836_0">setCornerSmoothFlag</a>(<a class="code" href="types__nl_8h.html#a13">uint</a> corner, <font class="keywordtype">bool</font> smooth); +00135 <font class="keywordtype">bool</font> <a class="code" href="structNL3D_1_1CPatchInfo.html#z836_1">getCornerSmoothFlag</a>(<a class="code" href="types__nl_8h.html#a13">uint</a> corner) <font class="keyword">const</font>; +00136 +00137 <font class="comment">// @}</font> +00138 +00139 +00141 <font class="comment">// @{</font> +00142 +<a name="l00146"></a><a class="code" href="structNL3D_1_1CPatchInfo.html#z837_0">00146</a> std::vector<CTileElement> <a class="code" href="structNL3D_1_1CPatchInfo.html#z837_0">Tiles</a>; +00147 +<a name="l00152"></a><a class="code" href="structNL3D_1_1CPatchInfo.html#z837_1">00152</a> std::vector<CTileColor> <a class="code" href="structNL3D_1_1CPatchInfo.html#z837_1">TileColors</a>; +00153 +<a name="l00158"></a><a class="code" href="structNL3D_1_1CPatchInfo.html#z837_2">00158</a> std::vector<uint8> <a class="code" href="structNL3D_1_1CPatchInfo.html#z837_2">Lumels</a>; +00159 +<a name="l00168"></a><a class="code" href="structNL3D_1_1CPatchInfo.html#z837_3">00168</a> std::vector<CTileLightInfluence> <a class="code" href="structNL3D_1_1CPatchInfo.html#z837_3">TileLightInfluences</a>; +00169 +00170 <font class="comment">// @}</font> +00171 +00173 +<a name="l00177"></a><a class="code" href="structNL3D_1_1CPatchInfo.html#a0">00177</a> <font class="keywordtype">void</font> <a class="code" href="structNL3D_1_1CPatchInfo.html#a0">setSmoothFlag</a> (<a class="code" href="types__nl_8h.html#a13">uint</a> edge, <font class="keywordtype">bool</font> flag) +00178 { +00179 <font class="comment">// Erase it</font> +00180 <a class="code" href="structNL3D_1_1CPatchInfo.html#z836_7">Flags</a>&=~(1<<edge); +00181 +00182 <font class="comment">// Set it</font> +00183 <a class="code" href="structNL3D_1_1CPatchInfo.html#z836_7">Flags</a>|=(((uint)flag)<<edge); +00184 } +00185 +<a name="l00189"></a><a class="code" href="structNL3D_1_1CPatchInfo.html#a1">00189</a> <font class="keywordtype">bool</font> <a class="code" href="structNL3D_1_1CPatchInfo.html#a1">getSmoothFlag</a> (<a class="code" href="types__nl_8h.html#a13">uint</a> edge) +00190 { +00191 <font class="comment">// Test it</font> +00192 <font class="keywordflow">return</font> ((<a class="code" href="structNL3D_1_1CPatchInfo.html#z836_7">Flags</a>&(1<<edge))!=0); +00193 } +00194 +00196 <font class="comment">// @{</font> +<a name="l00197"></a><a class="code" href="structNL3D_1_1CPatchInfo.html#z838_0">00197</a> CBindInfo <a class="code" href="structNL3D_1_1CPatchInfo.html#z838_0">BindEdges</a>[4]; +00198 <font class="comment">// @}</font> +00199 +00200 +00201 <font class="keyword">public</font>: +<a name="l00202"></a><a class="code" href="structNL3D_1_1CPatchInfo.html#a2">00202</a> <a class="code" href="structNL3D_1_1CPatchInfo.html#a2">CPatchInfo</a>() +00203 { +00204 <a class="code" href="structNL3D_1_1CPatchInfo.html#z836_5">ErrorSize</a>= 0; +00205 <font class="comment">// No Rotation / not smooth by default.</font> +00206 <a class="code" href="structNL3D_1_1CPatchInfo.html#z836_8">NoiseRotation</a>= 0; +00207 <a class="code" href="structNL3D_1_1CPatchInfo.html#o0">_CornerSmoothFlag</a>= 0; +00208 } +00209 +00210 <font class="keyword">private</font>: +00211 <font class="comment">// Noise Smooth flags.</font> +<a name="l00212"></a><a class="code" href="structNL3D_1_1CPatchInfo.html#o0">00212</a> <a class="code" href="types__nl_8h.html#a5">uint8</a> <a class="code" href="structNL3D_1_1CPatchInfo.html#o0">_CornerSmoothFlag</a>; +00213 +00214 }; +00215 +00216 +00217 <font class="comment">// ***************************************************************************</font> +<a name="l00225"></a><a class="code" href="structNL3D_1_1CZoneInfo.html">00225</a> <font class="comment"></font><font class="keyword">struct </font>CZoneInfo +00226 { +<a name="l00228"></a><a class="code" href="structNL3D_1_1CZoneInfo.html#m0">00228</a> <a class="code" href="types__nl_8h.html#a7">uint16</a> <a class="code" href="structNL3D_1_1CZoneInfo.html#m0">ZoneId</a>; +<a name="l00230"></a><a class="code" href="structNL3D_1_1CZoneInfo.html#m1">00230</a> std::vector<CPatchInfo> <a class="code" href="structNL3D_1_1CZoneInfo.html#m1">Patchs</a>; +<a name="l00235"></a><a class="code" href="structNL3D_1_1CZoneInfo.html#m2">00235</a> std::vector<CBorderVertex> <a class="code" href="structNL3D_1_1CZoneInfo.html#m2">BorderVertices</a>; +00236 +<a name="l00240"></a><a class="code" href="structNL3D_1_1CZoneInfo.html#m3">00240</a> std::vector<CPointLightNamed> <a class="code" href="structNL3D_1_1CZoneInfo.html#m3">PointLights</a>; +00241 }; +00242 +00243 +00244 <font class="comment">// ***************************************************************************</font> +<a name="l00258"></a><a class="code" href="classNL3D_1_1CZone.html">00258</a> <font class="comment"></font><font class="keyword">class </font>CZone +00259 { +00260 <font class="keyword">public</font>: +00261 <font class="comment">// The stored patch structure for compile() - ation.</font> +<a name="l00262"></a><a class="code" href="structNL3D_1_1CZone_1_1CPatchConnect.html">00262</a> <font class="keyword">struct </font>CPatchConnect +00263 { +00264 <font class="comment">// NB: same meanings than in CPatchInfo.</font> +<a name="l00265"></a><a class="code" href="structNL3D_1_1CZone_1_1CPatchConnect.html#m1">00265</a> <a class="code" href="types__nl_8h.html#a5">uint8</a> <a class="code" href="structNL3D_1_1CZone_1_1CPatchConnect.html#m0">OldOrderS</a>, <a class="code" href="structNL3D_1_1CZone_1_1CPatchConnect.html#m1">OldOrderT</a>; +<a name="l00266"></a><a class="code" href="structNL3D_1_1CZone_1_1CPatchConnect.html#m2">00266</a> <font class="keywordtype">float</font> <a class="code" href="structNL3D_1_1CZone_1_1CPatchConnect.html#m2">ErrorSize</a>; +<a name="l00267"></a><a class="code" href="structNL3D_1_1CZone_1_1CPatchConnect.html#m3">00267</a> <a class="code" href="types__nl_8h.html#a7">uint16</a> <a class="code" href="structNL3D_1_1CZone_1_1CPatchConnect.html#m3">BaseVertices</a>[4]; +<a name="l00268"></a><a class="code" href="structNL3D_1_1CZone_1_1CPatchConnect.html#m4">00268</a> CPatchInfo::CBindInfo <a class="code" href="structNL3D_1_1CZone_1_1CPatchConnect.html#m4">BindEdges</a>[4]; +00269 +00270 <font class="keyword">public</font>: +00271 <font class="keywordtype">void</font> <a class="code" href="structNL3D_1_1CZone_1_1CPatchConnect.html#a0">serial</a>(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &f); +00272 }; +00273 +00274 <font class="keyword">public</font>: +00275 +00277 <a class="code" href="classNL3D_1_1CZone.html#a0">CZone</a>(); +00279 <a class="code" href="classNL3D_1_1CZone.html#a1">~CZone</a>(); +00280 +00281 +00293 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CZone.html#a2">build</a>(<font class="keyword">const</font> CZoneInfo &zoneInfo, <a class="code" href="types__nl_8h.html#a9">uint32</a> numVertices=0); +00294 +00295 +00299 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CZone.html#a2">build</a>(<a class="code" href="types__nl_8h.html#a7">uint16</a> zoneId, <font class="keyword">const</font> std::vector<CPatchInfo> &patchs, <font class="keyword">const</font> std::vector<CBorderVertex> &borderVertices, <a class="code" href="types__nl_8h.html#a9">uint32</a> numVertices=0); +00300 +00301 +00307 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CZone.html#a2">build</a>(<font class="keyword">const</font> <a class="code" href="classNL3D_1_1CZone.html#a0">CZone</a> &zone); +00308 +00309 +00316 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CZone.html#a5">retrieve</a>(CZoneInfo &zoneInfo); +00317 +00318 +00322 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CZone.html#a5">retrieve</a>(std::vector<CPatchInfo> &patchs, std::vector<CBorderVertex> &borderVertices); +00323 +00324 +00325 +00329 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CZone.html#a7">debugBinds</a>(FILE *f= stdout); +00330 +00331 +00344 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CZone.html#a8">compile</a>(<a class="code" href="classNL3D_1_1CZone.html#l0">CLandscape</a> *landscape, <a class="code" href="namespaceNL3D.html#a303">TZoneMap</a> &loadedZones); +00345 +00356 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CZone.html#a9">release</a>(<a class="code" href="namespaceNL3D.html#a303">TZoneMap</a> &loadedZones); +00357 +00358 +00362 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CZone.html#a10">serial</a>(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &f); +00363 +00364 +00372 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CZone.html#a11">changePatchTextureAndColor</a> (<a class="code" href="types__nl_8h.html#a12">sint</a> numPatch, <font class="keyword">const</font> std::vector<CTileElement> *tiles, <font class="keyword">const</font> std::vector<CTileColor> *colors); +00373 +00374 +00386 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CZone.html#a12">refreshTesselationGeometry</a>(<a class="code" href="types__nl_8h.html#a12">sint</a> numPatch); +00387 +00388 +00397 <font class="keyword">const</font> std::vector<CTileElement> &<a class="code" href="classNL3D_1_1CZone.html#a13">getPatchTexture</a>(<a class="code" href="types__nl_8h.html#a12">sint</a> numPatch) <font class="keyword">const</font>; +00398 +00407 <font class="keyword">const</font> std::vector<CTileColor> &<a class="code" href="classNL3D_1_1CZone.html#a14">getPatchColor</a>(<a class="code" href="types__nl_8h.html#a12">sint</a> numPatch) <font class="keyword">const</font>; +00408 +<a name="l00414"></a><a class="code" href="classNL3D_1_1CZone.html#a15">00414</a> <a class="code" href="classNL3D_1_1CZone.html#l0">CLandscape</a>* <a class="code" href="classNL3D_1_1CZone.html#a15">getLandscape</a> ()<font class="keyword"> const</font> +00415 <font class="keyword"> </font>{ +00416 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CZone.html#o0">Landscape</a>; +00417 } +00418 +00419 <font class="comment">// NB: for all those function, CTessFace static rendering context must be setup.</font> +00421 <font class="comment"> void clip(const std::vector<CPlane> &pyramid);</font> +00423 <font class="comment"> void preRender();</font> +00424 <font class="comment">// release Far render pass/reset Tile/Far render. Delete also VB, and FaceVectors</font> +00425 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CZone.html#a18">resetRenderFarAndDeleteVBFV</a>(); +00427 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CZone.html#a19">forceMergeAtTileLevel</a>(); +00428 +00430 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CZone.html#a20">refineAll</a>(); +00432 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CZone.html#a21">excludePatchFromRefineAll</a>(<a class="code" href="types__nl_8h.html#a13">uint</a> patch, <font class="keywordtype">bool</font> exclude); +00435 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CZone.html#a22">averageTesselationVertices</a>(); +00436 +00437 <font class="comment">// Accessors.</font> +<a name="l00438"></a><a class="code" href="classNL3D_1_1CZone.html#a23">00438</a> <font class="keyword">const</font> CVector &<a class="code" href="classNL3D_1_1CZone.html#a23">getPatchBias</a>()<font class="keyword"> const </font>{<font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CZone.html#o4">PatchBias</a>;} +<a name="l00439"></a><a class="code" href="classNL3D_1_1CZone.html#a24">00439</a> <font class="keywordtype">float</font> <a class="code" href="classNL3D_1_1CZone.html#a24">getPatchScale</a>()<font class="keyword"> const </font>{<font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CZone.html#o5">PatchScale</a>;} +<a name="l00440"></a><a class="code" href="classNL3D_1_1CZone.html#a25">00440</a> <font class="keywordtype">bool</font> <a class="code" href="classNL3D_1_1CZone.html#a25">compiled</a>()<font class="keyword"> const </font>{<font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CZone.html#o2">Compiled</a>;} +<a name="l00441"></a><a class="code" href="classNL3D_1_1CZone.html#a26">00441</a> <a class="code" href="types__nl_8h.html#a7">uint16</a> <a class="code" href="classNL3D_1_1CZone.html#a26">getZoneId</a>()<font class="keyword"> const </font>{<font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CZone.html#o1">ZoneId</a>;} +<a name="l00442"></a><a class="code" href="classNL3D_1_1CZone.html#a27">00442</a> <a class="code" href="types__nl_8h.html#a12">sint</a> <a class="code" href="classNL3D_1_1CZone.html#a27">getNumPatchs</a>()<font class="keyword"> const </font>{<font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CZone.html#o9">Patchs</a>.size();} +00443 <font class="comment">// Return the Bounding Box of the zone.</font> +<a name="l00444"></a><a class="code" href="classNL3D_1_1CZone.html#a28">00444</a> <font class="keyword">const</font> CAABBoxExt &<a class="code" href="classNL3D_1_1CZone.html#a28">getZoneBB</a>()<font class="keyword"> const </font>{<font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CZone.html#o3">ZoneBB</a>;} +00445 +<a name="l00452"></a><a class="code" href="classNL3D_1_1CZone.html#a29">00452</a> <font class="keyword">const</font> <a class="code" href="classNL3D_1_1CZone.html#l2">CPatch</a> *<a class="code" href="classNL3D_1_1CZone.html#a29">getPatch</a>(<a class="code" href="types__nl_8h.html#a12">sint</a> patch)<font class="keyword"> const </font>{<a class="code" href="debug_8h.html#a6">nlassert</a>(patch>=0 && patch<(<a class="code" href="types__nl_8h.html#a12">sint</a>)<a class="code" href="classNL3D_1_1CZone.html#o9">Patchs</a>.size()); <font class="keywordflow">return</font> &(<a class="code" href="classNL3D_1_1CZone.html#o9">Patchs</a>[patch]);} +00453 +<a name="l00460"></a><a class="code" href="classNL3D_1_1CZone.html#a30">00460</a> <font class="keyword">const</font> CPatchConnect *<a class="code" href="classNL3D_1_1CZone.html#a30">getPatchConnect</a>(<a class="code" href="types__nl_8h.html#a12">sint</a> patch)<font class="keyword"> const </font> +00461 <font class="keyword"> </font>{<a class="code" href="debug_8h.html#a6">nlassert</a>(patch>=0 && patch<(<a class="code" href="types__nl_8h.html#a12">sint</a>)<a class="code" href="classNL3D_1_1CZone.html#o9">Patchs</a>.size()); <font class="keywordflow">return</font> &(<a class="code" href="classNL3D_1_1CZone.html#o10">PatchConnects</a>[patch]);} +00462 +00463 +00468 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CZone.html#a31">applyHeightField</a>(<font class="keyword">const</font> <a class="code" href="classNL3D_1_1CZone.html#l0">CLandscape</a> &landScape); +00469 +00478 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CZone.html#a32">setupColorsFromTileFlags</a>(<font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> colors[4]); +00479 +00483 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CZone.html#a33">copyTilesFlags</a>(<a class="code" href="types__nl_8h.html#a12">sint</a> destPatchId, <font class="keyword">const</font> <a class="code" href="classNL3D_1_1CZone.html#l2">CPatch</a> *srcPatch); +00484 +00485 <font class="comment">// Private part.</font> +00486 <font class="keyword">private</font>: +00487 <font class="comment">/*********************************/</font> +00488 <font class="comment">// A smartptrisable vertex.</font> +<a name="l00489"></a><a class="code" href="structNL3D_1_1CZone_1_1CTessBaseVertex.html">00489</a> <font class="keyword">struct </font>CTessBaseVertex : <font class="keyword">public</font> NLMISC::CRefCount +00490 { +<a name="l00491"></a><a class="code" href="structNL3D_1_1CZone_1_1CTessBaseVertex.html#m0">00491</a> CTessVertex <a class="code" href="structNL3D_1_1CZone_1_1CTessBaseVertex.html#m0">Vert</a>; +00492 }; +00493 +00494 <font class="comment">// Zone vertices.</font> +<a name="l00495"></a><a class="code" href="classNL3D_1_1CZone.html#u0">00495</a> <font class="keyword">typedef</font> <a class="code" href="classNLMISC_1_1CSmartPtr.html">NLMISC::CSmartPtr<CTessBaseVertex></a> <a class="code" href="classNLMISC_1_1CSmartPtr.html">PBaseVertex</a>; +<a name="l00496"></a><a class="code" href="classNL3D_1_1CZone.html#u1">00496</a> <font class="keyword">typedef</font> std::vector<PBaseVertex> <a class="code" href="classNL3D_1_1CZone.html#u1">TBaseVerticesVec</a>; +00497 +00498 +00499 <font class="keyword">private</font>: +00500 <font class="comment">// The lanscape which own this zone. Usefull for texture management.</font> +00501 <font class="comment">// Filled at compilation only.</font> +<a name="l00502"></a><a class="code" href="classNL3D_1_1CZone.html#o0">00502</a> <a class="code" href="classNL3D_1_1CZone.html#l0">CLandscape</a> *<a class="code" href="classNL3D_1_1CZone.html#o0">Landscape</a>; +00503 +00504 <font class="comment">// Misc.</font> +<a name="l00505"></a><a class="code" href="classNL3D_1_1CZone.html#o1">00505</a> <a class="code" href="types__nl_8h.html#a7">uint16</a> <a class="code" href="classNL3D_1_1CZone.html#o1">ZoneId</a>; +<a name="l00506"></a><a class="code" href="classNL3D_1_1CZone.html#o2">00506</a> <font class="keywordtype">bool</font> <a class="code" href="classNL3D_1_1CZone.html#o2">Compiled</a>; +<a name="l00507"></a><a class="code" href="classNL3D_1_1CZone.html#o3">00507</a> CAABBoxExt <a class="code" href="classNL3D_1_1CZone.html#o3">ZoneBB</a>; +<a name="l00508"></a><a class="code" href="classNL3D_1_1CZone.html#o4">00508</a> CVector <a class="code" href="classNL3D_1_1CZone.html#o4">PatchBias</a>; +<a name="l00509"></a><a class="code" href="classNL3D_1_1CZone.html#o5">00509</a> <font class="keywordtype">float</font> <a class="code" href="classNL3D_1_1CZone.html#o5">PatchScale</a>; +00510 +00511 <font class="comment">// The number of vertices she access (maybe on border).</font> +<a name="l00512"></a><a class="code" href="classNL3D_1_1CZone.html#o6">00512</a> <a class="code" href="types__nl_8h.html#a8">sint32</a> <a class="code" href="classNL3D_1_1CZone.html#o6">NumVertices</a>; +00513 <font class="comment">// The smartptr on zone vertices.</font> +<a name="l00514"></a><a class="code" href="classNL3D_1_1CZone.html#o7">00514</a> <a class="code" href="classNL3D_1_1CZone.html#u1">TBaseVerticesVec</a> <a class="code" href="classNL3D_1_1CZone.html#o7">BaseVertices</a>; +00515 <font class="comment">// The list of border vertices.</font> +<a name="l00516"></a><a class="code" href="classNL3D_1_1CZone.html#o8">00516</a> std::vector<CBorderVertex> <a class="code" href="classNL3D_1_1CZone.html#o8">BorderVertices</a>; +00517 <font class="comment">// NB: No problem on corners, since zones are compile()-ed with knowledge of neighbors.</font> +00518 +00519 <font class="comment">// The patchs.</font> +<a name="l00520"></a><a class="code" href="classNL3D_1_1CZone.html#o9">00520</a> std::vector<CPatch> <a class="code" href="classNL3D_1_1CZone.html#o9">Patchs</a>; +<a name="l00521"></a><a class="code" href="classNL3D_1_1CZone.html#o10">00521</a> std::vector<CPatchConnect> <a class="code" href="classNL3D_1_1CZone.html#o10">PatchConnects</a>; +00522 +<a name="l00525"></a><a class="code" href="classNL3D_1_1CZone.html#o11">00525</a> CPointLightNamedArray <a class="code" href="classNL3D_1_1CZone.html#o11">_PointLightArray</a>; +00526 +00527 +00528 <font class="keyword">private</font>: +<a name="l00529"></a><a class="code" href="classNL3D_1_1CZone.html#l0">00529</a> <font class="keyword">friend</font> <font class="keyword">class </font><a class="code" href="classNL3D_1_1CZone.html#l0">CLandscape</a>; +<a name="l00530"></a><a class="code" href="classNL3D_1_1CZone.html#l1">00530</a> <font class="keyword">friend</font> <font class="keyword">class </font><a class="code" href="classNL3D_1_1CZone.html#l1">CTessFace</a>; +00531 <font class="comment">// Should do this, for texture mgt.</font> +<a name="l00532"></a><a class="code" href="classNL3D_1_1CZone.html#l2">00532</a> <font class="keyword">friend</font> <font class="keyword">class </font><a class="code" href="classNL3D_1_1CZone.html#l2">CPatch</a>; +00533 +<a name="l00534"></a><a class="code" href="classNL3D_1_1CZone.html#o12">00534</a> <a class="code" href="types__nl_8h.html#a12">sint</a> <a class="code" href="classNL3D_1_1CZone.html#o12">ClipResult</a>; +<a name="l00535"></a><a class="code" href="classNL3D_1_1CZone.html#u5">00535</a> <font class="keyword">enum</font> <a class="code" href="classNL3D_1_1CZone.html#u5">TClipResult</a> {<a class="code" href="classNL3D_1_1CZone.html#u5u2">ClipIn</a>= 0, <a class="code" href="classNL3D_1_1CZone.html#u5u3">ClipOut</a>= 1, <a class="code" href="classNL3D_1_1CZone.html#u5u4">ClipSide</a>= 2}; +00536 +00537 +00538 <font class="keyword">private</font>: +00543 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CZone.html#c0">rebindBorder</a>(<a class="code" href="namespaceNL3D.html#a303">TZoneMap</a> &loadedZones); +00544 +<a name="l00545"></a><a class="code" href="classNL3D_1_1CZone.html#c1">00545</a> PBaseVertex <a class="code" href="classNL3D_1_1CZone.html#c1">getBaseVertex</a>(<a class="code" href="types__nl_8h.html#a12">sint</a> vert)<font class="keyword"> const </font>{<font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CZone.html#o7">BaseVertices</a>[vert];} +<a name="l00546"></a><a class="code" href="classNL3D_1_1CZone.html#c2">00546</a> <a class="code" href="classNL3D_1_1CZone.html#l2">CPatch</a> *<a class="code" href="classNL3D_1_1CZone.html#a29">getPatch</a>(<a class="code" href="types__nl_8h.html#a12">sint</a> patch) {<a class="code" href="debug_8h.html#a6">nlassert</a>(patch>=0 && patch<(<a class="code" href="types__nl_8h.html#a12">sint</a>)<a class="code" href="classNL3D_1_1CZone.html#o9">Patchs</a>.size()); <font class="keywordflow">return</font> &(<a class="code" href="classNL3D_1_1CZone.html#o9">Patchs</a>[patch]);} +00547 <font class="keyword">static</font> <a class="code" href="classNL3D_1_1CZone.html#l2">CPatch</a> *<a class="code" href="classNL3D_1_1CZone.html#f0">getZonePatch</a>(<a class="code" href="namespaceNL3D.html#a303">TZoneMap</a> &loadedZones, <a class="code" href="types__nl_8h.html#a12">sint</a> zoneId, <a class="code" href="types__nl_8h.html#a12">sint</a> patch); +00548 <font class="comment">// Bind the patch with ones which are loaded...</font> +00549 <font class="keyword">static</font> <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CZone.html#f1">unbindPatch</a>(<a class="code" href="classNL3D_1_1CZone.html#l2">CPatch</a> &pa); +00550 <font class="keyword">static</font> <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CZone.html#f2">bindPatch</a>(<a class="code" href="namespaceNL3D.html#a303">TZoneMap</a> &loadedZones, <a class="code" href="classNL3D_1_1CZone.html#l2">CPatch</a> &pa, CPatchConnect &pc, <font class="keywordtype">bool</font> rebind); +00551 <font class="comment">// Is the patch on a border of this zone???</font> +00552 <font class="keywordtype">bool</font> <a class="code" href="classNL3D_1_1CZone.html#c3">patchOnBorder</a>(<font class="keyword">const</font> CPatchConnect &pc) <font class="keyword">const</font>; +00553 +00554 <font class="comment">// compute AABBox, PatchBias and PatchScale, from a bbox.</font> +00555 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CZone.html#c4">computeBBScaleBias</a>(<font class="keyword">const</font> CAABBox &bb); +00556 +00557 +00558 <font class="comment">// For CPatch: build a bindInfo.</font> +00559 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CZone.html#c5">buildBindInfo</a>(<a class="code" href="types__nl_8h.html#a13">uint</a> patchId, <a class="code" href="types__nl_8h.html#a13">uint</a> edge, <a class="code" href="classNL3D_1_1CZone.html#a0">CZone</a> *neighborZone, CPatch::CBindInfo &paBind); +00560 +00561 }; +00562 +00563 +00564 } <font class="comment">// NL3D</font> +00565 +00566 +00567 <font class="preprocessor">#endif // NL_ZONE_H</font> +00568 <font class="preprocessor"></font> +00569 <font class="comment">/* End of zone.h */</font> +</pre></div> + +<!-- footer --> +<BR><FONT Size=+5> </FONT> +</TD> +<TD WIDTH=15><IMG SRC=http://www.nevrax.org/inc/img/pixel.gif WIDTH=15 HEIGHT=15 BORDER=0 ALT=""></TD> +</TR> +</TABLE> +</BODY> +</HTML> |