diff options
Diffstat (limited to 'docs/doxygen/nel/a03730.html')
-rw-r--r-- | docs/doxygen/nel/a03730.html | 3914 |
1 files changed, 3914 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a03730.html b/docs/doxygen/nel/a03730.html new file mode 100644 index 00000000..3d8f97f8 --- /dev/null +++ b/docs/doxygen/nel/a03730.html @@ -0,0 +1,3914 @@ +<!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::CZone 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::CZone Class Reference</h1><code>#include <<a class="el" href="a06760.html">zone.h</a>></code> +<p> +<hr><a name="_details"></a><h2>Detailed Description</h2> +A landscape zone. There is 2 ways for building a zone:<ul> +<li>use <a class="el" href="a03730.html#NL3D_1_1CZonea4">build()</a>. (then you can use serial to save the zone, don't need to <a class="el" href="a03730.html#NL3D_1_1CZonea7">compile()</a> the zone).</li><li>use <a class="el" href="a03730.html#NL3D_1_1CZonea33">serial()</a> for loading this zone.</li></ul> +<p> +Before a zone may be rendered, it must be <a class="el" href="a03730.html#NL3D_1_1CZonea7">compile()</a>-ed, to compile and bind patch, to make vertices etc...<p> +NB: you must call <a class="el" href="a03730.html#NL3D_1_1CZonea29">release()</a> before deleting a compiled zone. (else assert in destruction). <dl compact><dt><b>Author:</b></dt><dd>Lionel Berenguier <p> +Nevrax France </dd></dl> +<dl compact><dt><b>Date:</b></dt><dd>2000 </dd></dl> + +<p> + +<p> +Definition at line <a class="el" href="a06760.html#l00297">297</a> of file <a class="el" href="a06760.html">src/3d/zone.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>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZonea0">applyHeightField</a> (const <a class="el" href="a02702.html">CLandscape</a> &landScape)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZonea1">averageTesselationVertices</a> ()</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZonea2">build</a> (const <a class="el" href="a03730.html">CZone</a> &zone)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZonea3">build</a> (<a class="el" href="a04558.html#a9">uint16</a> zoneId, const std::vector< <a class="el" href="a03066.html">CPatchInfo</a> > &patchs, const std::vector< <a class="el" href="a02290.html">CBorderVertex</a> > &borderVertices, <a class="el" href="a04558.html#a11">uint32</a> numVertices=0)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZonea4">build</a> (const <a class="el" href="a03738.html">CZoneInfo</a> &zoneInfo, <a class="el" href="a04558.html#a11">uint32</a> numVertices=0)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZonea5">changePatchTextureAndColor</a> (<a class="el" href="a04558.html#a14">sint</a> numPatch, const std::vector< <a class="el" href="a03522.html">CTileElement</a> > *tiles, const std::vector< <a class="el" href="a03520.html">CTileColor</a> > *colors)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZonea6">clip</a> (const std::vector< <a class="el" href="a03082.html">CPlane</a> > &pyramid)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Clip a zone. To know if must be rendered etc... A zone is IN if in BACK of at least one plane of the pyramid. <a href="#NL3D_1_1CZonea6"></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="a03730.html#NL3D_1_1CZonea7">compile</a> (<a class="el" href="a02702.html">CLandscape</a> *landscape, <a class="el" href="a05363.html#a362">TZoneMap</a> &loadedZones)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZonea8">compiled</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZonea9">copyTilesFlags</a> (<a class="el" href="a04558.html#a14">sint</a> destPatchId, const <a class="el" href="a03057.html">CPatch</a> *srcPatch)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZonea10">CZone</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="#NL3D_1_1CZonea10"></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="a03730.html#NL3D_1_1CZonea11">debugBinds</a> (FILE *f=stdout)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZonea12">excludePatchFromRefineAll</a> (<a class="el" href="a04558.html#a15">uint</a> patch, bool exclude)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">This is especially for Pacs. exlude a patch to be <a class="el" href="a03730.html#NL3D_1_1CZonea27">refineAll()</a>ed. <a href="#NL3D_1_1CZonea12"></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="a03730.html#NL3D_1_1CZonea13">forceMergeAtTileLevel</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">For changing TileMaxSubdivision. force tesselation to be under tile. <a href="#NL3D_1_1CZonea13"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02702.html">CLandscape</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZonea14">getLandscape</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a14">sint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZonea15">getNumPatchs</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a03057.html">CPatch</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZonea16">getPatch</a> (<a class="el" href="a04558.html#a14">sint</a> patch) const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a03128.html">CVector</a> & </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZonea17">getPatchBias</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a02291.html">CBSphere</a> & </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZonea18">getPatchBSphere</a> (<a class="el" href="a04558.html#a15">uint</a> patch) const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>const std::vector< <a class="el" href="a03520.html">CTileColor</a> > & </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZonea19">getPatchColor</a> (<a class="el" href="a04558.html#a14">sint</a> numPatch) const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a03731.html">CPatchConnect</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZonea20">getPatchConnect</a> (<a class="el" href="a04558.html#a14">sint</a> patch) const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>float </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZonea21">getPatchScale</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>const std::vector< <a class="el" href="a03522.html">CTileElement</a> > & </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZonea22">getPatchTexture</a> (<a class="el" href="a04558.html#a14">sint</a> numPatch) const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a02157.html">CAABBoxExt</a> & </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZonea23">getZoneBB</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a9">uint16</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZonea24">getZoneId</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZonea25">isPatchRenderClipped</a> (<a class="el" href="a04558.html#a15">uint</a> patch) const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Is the patch clipped (ie not visible). crash if bad Id. <a href="#NL3D_1_1CZonea25"></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="a03730.html#NL3D_1_1CZonea26">preRender</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">PreRender a zone (if needed). <a href="#NL3D_1_1CZonea26"></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="a03730.html#NL3D_1_1CZonea27">refineAll</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">force Refine a zone. <a href="#NL3D_1_1CZonea27"></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="a03730.html#NL3D_1_1CZonea28">refreshTesselationGeometry</a> (<a class="el" href="a04558.html#a14">sint</a> numPatch)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZonea29">release</a> (<a class="el" href="a05363.html#a362">TZoneMap</a> &loadedZones)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZonea30">resetRenderFarAndDeleteVBFV</a> ()</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZonea31">retrieve</a> (std::vector< <a class="el" href="a03066.html">CPatchInfo</a> > &patchs, std::vector< <a class="el" href="a02290.html">CBorderVertex</a> > &borderVertices)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZonea32">retrieve</a> (<a class="el" href="a03738.html">CZoneInfo</a> &zoneInfo)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZonea33">serial</a> (<a class="el" href="a02270.html">NLMISC::IStream</a> &f)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZonea34">setTileColor</a> (bool monochrome, float factor)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZonea35">setupColorsFromTileFlags</a> (const <a class="el" href="a03337.html">NLMISC::CRGBA</a> colors[4])</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZonea36">~CZone</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#NL3D_1_1CZonea36"></a><br><br></td></tr> +<tr><td colspan=2><br><h2>Private Types</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>typedef <a class="el" href="a03408.html">NLMISC::CSmartPtr</a><<br> + <a class="el" href="a03732.html">CTessBaseVertex</a> > </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZoney3">PBaseVertex</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>typedef std::vector< <a class="el" href="a03408.html">PBaseVertex</a> > </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZoney4">TBaseVerticesVec</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>enum </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZoney5">TClipResult</a> { <a class="el" href="a03730.html#NL3D_1_1CZoney5NL3D_1_1CZoney0">ClipIn</a> = 0, +<a class="el" href="a03730.html#NL3D_1_1CZoney5NL3D_1_1CZoney1">ClipOut</a> = 1, +<a class="el" href="a03730.html#NL3D_1_1CZoney5NL3D_1_1CZoney2">ClipSide</a> = 2 + }</td></tr> + +<tr><td colspan=2><br><h2>Private Member Functions</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZoned0">buildBindInfo</a> (<a class="el" href="a04558.html#a15">uint</a> patchId, <a class="el" href="a04558.html#a15">uint</a> edge, <a class="el" href="a03730.html">CZone</a> *neighborZone, <a class="el" href="a03058.html">CPatch::CBindInfo</a> &paBind)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZoned1">clipPatchs</a> (const std::vector< <a class="el" href="a03082.html">CPlane</a> > &pyramid)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZoned2">computeBBScaleBias</a> (const <a class="el" href="a02156.html">CAABBox</a> &bb)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03408.html">PBaseVertex</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZoned3">getBaseVertex</a> (<a class="el" href="a04558.html#a14">sint</a> vert) const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03057.html">CPatch</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZoned4">getPatch</a> (<a class="el" href="a04558.html#a14">sint</a> patch)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZoned5">patchOnBorder</a> (const <a class="el" href="a03731.html">CPatchConnect</a> &pc) const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZoned6">rebindBorder</a> (<a class="el" href="a05363.html#a362">TZoneMap</a> &loadedZones)</td></tr> + +<tr><td colspan=2><br><h2>Static Private Member Functions</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZoneh0">bindPatch</a> (<a class="el" href="a05363.html#a362">TZoneMap</a> &loadedZones, <a class="el" href="a03057.html">CPatch</a> &pa, <a class="el" href="a03731.html">CPatchConnect</a> &pc, bool rebind)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03057.html">CPatch</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZoneh1">getZonePatch</a> (<a class="el" href="a05363.html#a362">TZoneMap</a> &loadedZones, <a class="el" href="a04558.html#a14">sint</a> zoneId, <a class="el" href="a04558.html#a14">sint</a> patch)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZoneh2">unbindPatch</a> (<a class="el" href="a03057.html">CPatch</a> &pa)</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="a02291.html">CBSphere</a> > </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZoner0">_PatchBSpheres</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02272.html">NLMISC::CBitSet</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZoner1">_PatchOldRenderClipped</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02272.html">NLMISC::CBitSet</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZoner2">_PatchRenderClipped</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03095.html">CPointLightNamedArray</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZoner3">_PointLightArray</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03730.html#NL3D_1_1CZoney4">TBaseVerticesVec</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZoner4">BaseVertices</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector< <a class="el" href="a02290.html">CBorderVertex</a> > </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZoner5">BorderVertices</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a14">sint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZoner6">ClipResult</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZoner7">Compiled</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02702.html">CLandscape</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZoner8">Landscape</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a10">sint32</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZoner9">NumVertices</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03128.html">CVector</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZoner10">PatchBias</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector< <a class="el" href="a03731.html">CPatchConnect</a> > </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZoner11">PatchConnects</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector< <a class="el" href="a03057.html">CPatch</a> > </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZoner12">Patchs</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>float </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZoner13">PatchScale</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02157.html">CAABBoxExt</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZoner14">ZoneBB</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a9">uint16</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZoner15">ZoneId</a></td></tr> + +<tr><td colspan=2><br><h2>Friends</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>class </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZonen0">CLandscape</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>class </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZonen1">CPatch</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>class </td><td class="memItemRight" valign=bottom><a class="el" href="a03730.html#NL3D_1_1CZonen2">CTessFace</a></td></tr> + +</table> +<hr><h2>Member Typedef Documentation</h2> +<a class="anchor" name="NL3D_1_1CZoney3" doxytag="NL3D::CZone::PBaseVertex" ></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"> typedef <a class="el" href="a03408.html">NLMISC::CSmartPtr</a><<a class="el" href="a03732.html">CTessBaseVertex</a>> <a class="el" href="a03408.html">NL3D::CZone::PBaseVertex</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="a06760.html#l00551">551</a> of file <a class="el" href="a06760.html">src/3d/zone.h</a>. +<p> +Referenced by <a class="el" href="a06760.html#l00606">getBaseVertex()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZoney4" doxytag="NL3D::CZone::TBaseVerticesVec" ></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"> typedef std::vector<<a class="el" href="a03408.html">PBaseVertex</a>> <a class="el" href="a03730.html#NL3D_1_1CZoney4">NL3D::CZone::TBaseVerticesVec</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="a06760.html#l00552">552</a> of file <a class="el" href="a06760.html">src/3d/zone.h</a>. </td> + </tr> +</table> +<hr><h2>Member Enumeration Documentation</h2> +<a class="anchor" name="NL3D_1_1CZoney5" doxytag="NL3D::CZone::TClipResult" ></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"> enum <a class="el" href="a03730.html#NL3D_1_1CZoney5">NL3D::CZone::TClipResult</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +<dl compact><dt><b>Enumeration values: </b></dt><dd> +<table border=0 cellspacing=2 cellpadding=0> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1CZoney5NL3D_1_1CZoney0" doxytag="ClipIn" ></a>ClipIn</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1CZoney5NL3D_1_1CZoney1" doxytag="ClipOut" ></a>ClipOut</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1CZoney5NL3D_1_1CZoney2" doxytag="ClipSide" ></a>ClipSide</em> </td><td> +</td></tr> +</table> +</dl> + +<p> +Definition at line <a class="el" href="a06760.html#l00596">596</a> of file <a class="el" href="a06760.html">src/3d/zone.h</a>. +<p> +<div class="fragment"><pre>00596 {<a class="code" href="a03730.html#NL3D_1_1CZoney5NL3D_1_1CZoney0">ClipIn</a>= 0, <a class="code" href="a03730.html#NL3D_1_1CZoney5NL3D_1_1CZoney1">ClipOut</a>= 1, <a class="code" href="a03730.html#NL3D_1_1CZoney5NL3D_1_1CZoney2">ClipSide</a>= 2}; +</pre></div> </td> + </tr> +</table> +<hr><h2>Constructor & Destructor Documentation</h2> +<a class="anchor" name="NL3D_1_1CZonea10" doxytag="NL3D::CZone::CZone" ></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::CZone::CZone </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="a06758.html#l00083">83</a> of file <a class="el" href="a06758.html">3d/zone.cpp</a>. +<p> +References <a class="el" href="a03730.html#NL3D_1_1CZoney5NL3D_1_1CZoney1">ClipOut</a>, <a class="el" href="a06760.html#l00595">ClipResult</a>, and <a class="el" href="a06760.html#l00562">Compiled</a>. +<p> +<div class="fragment"><pre>00084 { +00085 <a class="code" href="a03730.html#NL3D_1_1CZoner15">ZoneId</a>= 0; +00086 <a class="code" href="a03730.html#NL3D_1_1CZoner7">Compiled</a>= <span class="keyword">false</span>; +00087 <a class="code" href="a03730.html#NL3D_1_1CZoner8">Landscape</a>= NULL; +00088 <a class="code" href="a03730.html#NL3D_1_1CZoner6">ClipResult</a>= <a class="code" href="a03730.html#NL3D_1_1CZoney5NL3D_1_1CZoney1">ClipOut</a>; +00089 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZonea36" doxytag="NL3D::CZone::~CZone" ></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::CZone::~<a class="el" href="a03730.html">CZone</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> +Destructor. +<p> + +<p> +Definition at line <a class="el" href="a06758.html#l00091">91</a> of file <a class="el" href="a06758.html">3d/zone.cpp</a>. +<p> +References <a class="el" href="a06760.html#l00562">Compiled</a>, and <a class="el" href="a05622.html#l00290">nlassert</a>. +<p> +<div class="fragment"><pre>00092 { +00093 <span class="comment">// release() must have been called.</span> +00094 <a class="code" href="a04199.html#a6">nlassert</a>(!Compiled); +00095 } +</pre></div> </td> + </tr> +</table> +<hr><h2>Member Function Documentation</h2> +<a class="anchor" name="NL3D_1_1CZonea0" doxytag="NL3D::CZone::applyHeightField" ></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::CZone::applyHeightField </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a02702.html">CLandscape</a> & </td> + <td class="mdname1" valign="top" nowrap> <em>landScape</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> +apply a landscape heightfield on a zone (modification of Z control points values). NB: this is done in Landscape addZone(), before <a class="el" href="a03730.html#NL3D_1_1CZonea7">compile()</a>. <dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>landScape</em> </td><td>the landscape which gives Z delta values, for a x,y point.</td></tr> + </table> +</dl> + +<p> +Definition at line <a class="el" href="a06758.html#l01452">1452</a> of file <a class="el" href="a06758.html">3d/zone.cpp</a>. +<p> +References <a class="el" href="a06758.html#l00099">computeBBScaleBias()</a>, <a class="el" href="a05384.html#l00215">NLMISC::CAABBox::extend()</a>, <a class="el" href="a05862.html#l02698">NL3D::CLandscape::getHeightFieldDeltaZ()</a>, <a class="el" href="a05479.html#l00081">NL3D::CBezierPatch::Interiors</a>, <a class="el" href="a06156.html#l00329">NL3D::CPatch::Interiors</a>, <a class="el" href="a06156.html#l00108">NL3D::CVector3s::pack()</a>, <a class="el" href="a06760.html#l00564">PatchBias</a>, <a class="el" href="a06760.html#l00565">PatchScale</a>, <a class="el" href="a05385.html#l00066">NLMISC::CAABBox::setCenter()</a>, <a class="el" href="a05385.html#l00067">NLMISC::CAABBox::setHalfSize()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05479.html#l00079">NL3D::CBezierPatch::Tangents</a>, <a class="el" href="a06156.html#l00328">NL3D::CPatch::Tangents</a>, <a class="el" href="a06156.html#l00121">NL3D::CVector3s::unpack()</a>, <a class="el" href="a05479.html#l00077">NL3D::CBezierPatch::Vertices</a>, <a class="el" href="a06156.html#l00327">NL3D::CPatch::Vertices</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::x</a>, and <a class="el" href="a06673.html#l00051">NLMISC::CVector::y</a>. +<p> +Referenced by <a class="el" href="a05862.html#l00385">NL3D::CLandscape::addZone()</a>. +<p> +<div class="fragment"><pre>01453 { +01454 <a class="code" href="a04558.html#a14">sint</a> i,j; +01455 vector<CBezierPatch> patchs; +01456 +01457 <span class="comment">// no patch, do nothing.</span> +01458 <span class="keywordflow">if</span>(<a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>.size()==0) +01459 <span class="keywordflow">return</span>; +01460 +01461 <span class="comment">// 0. Unpack patchs to Bezier Patchs.</span> +01462 <span class="comment">//===================================</span> +01463 patchs.resize(<a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>.size()); +01464 <span class="keywordflow">for</span>(j=0;j<(<a class="code" href="a04558.html#a14">sint</a>)patchs.size();j++) +01465 { +01466 CBezierPatch &p= patchs[j]; +01467 <a class="code" href="a03730.html#NL3D_1_1CZonen1">CPatch</a> &pa= <a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>[j]; +01468 +01469 <span class="comment">// re-Build the uncompressed bezier patch.</span> +01470 <span class="keywordflow">for</span>(i=0;i<4;i++) +01471 pa.Vertices[i].unpack(p.Vertices[i], PatchBias, PatchScale); +01472 <span class="keywordflow">for</span>(i=0;i<8;i++) +01473 pa.Tangents[i].unpack(p.Tangents[i], PatchBias, PatchScale); +01474 <span class="keywordflow">for</span>(i=0;i<4;i++) +01475 pa.Interiors[i].unpack(p.Interiors[i], PatchBias, PatchScale); +01476 } +01477 +01478 <span class="comment">// 1. apply heightfield on bezier patchs.</span> +01479 <span class="comment">//===================================</span> +01480 <span class="keywordflow">for</span>(j=0;j<(<a class="code" href="a04558.html#a14">sint</a>)patchs.size();j++) +01481 { +01482 CBezierPatch &p= patchs[j]; +01483 +01484 <span class="comment">// apply delta.</span> +01485 <span class="keywordflow">for</span>(i=0;i<4;i++) +01486 p.Vertices[i]+= landScape.getHeightFieldDeltaZ(p.Vertices[i].x, p.Vertices[i].y); +01487 <span class="keywordflow">for</span>(i=0;i<8;i++) +01488 p.Tangents[i]+= landScape.getHeightFieldDeltaZ(p.Tangents[i].x, p.Tangents[i].y); +01489 <span class="keywordflow">for</span>(i=0;i<4;i++) +01490 p.Interiors[i]+= landScape.getHeightFieldDeltaZ(p.Interiors[i].x, p.Interiors[i].y); +01491 } +01492 +01493 +01494 <span class="comment">// 2. Re-compute Patch Scale/Bias, and Zone BBox.</span> +01495 <span class="comment">//===================================</span> +01496 CAABBox bb; +01497 bb.setCenter(patchs[0].Vertices[0]); +01498 bb.setHalfSize(CVector::Null); +01499 <span class="keywordflow">for</span>(j=0;j<(<a class="code" href="a04558.html#a14">sint</a>)patchs.size();j++) +01500 { +01501 <span class="comment">// extend bbox.</span> +01502 <span class="keyword">const</span> CBezierPatch &p= patchs[j]; +01503 <span class="keywordflow">for</span>(i=0;i<4;i++) +01504 bb.extend(p.Vertices[i]); +01505 <span class="keywordflow">for</span>(i=0;i<8;i++) +01506 bb.extend(p.Tangents[i]); +01507 <span class="keywordflow">for</span>(i=0;i<4;i++) +01508 bb.extend(p.Interiors[i]); +01509 } +01510 <span class="comment">// Compute BBox, and Patch Scale Bias, according to Noise.</span> +01511 <a class="code" href="a03730.html#NL3D_1_1CZoned2">computeBBScaleBias</a>(bb); +01512 +01513 +01514 <span class="comment">// 3. Re-pack patchs.</span> +01515 <span class="comment">//===================================</span> +01516 <span class="keywordflow">for</span>(j=0;j<(<a class="code" href="a04558.html#a14">sint</a>)patchs.size();j++) +01517 { +01518 CBezierPatch &p= patchs[j]; +01519 <a class="code" href="a03730.html#NL3D_1_1CZonen1">CPatch</a> &pa= <a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>[j]; +01520 +01521 <span class="comment">// Build the packed patch.</span> +01522 <span class="keywordflow">for</span>(i=0;i<4;i++) +01523 pa.Vertices[i].pack(p.Vertices[i], PatchBias, PatchScale); +01524 <span class="keywordflow">for</span>(i=0;i<8;i++) +01525 pa.Tangents[i].pack(p.Tangents[i], PatchBias, PatchScale); +01526 <span class="keywordflow">for</span>(i=0;i<4;i++) +01527 pa.Interiors[i].pack(p.Interiors[i], PatchBias, PatchScale); +01528 } +01529 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZonea1" doxytag="NL3D::CZone::averageTesselationVertices" ></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::CZone::averageTesselationVertices </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> +This is especially for Pacs. see <a class="el" href="a02702.html">CLandscape</a> desc. +<p> +Definition at line <a class="el" href="a06758.html#l01157">1157</a> of file <a class="el" href="a06758.html">3d/zone.cpp</a>. +<p> +References <a class="el" href="a06155.html#l01505">NL3D::CPatch::averageTesselationVertices()</a>, <a class="el" href="a06760.html#l00562">Compiled</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05981.html#l00104">sint</a>. +<p> +<div class="fragment"><pre>01158 { +01159 <a class="code" href="a04199.html#a6">nlassert</a>(Compiled); +01160 +01161 <span class="comment">// Fuck stlport....</span> +01162 <span class="keywordflow">if</span>(<a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>.size()==0) +01163 <span class="keywordflow">return</span>; +01164 +01165 <span class="comment">// averageTesselationVertices of ALL patchs.</span> +01166 <a class="code" href="a03730.html#NL3D_1_1CZonen1">CPatch</a> *pPatch= &(*<a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>.begin()); +01167 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> n=(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>.size();n>0;n--, pPatch++) +01168 { +01169 pPatch->averageTesselationVertices(); +01170 } +01171 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZoneh0" doxytag="NL3D::CZone::bindPatch" ></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::CZone::bindPatch </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a05363.html#a362">TZoneMap</a> & </td> + <td class="mdname" nowrap> <em>loadedZones</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a03057.html">CPatch</a> & </td> + <td class="mdname" nowrap> <em>pa</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a03731.html">CPatchConnect</a> & </td> + <td class="mdname" nowrap> <em>pc</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>bool </td> + <td class="mdname" nowrap> <em>rebind</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [static, 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="a06758.html#l00776">776</a> of file <a class="el" href="a06758.html">3d/zone.cpp</a>. +<p> +References <a class="el" href="a06155.html#l01847">NL3D::CPatch::bind()</a>, <a class="el" href="a06760.html#l00307">NL3D::CZone::CPatchConnect::BindEdges</a>, <a class="el" href="a06760.html#l00108">NL3D::CPatchInfo::CBindInfo::Edge</a>, <a class="el" href="a06156.html#l00322">NL3D::CPatch::CBindInfo::Edge</a>, <a class="el" href="a06155.html#l02213">NL3D::CPatch::getBindNeighbor()</a>, <a class="el" href="a06760.html#l00106">NL3D::CPatchInfo::CBindInfo::Next</a>, <a class="el" href="a06156.html#l00321">NL3D::CPatch::CBindInfo::Next</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06156.html#l00312">NL3D::CPatch::CBindInfo::NPatchs</a>, <a class="el" href="a06760.html#l00101">NL3D::CPatchInfo::CBindInfo::NPatchs</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06760.html#l00057">NL3D::TZoneMap</a>, <a class="el" href="a06155.html#l01724">NL3D::CPatch::unbind()</a>, <a class="el" href="a06156.html#l00309">NL3D::CPatch::CBindInfo::Zone</a>, and <a class="el" href="a06760.html#l00104">NL3D::CPatchInfo::CBindInfo::ZoneId</a>. +<p> +Referenced by <a class="el" href="a06758.html#l00499">compile()</a>, and <a class="el" href="a06758.html#l00686">rebindBorder()</a>. +<p> +<div class="fragment"><pre>00777 { +00778 CPatch::CBindInfo edges[4]; +00779 +00780 <span class="comment">// Fill all edges.</span> +00781 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0;i<4;i++) +00782 { +00783 CPatchInfo::CBindInfo &pcBind= pc.BindEdges[i]; +00784 CPatch::CBindInfo &paBind= edges[i]; +00785 +00786 <a class="code" href="a04199.html#a6">nlassert</a>(pcBind.NPatchs==0 || pcBind.NPatchs==1 || pcBind.NPatchs==2 || pcBind.NPatchs==4 || pcBind.NPatchs==5); +00787 paBind.NPatchs= pcBind.NPatchs; +00788 +00789 +00790 <span class="comment">// Find the zone.</span> +00791 TZoneMap::iterator itZoneMap; +00792 <span class="comment">// If no neighbor, or if zone neighbor not loaded.</span> +00793 <span class="keywordflow">if</span>( paBind.NPatchs==0 || (itZoneMap=loadedZones.find(pcBind.ZoneId)) == loadedZones.end() ) +00794 paBind.Zone= NULL; +00795 <span class="keywordflow">else</span> +00796 paBind.Zone= itZoneMap->second; +00797 +00798 +00799 <span class="comment">// Special case of a small patch connected to a bigger.</span> +00800 <span class="keywordflow">if</span>(paBind.NPatchs==5) +00801 { +00802 paBind.Edge[0]= pcBind.Edge[0]; +00803 paBind.Next[0]= CZone::getZonePatch(loadedZones, pcBind.ZoneId, pcBind.Next[0]); +00804 <span class="comment">// If not loaded, don't bind to this edge.</span> +00805 <span class="keywordflow">if</span>(!paBind.Next[0]) +00806 paBind.NPatchs=0; +00807 <span class="keywordflow">else</span> +00808 { +00809 <span class="comment">// Get the BindInfo on me stored in our neighbor bigger CPatch</span> +00810 CPatch::CBindInfo nbOnMe; +00811 paBind.Next[0]->getBindNeighbor(paBind.Edge[0], nbOnMe); +00812 <span class="comment">// if this patch has not already been binded on me, nbOnMe.Zone==NULL</span> +00813 <span class="keywordflow">if</span>( nbOnMe.Zone == NULL ) +00814 { +00815 <span class="comment">// Simple case: do nothing: don't need to rebind() to the bigger patch since </span> +00816 <span class="comment">// himself is not bound</span> +00817 paBind.NPatchs=0; +00818 paBind.Zone= NULL; +00819 } +00820 <span class="keywordflow">else</span> +00821 { +00822 <span class="comment">// pa.bind() will do the job.</span> +00823 <span class="comment">// Leave it flagged with NPatchs==5.</span> +00824 <span class="keywordflow">continue</span>; +00825 } +00826 } +00827 } +00828 +00829 +00830 <span class="comment">// Bind 1/1 and 1/2,1/4</span> +00831 <span class="keywordflow">if</span>(paBind.NPatchs>=1) +00832 { +00833 paBind.Edge[0]= pcBind.Edge[0]; +00834 paBind.Next[0]= CZone::getZonePatch(loadedZones, pcBind.ZoneId, pcBind.Next[0]); +00835 <span class="comment">// If not loaded, don't bind to this edge.</span> +00836 <span class="keywordflow">if</span>(!paBind.Next[0]) +00837 paBind.NPatchs=0; +00838 } +00839 <span class="keywordflow">if</span>(paBind.NPatchs>=2) +00840 { +00841 paBind.Edge[1]= pcBind.Edge[1]; +00842 paBind.Next[1]= CZone::getZonePatch(loadedZones, pcBind.ZoneId, pcBind.Next[1]); +00843 <span class="comment">// If not loaded, don't bind to this edge.</span> +00844 <span class="keywordflow">if</span>(!paBind.Next[1]) +00845 paBind.NPatchs=0; +00846 } +00847 <span class="keywordflow">if</span>(paBind.NPatchs>=4) +00848 { +00849 paBind.Edge[2]= pcBind.Edge[2]; +00850 paBind.Edge[3]= pcBind.Edge[3]; +00851 paBind.Next[2]= CZone::getZonePatch(loadedZones, pcBind.ZoneId, pcBind.Next[2]); +00852 paBind.Next[3]= CZone::getZonePatch(loadedZones, pcBind.ZoneId, pcBind.Next[3]); +00853 <span class="comment">// If not loaded, don't bind to this edge.</span> +00854 <span class="keywordflow">if</span>(!paBind.Next[2] || !paBind.Next[3]) +00855 paBind.NPatchs=0; +00856 } +00857 } +00858 +00859 <span class="comment">// First, unbind.</span> +00860 pa.unbind(); +00861 +00862 <span class="comment">// Then bind.</span> +00863 pa.bind(edges, rebind); +00864 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZonea2" doxytag="NL3D::CZone::build" ></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::CZone::build </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a03730.html">CZone</a> & </td> + <td class="mdname1" valign="top" nowrap> <em>zone</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> +Build a copy of a zone. This method do a copy of zone (should be builded but maybe not compiled).<p> +NB: cannot build on a compiled zone. must release the zone before.... +<p> +Definition at line <a class="el" href="a06758.html#l00365">365</a> of file <a class="el" href="a06758.html">3d/zone.cpp</a>. +<p> +References <a class="el" href="a06760.html#l00581">_PatchOldRenderClipped</a>, <a class="el" href="a06760.html#l00580">_PatchRenderClipped</a>, <a class="el" href="a06760.html#l00586">_PointLightArray</a>, <a class="el" href="a06760.html#l00572">BorderVertices</a>, <a class="el" href="a06760.html#l00562">Compiled</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06760.html#l00568">NumVertices</a>, <a class="el" href="a06760.html#l00564">PatchBias</a>, <a class="el" href="a06760.html#l00577">PatchConnects</a>, <a class="el" href="a06760.html#l00576">Patchs</a>, <a class="el" href="a06760.html#l00565">PatchScale</a>, <a class="el" href="a05484.html#l00081">NLMISC::CBitSet::resize()</a>, <a class="el" href="a05484.html#l00117">NLMISC::CBitSet::setAll()</a>, <a class="el" href="a06760.html#l00563">ZoneBB</a>, and <a class="el" href="a06760.html#l00561">ZoneId</a>. +<p> +<div class="fragment"><pre>00366 { +00367 <a class="code" href="a04199.html#a6">nlassert</a>(!Compiled); +00368 +00369 <a class="code" href="a03730.html#NL3D_1_1CZoner15">ZoneId</a>= zone.ZoneId; +00370 <a class="code" href="a03730.html#NL3D_1_1CZoner5">BorderVertices</a>= zone.BorderVertices; +00371 +00372 <span class="comment">// Compute the bbox and the bias/scale.</span> +00373 <span class="comment">//=====================================</span> +00374 <a class="code" href="a03730.html#NL3D_1_1CZoner14">ZoneBB</a>= zone.ZoneBB; +00375 <a class="code" href="a03730.html#NL3D_1_1CZoner13">PatchScale</a>= zone.PatchScale; +00376 <a class="code" href="a03730.html#NL3D_1_1CZoner10">PatchBias</a>= zone.PatchBias; +00377 +00378 +00379 <span class="comment">// Compute/compress Patchs.</span> +00380 <span class="comment">//=========================</span> +00381 <a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>= zone.Patchs; +00382 <a class="code" href="a03730.html#NL3D_1_1CZoner11">PatchConnects</a>= zone.PatchConnects; +00383 +00384 <span class="comment">// Init the Clip Arrays</span> +00385 <a class="code" href="a03730.html#NL3D_1_1CZoner2">_PatchRenderClipped</a>.<a class="code" href="a02272.html#NLMISC_1_1CBitSetz1920_5">resize</a>(<a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>.size()); +00386 <a class="code" href="a03730.html#NL3D_1_1CZoner1">_PatchOldRenderClipped</a>.<a class="code" href="a02272.html#NLMISC_1_1CBitSetz1920_5">resize</a>(<a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>.size()); +00387 <a class="code" href="a03730.html#NL3D_1_1CZoner2">_PatchRenderClipped</a>.<a class="code" href="a02272.html#NLMISC_1_1CBitSetz1920_9">setAll</a>(); +00388 <a class="code" href="a03730.html#NL3D_1_1CZoner1">_PatchOldRenderClipped</a>.<a class="code" href="a02272.html#NLMISC_1_1CBitSetz1920_9">setAll</a>(); +00389 +00390 +00391 <span class="comment">// copy pointLights.</span> +00392 <span class="comment">//=========================</span> +00393 <a class="code" href="a03730.html#NL3D_1_1CZoner3">_PointLightArray</a>= zone._PointLightArray; +00394 +00395 +00396 <a class="code" href="a03730.html#NL3D_1_1CZoner9">NumVertices</a>= zone.NumVertices; +00397 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZonea3" doxytag="NL3D::CZone::build" ></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::CZone::build </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a9">uint16</a> </td> + <td class="mdname" nowrap> <em>zoneId</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const std::vector< <a class="el" href="a03066.html">CPatchInfo</a> > & </td> + <td class="mdname" nowrap> <em>patchs</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const std::vector< <a class="el" href="a02290.html">CBorderVertex</a> > & </td> + <td class="mdname" nowrap> <em>borderVertices</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a11">uint32</a> </td> + <td class="mdname" nowrap> <em>numVertices</em> = 0</td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Build a zone. Deprecated. Should use build(CZoneInfo &) instead. see this method +<p> +Definition at line <a class="el" href="a06758.html#l00112">112</a> of file <a class="el" href="a06758.html">3d/zone.cpp</a>. +<p> +References <a class="el" href="a06760.html#l00274">NL3D::CZoneInfo::BorderVertices</a>, <a class="el" href="a06758.html#l00122">build()</a>, <a class="el" href="a06760.html#l00269">NL3D::CZoneInfo::Patchs</a>, <a class="el" href="a05981.html#l00098">uint16</a>, <a class="el" href="a05981.html#l00100">uint32</a>, and <a class="el" href="a06760.html#l00267">NL3D::CZoneInfo::ZoneId</a>. +<p> +<div class="fragment"><pre>00113 { +00114 CZoneInfo zinfo; +00115 zinfo.ZoneId= zoneId; +00116 zinfo.Patchs= patchs; +00117 zinfo.BorderVertices= borderVertices; +00118 +00119 <a class="code" href="a03730.html#NL3D_1_1CZonea4">build</a>(zinfo, numVertices); +00120 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZonea4" doxytag="NL3D::CZone::build" ></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::CZone::build </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a03738.html">CZoneInfo</a> & </td> + <td class="mdname" nowrap> <em>zoneInfo</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a11">uint32</a> </td> + <td class="mdname" nowrap> <em>numVertices</em> = 0</td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Build a zone. This method do:<ul> +<li>compress the patchs coordinates.</li><li>build the patchs of the zone, but doesn't <a class="el" href="a03730.html#NL3D_1_1CZonea7">compile()</a> them.</li><li>compress Lumels.</li><li>sort PointLights by name, and hence remap TileLightInfluences coordinates.</li></ul> +<p> +NB: cannot build on a compiled zone. must release the zone before....<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>numVertices</em> </td><td>maximize the numgber of vertices used by this zone with this value.</td></tr> + </table> +</dl> + +<p> +Definition at line <a class="el" href="a06758.html#l00122">122</a> of file <a class="el" href="a06758.html">3d/zone.cpp</a>. +<p> +References <a class="el" href="a06760.html#l00581">_PatchOldRenderClipped</a>, <a class="el" href="a06760.html#l00580">_PatchRenderClipped</a>, <a class="el" href="a06760.html#l00126">NL3D::CPatchInfo::BaseVertices</a>, <a class="el" href="a06760.html#l00306">NL3D::CZone::CPatchConnect::BaseVertices</a>, <a class="el" href="a06760.html#l00236">NL3D::CPatchInfo::BindEdges</a>, <a class="el" href="a06760.html#l00307">NL3D::CZone::CPatchConnect::BindEdges</a>, <a class="el" href="a06760.html#l00274">NL3D::CZoneInfo::BorderVertices</a>, <a class="el" href="a06186.html#l00071">NL3D::CPointLightNamedArray::build()</a>, <a class="el" href="a06760.html#l00562">Compiled</a>, <a class="el" href="a06758.html#l00099">computeBBScaleBias()</a>, <a class="el" href="a06760.html#l00124">NL3D::CPatchInfo::ErrorSize</a>, <a class="el" href="a06760.html#l00305">NL3D::CZone::CPatchConnect::ErrorSize</a>, <a class="el" href="a05384.html#l00215">NLMISC::CAABBox::extend()</a>, <a class="el" href="a06760.html#l00130">NL3D::CPatchInfo::Flags</a>, <a class="el" href="a06156.html#l00840">NL3D::CPatch::Flags</a>, <a class="el" href="a06758.html#l00067">NL3D::CPatchInfo::getCornerSmoothFlag()</a>, <a class="el" href="a06187.html#l00063">NL3D::CPointLightNamedArray::getPointLights()</a>, <a class="el" href="a06156.html#l00329">NL3D::CPatch::Interiors</a>, <a class="el" href="a05479.html#l00081">NL3D::CBezierPatch::Interiors</a>, <a class="el" href="a06545.html#l00060">NL3D::CTileLightInfluence::Light</a>, <a class="el" href="a06760.html#l00161">NL3D::CPatchInfo::Lumels</a>, <a class="el" href="a06156.html#l00060">NL_LUMEL_BY_TILE</a>, <a class="el" href="a06156.html#l00057">NL_PATCH_SMOOTH_FLAG_MASK</a>, <a class="el" href="a06156.html#l00056">NL_PATCH_SMOOTH_FLAG_SHIFT</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06760.html#l00134">NL3D::CPatchInfo::NoiseRotation</a>, <a class="el" href="a06156.html#l00352">NL3D::CPatch::NoiseRotation</a>, <a class="el" href="a06760.html#l00122">NL3D::CPatchInfo::OrderS</a>, <a class="el" href="a06156.html#l00804">NL3D::CPatch::OrderS</a>, <a class="el" href="a06760.html#l00122">NL3D::CPatchInfo::OrderT</a>, <a class="el" href="a06156.html#l00804">NL3D::CPatch::OrderT</a>, <a class="el" href="a06156.html#l00108">NL3D::CVector3s::pack()</a>, <a class="el" href="a06157.html#l01267">NL3D::CPatch::packShadowMap()</a>, <a class="el" href="a06760.html#l00120">NL3D::CPatchInfo::Patch</a>, <a class="el" href="a06760.html#l00564">PatchBias</a>, <a class="el" href="a06760.html#l00577">PatchConnects</a>, <a class="el" href="a06760.html#l00269">NL3D::CZoneInfo::Patchs</a>, <a class="el" href="a06760.html#l00565">PatchScale</a>, <a class="el" href="a06760.html#l00279">NL3D::CZoneInfo::PointLights</a>, <a class="el" href="a06157.html#l01384">NL3D::CPatch::resetCompressedLumels()</a>, <a class="el" href="a06157.html#l01529">NL3D::CPatch::resetTileLightInfluences()</a>, <a class="el" href="a05484.html#l00081">NLMISC::CBitSet::resize()</a>, <a class="el" href="a05484.html#l00117">NLMISC::CBitSet::setAll()</a>, <a class="el" href="a05385.html#l00066">NLMISC::CAABBox::setCenter()</a>, <a class="el" href="a06158.html#l00951">NL3D::CPatch::setCornerSmoothFlag()</a>, <a class="el" href="a05385.html#l00067">NLMISC::CAABBox::setHalfSize()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06156.html#l00328">NL3D::CPatch::Tangents</a>, <a class="el" href="a05479.html#l00079">NL3D::CBezierPatch::Tangents</a>, <a class="el" href="a06760.html#l00155">NL3D::CPatchInfo::TileColors</a>, <a class="el" href="a06156.html#l00343">NL3D::CPatch::TileColors</a>, <a class="el" href="a06156.html#l00346">NL3D::CPatch::TileLightInfluences</a>, <a class="el" href="a06760.html#l00171">NL3D::CPatchInfo::TileLightInfluences</a>, <a class="el" href="a06760.html#l00149">NL3D::CPatchInfo::Tiles</a>, <a class="el" href="a06156.html#l00340">NL3D::CPatch::Tiles</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00098">uint16</a>, <a class="el" href="a05981.html#l00100">uint32</a>, <a class="el" href="a06156.html#l00327">NL3D::CPatch::Vertices</a>, <a class="el" href="a05479.html#l00077">NL3D::CBezierPatch::Vertices</a>, and <a class="el" href="a06760.html#l00267">NL3D::CZoneInfo::ZoneId</a>. +<p> +Referenced by <a class="el" href="a05862.html#l00385">NL3D::CLandscape::addZone()</a>, <a class="el" href="a06758.html#l00112">build()</a>, and <a class="el" href="a06768.html#l00920">NL3D::CZoneLighter::light()</a>. +<p> +<div class="fragment"><pre>00123 { +00124 <a class="code" href="a04558.html#a14">sint</a> i,j; +00125 <a class="code" href="a04199.html#a6">nlassert</a>(!Compiled); +00126 +00127 <span class="comment">// Ref inupt</span> +00128 <a class="code" href="a04558.html#a9">uint16</a> zoneId= zoneInfo.ZoneId; +00129 <span class="keyword">const</span> std::vector<CPatchInfo> &patchs= zoneInfo.Patchs; +00130 <span class="keyword">const</span> std::vector<CBorderVertex> &borderVertices= zoneInfo.BorderVertices; +00131 +00132 +00133 <a class="code" href="a03730.html#NL3D_1_1CZoner15">ZoneId</a>= zoneId; +00134 <a class="code" href="a03730.html#NL3D_1_1CZoner5">BorderVertices</a>= borderVertices; +00135 +00136 <span class="comment">// Compute the bbox and the bias/scale.</span> +00137 <span class="comment">//=====================================</span> +00138 CAABBox bb; +00139 <span class="keywordflow">if</span>(patchs.size()) +00140 bb.setCenter(patchs[0].Patch.Vertices[0]); +00141 bb.setHalfSize(CVector::Null); +00142 <span class="keywordflow">for</span>(j=0;j<(<a class="code" href="a04558.html#a14">sint</a>)patchs.size();j++) +00143 { +00144 <span class="keyword">const</span> CBezierPatch &p= patchs[j].Patch; +00145 <span class="keywordflow">for</span>(i=0;i<4;i++) +00146 bb.extend(p.Vertices[i]); +00147 <span class="keywordflow">for</span>(i=0;i<8;i++) +00148 bb.extend(p.Tangents[i]); +00149 <span class="keywordflow">for</span>(i=0;i<4;i++) +00150 bb.extend(p.Interiors[i]); +00151 } +00152 <span class="comment">// Compute BBox, and Patch Scale Bias, according to Noise.</span> +00153 <a class="code" href="a03730.html#NL3D_1_1CZoned2">computeBBScaleBias</a>(bb); +00154 +00155 +00156 <span class="comment">// Compute/compress Patchs.</span> +00157 <span class="comment">//=========================</span> +00158 <a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>.resize(patchs.size()); +00159 <a class="code" href="a03730.html#NL3D_1_1CZoner11">PatchConnects</a>.resize(patchs.size()); +00160 <a class="code" href="a04558.html#a14">sint</a> maxVertex=-1; +00161 <span class="keywordflow">for</span>(j=0;j<(<a class="code" href="a04558.html#a14">sint</a>)patchs.size();j++) +00162 { +00163 <span class="keyword">const</span> CPatchInfo &pi= patchs[j]; +00164 <span class="keyword">const</span> CBezierPatch &p= pi.Patch; +00165 <a class="code" href="a03730.html#NL3D_1_1CZonen1">CPatch</a> &pa= <a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>[j]; +00166 CPatchConnect &pc= <a class="code" href="a03730.html#NL3D_1_1CZoner11">PatchConnects</a>[j]; +00167 +00168 <span class="comment">// Smoothing flags</span> +00169 pa.Flags&=~<a class="code" href="a04733.html#a5">NL_PATCH_SMOOTH_FLAG_MASK</a>; +00170 pa.Flags|=<a class="code" href="a04733.html#a5">NL_PATCH_SMOOTH_FLAG_MASK</a>&(pi.Flags<<<a class="code" href="a04733.html#a4">NL_PATCH_SMOOTH_FLAG_SHIFT</a>); +00171 +00172 +00173 <span class="comment">// Noise Data</span> +00174 <span class="comment">// copy noise rotation.</span> +00175 pa.NoiseRotation= pi.NoiseRotation; +00176 <span class="comment">// copy all noise smoothing info.</span> +00177 <span class="keywordflow">for</span>(i=0;i<4;i++) +00178 { +00179 pa.setCornerSmoothFlag(i, pi.getCornerSmoothFlag(i)); +00180 } +00181 +00182 <span class="comment">// Copy order of the patch</span> +00183 pa.OrderS= pi.OrderS; +00184 pa.OrderT= pi.OrderT; +00185 +00186 <span class="comment">// Build the patch.</span> +00187 <span class="keywordflow">for</span>(i=0;i<4;i++) +00188 pa.Vertices[i].pack(p.Vertices[i], PatchBias, PatchScale); +00189 <span class="keywordflow">for</span>(i=0;i<8;i++) +00190 pa.Tangents[i].pack(p.Tangents[i], PatchBias, PatchScale); +00191 <span class="keywordflow">for</span>(i=0;i<4;i++) +00192 pa.Interiors[i].pack(p.Interiors[i], PatchBias, PatchScale); +00193 pa.Tiles= pi.Tiles; +00194 pa.TileColors= pi.TileColors; +00195 <span class="comment">/* Copy TileLightInfluences. It is possible that pi.TileLightInfluences.size()!= 0</span> +00196 <span class="comment"> and pi.TileLightInfluences.size()!= (uint)(pi.OrderS/2+1)*(pi.OrderT/2+1)</span> +00197 <span class="comment"> Because of a preceding bug where pa.OrderS and pa.OrderT were not initialized before the </span> +00198 <span class="comment"> pa.resetTileLightInfluences();</span> +00199 <span class="comment"> */</span> +00200 <span class="keywordflow">if</span>( pi.TileLightInfluences.size()!= (<a class="code" href="a04558.html#a15">uint</a>)(pi.OrderS/2+1)*(pi.OrderT/2+1) ) +00201 { +00202 pa.resetTileLightInfluences(); +00203 } +00204 <span class="keywordflow">else</span> +00205 { +00206 pa.TileLightInfluences= pi.TileLightInfluences; +00207 } +00208 +00209 <span class="comment">// Number of lumels in this patch</span> +00210 <a class="code" href="a04558.html#a15">uint</a> lumelCount=(pi.OrderS*<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>)*(pi.OrderT*<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>); +00211 +00212 <span class="comment">// Lumel empty ?</span> +00213 <span class="keywordflow">if</span> (pi.Lumels.size ()==lumelCount) +00214 { +00215 <span class="comment">// Pack the lumel map</span> +00216 pa.packShadowMap (&pi.Lumels[0]); +00217 } +00218 <span class="keywordflow">else</span> +00219 { +00220 <span class="comment">// Reset lightmap</span> +00221 pa.resetCompressedLumels (); +00222 } +00223 +00224 <a class="code" href="a04199.html#a6">nlassert</a>(pa.Tiles.size()== (<a class="code" href="a04558.html#a15">uint</a>)pi.OrderS*pi.OrderT); +00225 <a class="code" href="a04199.html#a6">nlassert</a>(pa.TileColors.size()== (<a class="code" href="a04558.html#a15">uint</a>)(pi.OrderS+1)*(pi.OrderT+1)); +00226 +00227 <span class="comment">// Build the patchConnect.</span> +00228 pc.ErrorSize= pi.ErrorSize; +00229 <span class="keywordflow">for</span>(i=0;i<4;i++) +00230 { +00231 pc.BaseVertices[i]= pi.BaseVertices[i]; +00232 maxVertex= max((<a class="code" href="a04558.html#a14">sint</a>)pc.BaseVertices[i], maxVertex); +00233 } +00234 <span class="keywordflow">for</span>(i=0;i<4;i++) +00235 pc.BindEdges[i]= pi.BindEdges[i]; +00236 } +00237 +00238 <a class="code" href="a03730.html#NL3D_1_1CZoner9">NumVertices</a>= maxVertex+1; +00239 <a class="code" href="a03730.html#NL3D_1_1CZoner9">NumVertices</a>= max((<a class="code" href="a04558.html#a11">uint32</a>)NumVertices, numVertices); +00240 +00241 <span class="comment">// Init the Clip Arrays</span> +00242 <a class="code" href="a03730.html#NL3D_1_1CZoner2">_PatchRenderClipped</a>.<a class="code" href="a02272.html#NLMISC_1_1CBitSetz1920_5">resize</a>(Patchs.size()); +00243 <a class="code" href="a03730.html#NL3D_1_1CZoner1">_PatchOldRenderClipped</a>.<a class="code" href="a02272.html#NLMISC_1_1CBitSetz1920_5">resize</a>(Patchs.size()); +00244 <a class="code" href="a03730.html#NL3D_1_1CZoner2">_PatchRenderClipped</a>.<a class="code" href="a02272.html#NLMISC_1_1CBitSetz1920_9">setAll</a>(); +00245 <a class="code" href="a03730.html#NL3D_1_1CZoner1">_PatchOldRenderClipped</a>.<a class="code" href="a02272.html#NLMISC_1_1CBitSetz1920_9">setAll</a>(); +00246 +00247 <span class="comment">// Copy PointLights.</span> +00248 <span class="comment">//=========================</span> +00249 <span class="comment">// build array, lights are sorted</span> +00250 std::vector<uint> plRemap; +00251 <a class="code" href="a03730.html#NL3D_1_1CZoner3">_PointLightArray</a>.build(zoneInfo.PointLights, plRemap); +00252 <span class="comment">// Check TileLightInfluences integrity, and remap PointLight Indices.</span> +00253 <span class="keywordflow">for</span>(j=0;j<(<a class="code" href="a04558.html#a14">sint</a>)patchs.size();j++) +00254 { +00255 <a class="code" href="a03730.html#NL3D_1_1CZonen1">CPatch</a> &pa= Patchs[j]; +00256 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> k= 0; k<pa.TileLightInfluences.size(); k++) +00257 { +00258 CTileLightInfluence &tli= pa.TileLightInfluences[k]; +00259 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a05373.html#a2">l</a>=0; <a class="code" href="a05373.html#a2">l</a><CTileLightInfluence::NumLightPerCorner; <a class="code" href="a05373.html#a2">l</a>++) +00260 { +00261 <span class="comment">// If NULL light, break and continue to next TileLightInfluence.</span> +00262 <span class="keywordflow">if</span>(tli.Light[<a class="code" href="a05373.html#a2">l</a>]== 0xFF) +00263 <span class="keywordflow">break</span>; +00264 <span class="keywordflow">else</span> +00265 { +00266 <span class="comment">// Check good index.</span> +00267 <a class="code" href="a04199.html#a6">nlassert</a>(tli.Light[l] < <a class="code" href="a03730.html#NL3D_1_1CZoner3">_PointLightArray</a>.getPointLights().size()); +00268 <span class="comment">// Remap index, because of light sorting.</span> +00269 tli.Light[<a class="code" href="a05373.html#a2">l</a>]= plRemap[tli.Light[<a class="code" href="a05373.html#a2">l</a>]]; +00270 } +00271 +00272 } +00273 } +00274 } +00275 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZoned0" doxytag="NL3D::CZone::buildBindInfo" ></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::CZone::buildBindInfo </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="mdname" nowrap> <em>patchId</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname" nowrap> <em>edge</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a03730.html">CZone</a> * </td> + <td class="mdname" nowrap> <em>neighborZone</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a03058.html">CPatch::CBindInfo</a> & </td> + <td class="mdname" nowrap> <em>paBind</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><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="a06758.html#l00718">718</a> of file <a class="el" href="a06758.html">3d/zone.cpp</a>. +<p> +References <a class="el" href="a06760.html#l00307">NL3D::CZone::CPatchConnect::BindEdges</a>, <a class="el" href="a06760.html#l00108">NL3D::CPatchInfo::CBindInfo::Edge</a>, <a class="el" href="a06156.html#l00322">NL3D::CPatch::CBindInfo::Edge</a>, <a class="el" href="a06760.html#l00499">getPatch()</a>, <a class="el" href="a06760.html#l00507">getPatchConnect()</a>, <a class="el" href="a06156.html#l00318">NL3D::CPatch::CBindInfo::MultipleBindId</a>, <a class="el" href="a06156.html#l00316">NL3D::CPatch::CBindInfo::MultipleBindNum</a>, <a class="el" href="a06760.html#l00106">NL3D::CPatchInfo::CBindInfo::Next</a>, <a class="el" href="a06156.html#l00321">NL3D::CPatch::CBindInfo::Next</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06156.html#l00312">NL3D::CPatch::CBindInfo::NPatchs</a>, <a class="el" href="a06760.html#l00101">NL3D::CPatchInfo::CBindInfo::NPatchs</a>, <a class="el" href="a06760.html#l00577">PatchConnects</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a06156.html#l00309">NL3D::CPatch::CBindInfo::Zone</a>. +<p> +Referenced by <a class="el" href="a06155.html#l02213">NL3D::CPatch::getBindNeighbor()</a>. +<p> +<div class="fragment"><pre>00719 { +00720 <a class="code" href="a04199.html#a6">nlassert</a>(patchId < <a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>.size()); +00721 <a class="code" href="a04199.html#a6">nlassert</a>(neighborZone); +00722 +00723 CPatchConnect &pc= <a class="code" href="a03730.html#NL3D_1_1CZoner11">PatchConnects</a>[patchId]; +00724 +00725 +00726 <span class="comment">// Get the bind info of this patch to his neighbor on "edge".</span> +00727 CPatchInfo::CBindInfo &pcBind= pc.BindEdges[edge]; +00728 <a class="code" href="a04199.html#a6">nlassert</a>(pcBind.NPatchs==0 || pcBind.NPatchs==1 || pcBind.NPatchs==2 || pcBind.NPatchs==4 || pcBind.NPatchs==5); +00729 +00730 +00731 <span class="comment">// copy zone ptr.</span> +00732 paBind.Zone= neighborZone; +00733 +00734 +00735 <span class="comment">// Special case of a small patch connected to a bigger.</span> +00736 <span class="keywordflow">if</span>(pcBind.NPatchs==5) +00737 { +00738 paBind.NPatchs= 1; +00739 paBind.Next[0]= neighborZone->getPatch(pcBind.Next[0]); +00740 paBind.Edge[0]= pcBind.Edge[0]; +00741 +00742 <span class="comment">// Get the twin bindInfo of pcBind.</span> +00743 <span class="keyword">const</span> CPatchInfo::CBindInfo &pcBindNeighbor= +00744 neighborZone->getPatchConnect(pcBind.Next[0])->BindEdges[pcBind.Edge[0]]; +00745 <span class="comment">// must have a multiple bind. </span> +00746 <a class="code" href="a04199.html#a6">nlassert</a>(pcBindNeighbor.NPatchs == 2 || pcBindNeighbor.NPatchs == 4); +00747 +00748 <span class="comment">// number of bind is stored on the twin bindInfo.</span> +00749 paBind.MultipleBindNum= pcBindNeighbor.NPatchs; +00750 +00751 <span class="comment">// Search our patchId on neighbor;</span> +00752 paBind.MultipleBindId= 255; +00753 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0; i<paBind.MultipleBindNum; i++) +00754 { +00755 <span class="keywordflow">if</span>(pcBindNeighbor.Next[i]==patchId) +00756 paBind.MultipleBindId= i; +00757 } +00758 <a class="code" href="a04199.html#a6">nlassert</a>(paBind.MultipleBindId!= 255); +00759 } +00760 <span class="keywordflow">else</span> +00761 { +00762 paBind.MultipleBindNum= 0; +00763 paBind.NPatchs= pcBind.NPatchs; +00764 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0;i<paBind.NPatchs; i++) +00765 { +00766 paBind.Next[i]= neighborZone->getPatch(pcBind.Next[i]); +00767 paBind.Edge[i]= pcBind.Edge[i]; +00768 } +00769 } +00770 +00771 +00772 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZonea5" doxytag="NL3D::CZone::changePatchTextureAndColor" ></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::CZone::changePatchTextureAndColor </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a14">sint</a> </td> + <td class="mdname" nowrap> <em>numPatch</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const std::vector< <a class="el" href="a03522.html">CTileElement</a> > * </td> + <td class="mdname" nowrap> <em>tiles</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const std::vector< <a class="el" href="a03520.html">CTileColor</a> > * </td> + <td class="mdname" nowrap> <em>colors</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Update and refresh a patch texture. Usefull for Tile edition. Even if patch is in tile mode, it is refreshed... <dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>numPatch</em> </td><td>the index of patch in this zone which will receive his new texture. assert if bad id. </td></tr> + <tr><td valign=top><em>tiles</em> </td><td>the patch texture. assert if not of good size (OrderS*OrderT). Can be NULL if you don't want to change the patch texture. </td></tr> + <tr><td valign=top><em>colors</em> </td><td>the patch texture. assert if not of good size ((OrderS+1)*(OrderT+1)). Can be NULL if you don't want to change the patch colors.</td></tr> + </table> +</dl> + +<p> +Definition at line <a class="el" href="a06758.html#l01279">1279</a> of file <a class="el" href="a06758.html">3d/zone.cpp</a>. +<p> +References <a class="el" href="a06760.html#l00580">_PatchRenderClipped</a>, <a class="el" href="a06760.html#l00562">Compiled</a>, <a class="el" href="a06760.html#l00489">getNumPatchs()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05862.html#l00877">NL3D::CLandscape::unlockBuffers()</a>, <a class="el" href="a05862.html#l00799">NL3D::CLandscape::updateGlobalsAndLockBuffers()</a>, and <a class="el" href="a05862.html#l00896">NL3D::CLandscape::updateTessBlocksFaceVector()</a>. +<p> +<div class="fragment"><pre>01280 { +01281 <a class="code" href="a04199.html#a6">nlassert</a>(numPatch>=0); +01282 <a class="code" href="a04199.html#a6">nlassert</a>(numPatch<<a class="code" href="a03730.html#NL3D_1_1CZonea15">getNumPatchs</a>()); +01283 +01284 +01285 <span class="comment">// Update the patch texture.</span> +01286 <span class="keywordflow">if</span> (tiles) +01287 { +01288 <a class="code" href="a04199.html#a6">nlassert</a>( Patchs[numPatch].Tiles.size() == tiles->size() ); +01289 <a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>[numPatch].Tiles = *tiles; +01290 } +01291 +01292 <span class="comment">// Update the patch colors.</span> +01293 <span class="keywordflow">if</span> (colors) +01294 { +01295 <a class="code" href="a04199.html#a6">nlassert</a>( Patchs[numPatch].TileColors.size() == colors->size() ); +01296 <a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>[numPatch].TileColors = *colors; +01297 } +01298 +01299 <span class="keywordflow">if</span> (<a class="code" href="a03730.html#NL3D_1_1CZoner7">Compiled</a>) +01300 { +01301 <span class="comment">// If the patch is visible, then we must LockBuffers, because new VertexVB may be created.</span> +01302 <span class="keywordflow">if</span>(!<a class="code" href="a03730.html#NL3D_1_1CZoner2">_PatchRenderClipped</a>[numPatch]) +01303 <a class="code" href="a03730.html#NL3D_1_1CZoner8">Landscape</a>->updateGlobalsAndLockBuffers(CVector::Null); +01304 +01305 <span class="comment">// Recompute UVs for new setup of Tiles.</span> +01306 <a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>[numPatch].deleteTileUvs(); +01307 <a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>[numPatch].recreateTileUvs(); +01308 +01309 <span class="comment">// unlockBuffers() if necessary.</span> +01310 <span class="keywordflow">if</span>(!<a class="code" href="a03730.html#NL3D_1_1CZoner2">_PatchRenderClipped</a>[numPatch]) +01311 { +01312 <a class="code" href="a03730.html#NL3D_1_1CZoner8">Landscape</a>->unlockBuffers(); +01313 <span class="comment">// This patch is visible, and TileFaces have been deleted / added.</span> +01314 <span class="comment">// So must update TessBlock.</span> +01315 <a class="code" href="a03730.html#NL3D_1_1CZoner8">Landscape</a>->updateTessBlocksFaceVector(); +01316 } +01317 } +01318 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZonea6" doxytag="NL3D::CZone::clip" ></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::CZone::clip </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const std::vector< <a class="el" href="a03082.html">CPlane</a> > & </td> + <td class="mdname1" valign="top" nowrap> <em>pyramid</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> +Clip a zone. To know if must be rendered etc... A zone is IN if in BACK of at least one plane of the pyramid. +<p> + +<p> +Definition at line <a class="el" href="a06758.html#l00922">922</a> of file <a class="el" href="a06758.html">3d/zone.cpp</a>. +<p> +References <a class="el" href="a06760.html#l00581">_PatchOldRenderClipped</a>, <a class="el" href="a06760.html#l00580">_PatchRenderClipped</a>, <a class="el" href="a05484.html#l00125">NLMISC::CBitSet::clearAll()</a>, <a class="el" href="a05384.html#l00319">NLMISC::CAABBoxExt::clipBack()</a>, <a class="el" href="a05384.html#l00301">NLMISC::CAABBoxExt::clipFront()</a>, <a class="el" href="a03730.html#NL3D_1_1CZoney5NL3D_1_1CZoney0">ClipIn</a>, <a class="el" href="a03730.html#NL3D_1_1CZoney5NL3D_1_1CZoney1">ClipOut</a>, <a class="el" href="a06758.html#l01038">clipPatchs()</a>, <a class="el" href="a06760.html#l00595">ClipResult</a>, <a class="el" href="a03730.html#NL3D_1_1CZoney5NL3D_1_1CZoney2">ClipSide</a>, <a class="el" href="a06760.html#l00562">Compiled</a>, <a class="el" href="a05485.html#l00173">NLMISC::CBitSet::getVector()</a>, <a class="el" href="a05788.html#l00056">H_AUTO</a>, <a class="el" href="a05484.html#l00038">min</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05484.html#l00117">NLMISC::CBitSet::setAll()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00100">uint32</a>, and <a class="el" href="a06760.html#l00563">ZoneBB</a>. +<p> +<div class="fragment"><pre>00923 { +00924 <a class="code" href="a04365.html#a4">H_AUTO</a>( NLMISC_ClipZone ); +00925 +00926 <a class="code" href="a04199.html#a6">nlassert</a>(Compiled); +00927 +00928 <span class="comment">// bkup old ClipResult. NB: by default, it is ClipOut (no VB created).</span> +00929 <a class="code" href="a04558.html#a14">sint</a> oldClipResult= <a class="code" href="a03730.html#NL3D_1_1CZoner6">ClipResult</a>; +00930 +00931 <span class="comment">// Pyramid with only the planes that clip the zone</span> +00932 <span class="keyword">static</span> std::vector<CPlane> patchPyramid(10); +00933 <span class="keyword">static</span> std::vector<uint> patchPyramidIndex(10); +00934 patchPyramidIndex.clear(); +00935 +00936 <span class="comment">// Compute ClipResult.</span> +00937 <span class="comment">//-------------------</span> +00938 ClipResult= <a class="code" href="a03730.html#NL3D_1_1CZoney5NL3D_1_1CZoney0">ClipIn</a>; +00939 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0;i<(<a class="code" href="a04558.html#a14">sint</a>)pyramid.size();i++) +00940 { +00941 <span class="comment">// If entirely out.</span> +00942 <span class="keywordflow">if</span>(!<a class="code" href="a03730.html#NL3D_1_1CZoner14">ZoneBB</a>.<a class="code" href="a02157.html#NLMISC_1_1CAABBoxExtz1914_0">clipBack</a>(pyramid[i])) +00943 { +00944 ClipResult= <a class="code" href="a03730.html#NL3D_1_1CZoney5NL3D_1_1CZoney1">ClipOut</a>; +00945 <span class="comment">// If out of only one plane, out of all.</span> +00946 <span class="keywordflow">break</span>; +00947 } +00948 <span class="comment">// If partially IN (ie not entirely out, and not entirely IN)</span> +00949 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="a03730.html#NL3D_1_1CZoner14">ZoneBB</a>.<a class="code" href="a02157.html#NLMISC_1_1CAABBoxExtz1914_1">clipFront</a>(pyramid[i])) +00950 { +00951 <span class="comment">// Force ClipResult to be ClipSide, and not ClipIn.</span> +00952 ClipResult=<a class="code" href="a03730.html#NL3D_1_1CZoney5NL3D_1_1CZoney2">ClipSide</a>; +00953 <span class="comment">// Append the plane index to list to test</span> +00954 patchPyramidIndex.push_back(i); +00955 } +00956 } +00957 +00958 +00959 <span class="comment">// Easy Clip :)</span> +00960 <span class="keywordflow">if</span>(<a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>.empty()) +00961 { +00962 ClipResult= <a class="code" href="a03730.html#NL3D_1_1CZoney5NL3D_1_1CZoney1">ClipOut</a>; +00963 <span class="comment">// don't need to go below...</span> +00964 <span class="keywordflow">return</span>; +00965 } +00966 +00967 +00968 <span class="comment">// Clip By Patch Pass.</span> +00969 <span class="comment">//--------------------</span> +00970 <span class="keywordflow">if</span>(ClipResult==<a class="code" href="a03730.html#NL3D_1_1CZoney5NL3D_1_1CZoney1">ClipOut</a>) +00971 { +00972 <a class="code" href="a04365.html#a4">H_AUTO</a>( NLMISC_ClipZone_Out ); +00973 +00974 <span class="comment">// Set All RenderClip flags to true.</span> +00975 <a class="code" href="a03730.html#NL3D_1_1CZoner2">_PatchRenderClipped</a>.<a class="code" href="a02272.html#NLMISC_1_1CBitSetz1920_9">setAll</a>(); +00976 } +00977 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(ClipResult==ClipIn) +00978 { +00979 <a class="code" href="a04365.html#a4">H_AUTO</a>( NLMISC_ClipZone_In ); +00980 +00981 <span class="comment">// Set All RenderClip flags to false.</span> +00982 <a class="code" href="a03730.html#NL3D_1_1CZoner2">_PatchRenderClipped</a>.<a class="code" href="a02272.html#NLMISC_1_1CBitSetz1920_2">clearAll</a>(); +00983 } +00984 <span class="keywordflow">else</span> +00985 { +00986 <a class="code" href="a04365.html#a4">H_AUTO</a>( NLMISC_ClipZone_Side ); +00987 +00988 <span class="comment">// Copy only the pyramid planes of interest</span> +00989 patchPyramid.resize(patchPyramidIndex.size()); +00990 <a class="code" href="a04558.html#a15">uint</a> i; +00991 <span class="keywordflow">for</span>(i=0;i<patchPyramidIndex.size();i++) +00992 { +00993 patchPyramid[i]= pyramid[patchPyramidIndex[i]]; +00994 } +00995 +00996 <span class="comment">// clip all patchs with the simplified pyramid</span> +00997 <a class="code" href="a03730.html#NL3D_1_1CZoned1">clipPatchs</a>(patchPyramid); +00998 } +00999 +01000 +01001 <span class="comment">// delete / reallocate / fill VBuffers.</span> +01002 <span class="comment">//-------------------</span> +01003 <span class="comment">// If there is a change in the Clip of the zone, or if patchs may have change (ie ClipSide is undetermined).</span> +01004 <span class="keywordflow">if</span>(oldClipResult!=ClipResult || oldClipResult==<a class="code" href="a03730.html#NL3D_1_1CZoney5NL3D_1_1CZoney2">ClipSide</a>) +01005 { +01006 <span class="comment">// get BitSet as Raw Array of uint32</span> +01007 <a class="code" href="a04558.html#a11">uint32</a> *oldRenderClip= const_cast<uint32*>(&<a class="code" href="a03730.html#NL3D_1_1CZoner1">_PatchOldRenderClipped</a>.<a class="code" href="a02272.html#NLMISC_1_1CBitSeta0">getVector</a>()[0]); +01008 <span class="keyword">const</span> <a class="code" href="a04558.html#a11">uint32</a> *newRenderClip= &<a class="code" href="a03730.html#NL3D_1_1CZoner2">_PatchRenderClipped</a>.<a class="code" href="a02272.html#NLMISC_1_1CBitSeta0">getVector</a>()[0]; +01009 <a class="code" href="a04558.html#a15">uint</a> numPatchs= <a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>.size(); +01010 <span class="comment">// Then, we must test by patch.</span> +01011 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0;i<numPatchs;oldRenderClip++, newRenderClip++) +01012 { +01013 <a class="code" href="a04558.html#a11">uint32</a> oldWord= *oldRenderClip; +01014 <a class="code" href="a04558.html#a11">uint32</a> newWord= *newRenderClip; +01015 <span class="comment">// process at max 32 patch</span> +01016 <a class="code" href="a04558.html#a15">uint</a> maxNumBits= <a class="code" href="a04061.html#a0">min</a>((numPatchs-i), 32U); +01017 <a class="code" href="a04558.html#a11">uint32</a> mask= 1; +01018 <span class="keywordflow">for</span>(;maxNumBits>0;maxNumBits--, mask<<=1, i++) +01019 { +01020 <span class="comment">// same as: if(_PatchOldRenderClipped[i] != _PatchRenderClipped[i])</span> +01021 <span class="keywordflow">if</span>( (oldWord^newWord)&mask ) +01022 { +01023 <span class="comment">// set the flag.</span> +01024 *oldRenderClip&= ~mask; +01025 *oldRenderClip|= newWord&mask; +01026 <span class="comment">// update clip patch</span> +01027 <a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>[i].updateClipPatchVB( (newWord&mask)!=0 ); +01028 } +01029 } +01030 } +01031 +01032 } +01033 +01034 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZoned1" doxytag="NL3D::CZone::clipPatchs" ></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::CZone::clipPatchs </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const std::vector< <a class="el" href="a03082.html">CPlane</a> > & </td> + <td class="mdname1" valign="top" nowrap> <em>pyramid</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="a06758.html#l01038">1038</a> of file <a class="el" href="a06758.html">3d/zone.cpp</a>. +<p> +References <a class="el" href="a06760.html#l00579">_PatchBSpheres</a>, <a class="el" href="a06760.html#l00580">_PatchRenderClipped</a>, <a class="el" href="a05484.html#l00125">NLMISC::CBitSet::clearAll()</a>, <a class="el" href="a05504.html#l00050">NLMISC::CBSphere::clipBack()</a>, <a class="el" href="a05485.html#l00075">NLMISC::CBitSet::set()</a>, <a class="el" href="a05981.html#l00104">sint</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +Referenced by <a class="el" href="a06758.html#l00922">clip()</a>. +<p> +<div class="fragment"><pre>01039 { +01040 <span class="comment">// Init all to Not clipped</span> +01041 <a class="code" href="a03730.html#NL3D_1_1CZoner2">_PatchRenderClipped</a>.<a class="code" href="a02272.html#NLMISC_1_1CBitSetz1920_2">clearAll</a>(); +01042 +01043 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> j=0;j<<a class="code" href="a03730.html#NL3D_1_1CZoner0">_PatchBSpheres</a>.size();j++) +01044 { +01045 <a class="code" href="a02291.html">CBSphere</a> &bSphere= <a class="code" href="a03730.html#NL3D_1_1CZoner0">_PatchBSpheres</a>[j]; +01046 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0;i<(<a class="code" href="a04558.html#a14">sint</a>)pyramid.size();i++) +01047 { +01048 <span class="comment">// If entirely out.</span> +01049 <span class="keywordflow">if</span>(!bSphere.<a class="code" href="a02291.html#NLMISC_1_1CBSpherez1931_0">clipBack</a>(pyramid[i])) +01050 { +01051 <a class="code" href="a03730.html#NL3D_1_1CZoner2">_PatchRenderClipped</a>.<a class="code" href="a02272.html#NLMISC_1_1CBitSetz1920_8">set</a>(j, <span class="keyword">true</span>); +01052 <span class="keywordflow">break</span>; +01053 } +01054 } +01055 } +01056 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZonea7" doxytag="NL3D::CZone::compile" ></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::CZone::compile </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a02702.html">CLandscape</a> * </td> + <td class="mdname" nowrap> <em>landscape</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a05363.html#a362">TZoneMap</a> & </td> + <td class="mdname" nowrap> <em>loadedZones</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Compile a zone. Make it usable for <a class="el" href="a03730.html#NL3D_1_1CZonea6">clip()</a>/refine()/render(). This method do:<ul> +<li>attach this to loadedZones.</li><li>create/link the base vertices (internal..), according to present neigbor zones.</li><li><a class="el" href="a03730.html#NL3D_1_1CZonea7">compile()</a> the patchs.</li><li>bind() the patchs.</li><li><a class="el" href="a03730.html#NL3D_1_1CZoned6">rebindBorder()</a> on neighbor zones.</li></ul> +<p> +A zone must keep a pointer on a landscape, for texture management. NB: assert if already compiled. assert if zone already exist in loadedZones. +<p> +Definition at line <a class="el" href="a06758.html#l00499">499</a> of file <a class="el" href="a06758.html">3d/zone.cpp</a>. +<p> +References <a class="el" href="a06760.html#l00579">_PatchBSpheres</a>, <a class="el" href="a06760.html#l00306">NL3D::CZone::CPatchConnect::BaseVertices</a>, <a class="el" href="a06758.html#l00776">bindPatch()</a>, <a class="el" href="a06155.html#l00257">NL3D::CPatch::buildBBox()</a>, <a class="el" href="a06155.html#l01283">NL3D::CPatch::compile()</a>, <a class="el" href="a06760.html#l00562">Compiled</a>, <a class="el" href="a06760.html#l00305">NL3D::CZone::CPatchConnect::ErrorSize</a>, <a class="el" href="a05385.html#l00090">NLMISC::CAABBox::getCenter()</a>, <a class="el" href="a05385.html#l00096">NLMISC::CAABBox::getRadius()</a>, <a class="el" href="a06760.html#l00058">NL3D::ItZoneMap</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06156.html#l00804">NL3D::CPatch::OrderS</a>, <a class="el" href="a06156.html#l00804">NL3D::CPatch::OrderT</a>, <a class="el" href="a06760.html#l00577">PatchConnects</a>, <a class="el" href="a05981.html#l00104">sint</a>, and <a class="el" href="a06760.html#l00057">NL3D::TZoneMap</a>. +<p> +Referenced by <a class="el" href="a05862.html#l00385">NL3D::CLandscape::addZone()</a>. +<p> +<div class="fragment"><pre>00500 { +00501 <a class="code" href="a04558.html#a14">sint</a> i,j; +00502 <a class="code" href="a05363.html#a362">TZoneMap</a> neighborZones; +00503 +00504 <span class="comment">//nlinfo("Compile Zone: %d \n", (sint32)getZoneId());</span> +00505 +00506 <span class="comment">// Can't compile if compiled.</span> +00507 <a class="code" href="a04199.html#a6">nlassert</a>(!Compiled); +00508 <a class="code" href="a03730.html#NL3D_1_1CZoner8">Landscape</a>= landscape; +00509 +00510 <span class="comment">// Attach this to loadedZones.</span> +00511 <span class="comment">//============================</span> +00512 <a class="code" href="a04199.html#a6">nlassert</a>(loadedZones.find(ZoneId)==loadedZones.end()); +00513 loadedZones[<a class="code" href="a03730.html#NL3D_1_1CZoner15">ZoneId</a>]= <span class="keyword">this</span>; +00514 +00515 <span class="comment">// Create/link the base vertices according to present neigbor zones.</span> +00516 <span class="comment">//============================</span> +00517 <a class="code" href="a03730.html#NL3D_1_1CZoner4">BaseVertices</a>.clear(); +00518 <a class="code" href="a03730.html#NL3D_1_1CZoner4">BaseVertices</a>.resize(NumVertices); +00519 <span class="comment">// First try to link vertices to other.</span> +00520 <span class="keywordflow">for</span>(i=0;i<(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a03730.html#NL3D_1_1CZoner5">BorderVertices</a>.size();i++) +00521 { +00522 <a class="code" href="a04558.html#a14">sint</a> cur= <a class="code" href="a03730.html#NL3D_1_1CZoner5">BorderVertices</a>[i].CurrentVertex; +00523 <a class="code" href="a04558.html#a14">sint</a> vertto= BorderVertices[i].NeighborVertex; +00524 <a class="code" href="a04558.html#a14">sint</a> zoneto= BorderVertices[i].NeighborZoneId; +00525 <a class="code" href="a04199.html#a6">nlassert</a>(cur<NumVertices); +00526 +00527 <span class="keywordflow">if</span>(loadedZones.find(zoneto)!=loadedZones.end()) +00528 { +00529 <a class="code" href="a03730.html#NL3D_1_1CZonea10">CZone</a> *zone; +00530 zone= (*loadedZones.find(zoneto)).second; +00531 <a class="code" href="a04199.html#a6">nlassert</a>(zone!=<span class="keyword">this</span>); +00532 <span class="comment">// insert the zone in the neigborood (if not done...).</span> +00533 neighborZones[zoneto]= zone; +00534 <span class="comment">// Doesn't matter if BaseVertices is already linked to an other zone... </span> +00535 <span class="comment">// This should be the same pointer in this case...</span> +00536 <a class="code" href="a03730.html#NL3D_1_1CZoner4">BaseVertices</a>[cur]= zone->getBaseVertex(vertto); +00537 } +00538 } +00539 <span class="comment">// Else, create unbounded vertices.</span> +00540 <span class="keywordflow">for</span>(i=0;i<(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a03730.html#NL3D_1_1CZoner4">BaseVertices</a>.size();i++) +00541 { +00542 <span class="keywordflow">if</span>(<a class="code" href="a03730.html#NL3D_1_1CZoner4">BaseVertices</a>[i]==NULL) +00543 { +00544 <a class="code" href="a03730.html#NL3D_1_1CZoner4">BaseVertices</a>[i]= <span class="keyword">new</span> CTessBaseVertex; +00545 } +00546 } +00547 +00548 +00549 <span class="comment">// compile() the patchs.</span> +00550 <span class="comment">//======================</span> +00551 <span class="keywordflow">for</span>(j=0;j<(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>.size();j++) +00552 { +00553 <a class="code" href="a03730.html#NL3D_1_1CZonen1">CPatch</a> &pa= <a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>[j]; +00554 CPatchConnect &pc= <a class="code" href="a03730.html#NL3D_1_1CZoner11">PatchConnects</a>[j]; +00555 CTessVertex *baseVertices[4]; +00556 +00557 baseVertices[0]= &(<a class="code" href="a03730.html#NL3D_1_1CZoner4">BaseVertices</a>[pc.BaseVertices[0]]->Vert); +00558 baseVertices[1]= &(BaseVertices[pc.BaseVertices[1]]->Vert); +00559 baseVertices[2]= &(BaseVertices[pc.BaseVertices[2]]->Vert); +00560 baseVertices[3]= &(BaseVertices[pc.BaseVertices[3]]->Vert); +00561 pa.compile(<span class="keyword">this</span>, j, pa.OrderS, pa.OrderT, baseVertices, pc.ErrorSize); +00562 }; +00563 +00564 <span class="comment">// compile() the Clip information for the patchs.</span> +00565 <span class="comment">//======================</span> +00566 <a class="code" href="a03730.html#NL3D_1_1CZoner0">_PatchBSpheres</a>.resize(<a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>.size()); +00567 <span class="keywordflow">for</span>(j=0;j<(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>.size();j++) +00568 { +00569 <a class="code" href="a03730.html#NL3D_1_1CZonen1">CPatch</a> &pa= <a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>[j]; +00570 +00571 <span class="comment">// Buil the BSPhere of the patch.</span> +00572 CAABBox bb= pa.buildBBox(); +00573 <a class="code" href="a03730.html#NL3D_1_1CZoner0">_PatchBSpheres</a>[j].Center= bb.getCenter(); +00574 <a class="code" href="a03730.html#NL3D_1_1CZoner0">_PatchBSpheres</a>[j].Radius= bb.getRadius(); +00575 } +00576 +00577 <span class="comment">// bind() the patchs. (after all compiled).</span> +00578 <span class="comment">//===================</span> +00579 <span class="keywordflow">for</span>(j=0;j<(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>.size();j++) +00580 { +00581 <a class="code" href="a03730.html#NL3D_1_1CZonen1">CPatch</a> &pa= <a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>[j]; +00582 CPatchConnect &pc= <a class="code" href="a03730.html#NL3D_1_1CZoner11">PatchConnects</a>[j]; +00583 +00584 <span class="comment">// bind the patch. This is the original bind, not a rebind.</span> +00585 <a class="code" href="a03730.html#NL3D_1_1CZoneh0">bindPatch</a>(loadedZones, pa, pc, <span class="keyword">false</span>); +00586 } +00587 +00588 +00589 <span class="comment">// rebindBorder() on neighbor zones.</span> +00590 <span class="comment">//==================================</span> +00591 <a class="code" href="a05363.html#a363">ItZoneMap</a> zoneIt; +00592 <span class="comment">// Traverse the neighborood.</span> +00593 <span class="keywordflow">for</span>(zoneIt= neighborZones.begin(); zoneIt!=neighborZones.end(); zoneIt++) +00594 { +00595 (*zoneIt).second->rebindBorder(loadedZones); +00596 } +00597 +00598 <span class="comment">// End!!</span> +00599 <a class="code" href="a03730.html#NL3D_1_1CZoner7">Compiled</a>= <span class="keyword">true</span>; +00600 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZonea8" doxytag="NL3D::CZone::compiled" ></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 NL3D::CZone::compiled </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</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="a06760.html#l00487">487</a> of file <a class="el" href="a06760.html">src/3d/zone.h</a>. +<p> +References <a class="el" href="a06760.html#l00562">Compiled</a>. +<p> +<div class="fragment"><pre>00487 {<span class="keywordflow">return</span> <a class="code" href="a03730.html#NL3D_1_1CZoner7">Compiled</a>;} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZoned2" doxytag="NL3D::CZone::computeBBScaleBias" ></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::CZone::computeBBScaleBias </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a02156.html">CAABBox</a> & </td> + <td class="mdname1" valign="top" nowrap> <em>bb</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="a06758.html#l00099">99</a> of file <a class="el" href="a06758.html">3d/zone.cpp</a>. +<p> +References <a class="el" href="a05385.html#l00199">NLMISC::CAABBoxExt::getCenter()</a>, <a class="el" href="a05385.html#l00200">NLMISC::CAABBoxExt::getHalfSize()</a>, <a class="el" href="a06156.html#l00089">NL3D_NOISE_MAX</a>, <a class="el" href="a06760.html#l00564">PatchBias</a>, <a class="el" href="a06760.html#l00565">PatchScale</a>, <a class="el" href="a05385.html#l00182">NLMISC::CAABBoxExt::setHalfSize()</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::x</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::y</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::z</a>, and <a class="el" href="a06760.html#l00563">ZoneBB</a>. +<p> +Referenced by <a class="el" href="a06758.html#l01452">applyHeightField()</a>, and <a class="el" href="a06758.html#l00122">build()</a>. +<p> +<div class="fragment"><pre>00100 { +00101 <a class="code" href="a03730.html#NL3D_1_1CZoner14">ZoneBB</a>= bb; +00102 <span class="comment">// Take a security for noise. (usefull for zone clipping).</span> +00103 <a class="code" href="a03730.html#NL3D_1_1CZoner14">ZoneBB</a>.<a class="code" href="a02157.html#NLMISC_1_1CAABBoxExtz1910_2">setHalfSize</a>(<a class="code" href="a03730.html#NL3D_1_1CZoner14">ZoneBB</a>.<a class="code" href="a02157.html#NLMISC_1_1CAABBoxExtz1912_2">getHalfSize</a>()+CVector(NL3D_NOISE_MAX, NL3D_NOISE_MAX, NL3D_NOISE_MAX)); +00104 CVector hs= <a class="code" href="a03730.html#NL3D_1_1CZoner14">ZoneBB</a>.<a class="code" href="a02157.html#NLMISC_1_1CAABBoxExtz1912_2">getHalfSize</a>(); +00105 <span class="keywordtype">float</span> rmax= <a class="code" href="a05378.html#a378">maxof</a>(hs.x, hs.y, hs.z); +00106 <a class="code" href="a03730.html#NL3D_1_1CZoner13">PatchScale</a>= rmax / 32760; <span class="comment">// Prevent from float imprecision by taking 32760 and not 32767.</span> +00107 <a class="code" href="a03730.html#NL3D_1_1CZoner10">PatchBias</a>= <a class="code" href="a03730.html#NL3D_1_1CZoner14">ZoneBB</a>.<a class="code" href="a02157.html#NLMISC_1_1CAABBoxExtz1912_1">getCenter</a>(); +00108 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZonea9" doxytag="NL3D::CZone::copyTilesFlags" ></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::CZone::copyTilesFlags </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a14">sint</a> </td> + <td class="mdname" nowrap> <em>destPatchId</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const <a class="el" href="a03057.html">CPatch</a> * </td> + <td class="mdname" nowrap> <em>srcPatch</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Copy the tiles flags from a src patch to a patch of this zone. the patch must match of course... +<p> +Definition at line <a class="el" href="a06758.html#l01542">1542</a> of file <a class="el" href="a06758.html">3d/zone.cpp</a>. +<p> +References <a class="el" href="a06155.html#l02245">NL3D::CPatch::copyTileFlagsFromPatch()</a>, <a class="el" href="a06760.html#l00499">getPatch()</a>, and <a class="el" href="a05981.html#l00104">sint</a>. +<p> +Referenced by <a class="el" href="a06768.html#l01261">NL3D::CZoneLighter::copyTileFlags()</a>. +<p> +<div class="fragment"><pre>01543 { +01544 <a class="code" href="a03730.html#NL3D_1_1CZonen1">CPatch</a> *destPatch = <a class="code" href="a03730.html#NL3D_1_1CZonea16">getPatch</a>(destPatchId); +01545 +01546 destPatch->copyTileFlagsFromPatch(srcPatch); +01547 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZonea11" doxytag="NL3D::CZone::debugBinds" ></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::CZone::debugBinds </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">FILE * </td> + <td class="mdname1" valign="top" nowrap> <em>f</em> = stdout </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> +Debug a zone, print binds in display. +<p> +Definition at line <a class="el" href="a06758.html#l01420">1420</a> of file <a class="el" href="a06758.html">3d/zone.cpp</a>. +<p> +References <a class="el" href="a06760.html#l00307">NL3D::CZone::CPatchConnect::BindEdges</a>, <a class="el" href="a06760.html#l00108">NL3D::CPatchInfo::CBindInfo::Edge</a>, <a class="el" href="a06760.html#l00106">NL3D::CPatchInfo::CBindInfo::Next</a>, <a class="el" href="a06760.html#l00101">NL3D::CPatchInfo::CBindInfo::NPatchs</a>, <a class="el" href="a06760.html#l00577">PatchConnects</a>, <a class="el" href="a05981.html#l00104">sint</a>, and <a class="el" href="a06760.html#l00104">NL3D::CPatchInfo::CBindInfo::ZoneId</a>. +<p> +<div class="fragment"><pre>01421 { +01422 fprintf(f, <span class="stringliteral">"*****************************\n"</span>); +01423 fprintf(f, <span class="stringliteral">"ZoneId: %d. NPatchs:%d\n"</span>, ZoneId, <a class="code" href="a03730.html#NL3D_1_1CZoner11">PatchConnects</a>.size()); +01424 <a class="code" href="a04558.html#a14">sint</a> i; +01425 <span class="keywordflow">for</span>(i=0;i<(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a03730.html#NL3D_1_1CZoner11">PatchConnects</a>.size();i++) +01426 { +01427 CPatchConnect &pc= <a class="code" href="a03730.html#NL3D_1_1CZoner11">PatchConnects</a>[i]; +01428 fprintf(f, <span class="stringliteral">"patch%d:\n"</span>, i); +01429 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> j=0;j<4;j++) +01430 { +01431 CPatchInfo::CBindInfo &bd= pc.BindEdges[j]; +01432 fprintf(f, <span class="stringliteral">" edge%d: Zone:%d. NPatchs:%d. "</span>, j, bd.ZoneId, bd.NPatchs); +01433 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> k=0;k<bd.NPatchs;k++) +01434 { +01435 fprintf(f, <span class="stringliteral">"p%de%d - "</span>, bd.Next[k], bd.Edge[k]); +01436 } +01437 fprintf(f, <span class="stringliteral">"\n"</span>); +01438 } +01439 } +01440 +01441 fprintf(f,<span class="stringliteral">"Vertices :\n"</span>); +01442 <span class="keywordflow">for</span>(i=0;i<(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a03730.html#NL3D_1_1CZoner5">BorderVertices</a>.size();i++) +01443 { +01444 fprintf(f,<span class="stringliteral">"current : %d -> (zone %d) vertex %d\n"</span>,BorderVertices[i].CurrentVertex, +01445 BorderVertices[i].NeighborZoneId, +01446 BorderVertices[i].NeighborVertex); +01447 } +01448 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZonea12" doxytag="NL3D::CZone::excludePatchFromRefineAll" ></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::CZone::excludePatchFromRefineAll </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="mdname" nowrap> <em>patch</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>bool </td> + <td class="mdname" nowrap> <em>exclude</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +This is especially for Pacs. exlude a patch to be <a class="el" href="a03730.html#NL3D_1_1CZonea27">refineAll()</a>ed. +<p> + +<p> +Definition at line <a class="el" href="a06758.html#l01119">1119</a> of file <a class="el" href="a06758.html">3d/zone.cpp</a>. +<p> +References <a class="el" href="a06760.html#l00562">Compiled</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +<div class="fragment"><pre>01120 { +01121 <a class="code" href="a04199.html#a6">nlassert</a>(Compiled); +01122 <a class="code" href="a04199.html#a6">nlassert</a>(patch<<a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>.size()); +01123 +01124 <span class="keywordflow">if</span>(patch>=<a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>.size()) +01125 <span class="keywordflow">return</span>; +01126 +01127 <a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>[patch].ExcludeFromRefineAll= exclude; +01128 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZonea13" doxytag="NL3D::CZone::forceMergeAtTileLevel" ></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::CZone::forceMergeAtTileLevel </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> +For changing TileMaxSubdivision. force tesselation to be under tile. +<p> + +<p> +Definition at line <a class="el" href="a06758.html#l01259">1259</a> of file <a class="el" href="a06758.html">3d/zone.cpp</a>. +<p> +References <a class="el" href="a06155.html#l02022">NL3D::CPatch::forceMergeAtTileLevel()</a>, and <a class="el" href="a05981.html#l00104">sint</a>. +<p> +<div class="fragment"><pre>01260 { +01261 <a class="code" href="a03730.html#NL3D_1_1CZonen1">CPatch</a> *pPatch=0; +01262 <span class="keywordflow">if</span>(<a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>.size()>0) +01263 pPatch= &(*<a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>.begin()); +01264 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> n=(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>.size();n>0;n--, pPatch++) +01265 { +01266 pPatch->forceMergeAtTileLevel(); +01267 } +01268 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZoned3" doxytag="NL3D::CZone::getBaseVertex" ></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="a03408.html">PBaseVertex</a> NL3D::CZone::getBaseVertex </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a14">sint</a> </td> + <td class="mdname1" valign="top" nowrap> <em>vert</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline, 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="a06760.html#l00606">606</a> of file <a class="el" href="a06760.html">src/3d/zone.h</a>. +<p> +References <a class="el" href="a06760.html#l00551">PBaseVertex</a>, and <a class="el" href="a05981.html#l00104">sint</a>. +<p> +<div class="fragment"><pre>00606 {<span class="keywordflow">return</span> <a class="code" href="a03730.html#NL3D_1_1CZoner4">BaseVertices</a>[vert];} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZonea14" doxytag="NL3D::CZone::getLandscape" ></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="a02702.html">CLandscape</a>* NL3D::CZone::getLandscape </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Get the landscape in which is placed this zone. If no landscape, return NULL.<p> +<dl compact><dt><b>Returns:</b></dt><dd>the pointer of the landscape of the zone or NULL if the zone hasn't be compiled.</dd></dl> + +<p> +Definition at line <a class="el" href="a06760.html#l00461">461</a> of file <a class="el" href="a06760.html">src/3d/zone.h</a>. +<p> +Referenced by <a class="el" href="a06158.html#l00136">NL3D::CPatch::computeDisplaceRawInteger()</a>, <a class="el" href="a06155.html#l02186">NL3D::CPatch::getLandscape()</a>, and <a class="el" href="a06519.html#l00465">NL3D::CTextureFar::rebuildPatch()</a>. +<p> +<div class="fragment"><pre>00462 { +00463 <span class="keywordflow">return</span> <a class="code" href="a03730.html#NL3D_1_1CZoner8">Landscape</a>; +00464 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZonea15" doxytag="NL3D::CZone::getNumPatchs" ></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#a14">sint</a> NL3D::CZone::getNumPatchs </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</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="a06760.html#l00489">489</a> of file <a class="el" href="a06760.html">src/3d/zone.h</a>. +<p> +References <a class="el" href="a05981.html#l00104">sint</a>. +<p> +Referenced by <a class="el" href="a06034.html#l00116">NL3D::CMiniCol::addZone()</a>, <a class="el" href="a05862.html#l00385">NL3D::CLandscape::addZone()</a>, <a class="el" href="a06768.html#l02045">NL3D::CZoneLighter::buildZoneInformation()</a>, <a class="el" href="a06758.html#l01279">changePatchTextureAndColor()</a>, <a class="el" href="a05862.html#l02232">NL3D::CLandscape::checkZoneBinds()</a>, <a class="el" href="a06764.html#l00134">NL3D::CZoneCornerSmoother::computeAllCornerSmoothFlags()</a>, <a class="el" href="a06768.html#l01261">NL3D::CZoneLighter::copyTileFlags()</a>, <a class="el" href="a06768.html#l01985">NL3D::CZoneLighter::excludeAllPatchFromRefineAll()</a>, <a class="el" href="a05824.html#l00278">NL3D::CInstanceLighter::excludeAllPatchFromRefineAll()</a>, <a class="el" href="a06758.html#l01347">getPatchColor()</a>, <a class="el" href="a06758.html#l01336">getPatchTexture()</a>, <a class="el" href="a06758.html#l01322">refreshTesselationGeometry()</a>, and <a class="el" href="a05862.html#l00447">NL3D::CLandscape::removeZone()</a>. +<p> +<div class="fragment"><pre>00489 {<span class="keywordflow">return</span> <a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>.size();} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZoned4" doxytag="NL3D::CZone::getPatch" ></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="a03057.html">CPatch</a>* NL3D::CZone::getPatch </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a14">sint</a> </td> + <td class="mdname1" valign="top" nowrap> <em>patch</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline, 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="a06760.html#l00607">607</a> of file <a class="el" href="a06760.html">src/3d/zone.h</a>. +<p> +References <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05981.html#l00104">sint</a>. +<p> +<div class="fragment"><pre>00607 {<a class="code" href="a04199.html#a6">nlassert</a>(patch>=0 && patch<(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>.size()); <span class="keywordflow">return</span> &(<a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>[patch]);} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZonea16" doxytag="NL3D::CZone::getPatch" ></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 <a class="el" href="a03057.html">CPatch</a>* NL3D::CZone::getPatch </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a14">sint</a> </td> + <td class="mdname1" valign="top" nowrap> <em>patch</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Get a read only patch pointer.<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>patch</em> </td><td>the index of patch to get. </td></tr> + </table> +</dl> +<dl compact><dt><b>Returns:</b></dt><dd>A patch pointer in read only.</dd></dl> + +<p> +Definition at line <a class="el" href="a06760.html#l00499">499</a> of file <a class="el" href="a06760.html">src/3d/zone.h</a>. +<p> +References <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05981.html#l00104">sint</a>. +<p> +Referenced by <a class="el" href="a06758.html#l00718">buildBindInfo()</a>, <a class="el" href="a06768.html#l01261">NL3D::CZoneLighter::copyTileFlags()</a>, and <a class="el" href="a06758.html#l01542">copyTilesFlags()</a>. +<p> +<div class="fragment"><pre>00499 {<a class="code" href="a04199.html#a6">nlassert</a>(patch>=0 && patch<(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>.size()); <span class="keywordflow">return</span> &(<a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>[patch]);} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZonea17" doxytag="NL3D::CZone::getPatchBias" ></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 <a class="el" href="a03128.html">CVector</a>& NL3D::CZone::getPatchBias </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</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="a06760.html#l00485">485</a> of file <a class="el" href="a06760.html">src/3d/zone.h</a>. +<p> +References <a class="el" href="a06760.html#l00564">PatchBias</a>. +<p> +Referenced by <a class="el" href="a06155.html#l00192">NL3D::CPatch::unpack()</a>. +<p> +<div class="fragment"><pre>00485 {<span class="keywordflow">return</span> <a class="code" href="a03730.html#NL3D_1_1CZoner10">PatchBias</a>;} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZonea18" doxytag="NL3D::CZone::getPatchBSphere" ></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 <a class="el" href="a02291.html">CBSphere</a> & NL3D::CZone::getPatchBSphere </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>patch</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const</td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Get the Bounding spehere of a patch. Stored in Zone as an array and not in <a class="el" href="a03057.html">CPatch</a> for Fast Memory access consideration during clipping. Work only when zone compiled. +<p> +Definition at line <a class="el" href="a06758.html#l00911">911</a> of file <a class="el" href="a06758.html">3d/zone.cpp</a>. +<p> +References <a class="el" href="a06760.html#l00579">_PatchBSpheres</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +Referenced by <a class="el" href="a06034.html#l00116">NL3D::CMiniCol::addZone()</a>, and <a class="el" href="a05862.html#l03489">NL3D::CLandscape::computeDynamicLighting()</a>. +<p> +<div class="fragment"><pre>00912 { +00913 <span class="keyword">static</span> <a class="code" href="a02291.html">CBSphere</a> dummySphere; +00914 <span class="keywordflow">if</span>(patch<<a class="code" href="a03730.html#NL3D_1_1CZoner0">_PatchBSpheres</a>.size()) +00915 <span class="keywordflow">return</span> <a class="code" href="a03730.html#NL3D_1_1CZoner0">_PatchBSpheres</a>[patch]; +00916 <span class="keywordflow">else</span> +00917 <span class="keywordflow">return</span> dummySphere; +00918 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZonea19" doxytag="NL3D::CZone::getPatchColor" ></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 std::vector< <a class="el" href="a03520.html">CTileColor</a> > & NL3D::CZone::getPatchColor </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a14">sint</a> </td> + <td class="mdname1" valign="top" nowrap> <em>numPatch</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const</td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Get a patch colors Return the color array. <dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>numPatch</em> </td><td>the index of patch in this zone which will get his colors. assert if bad id. </td></tr> + <tr><td valign=top><em>\return</em> </td><td>The tiles the patch colors. The size should be (OrderS+1)*(OrderT+1). </td></tr> + </table> +</dl> +<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a03730.html#NL3D_1_1CZonea16">getPatch()</a></dd></dl> + +<p> +Definition at line <a class="el" href="a06758.html#l01347">1347</a> of file <a class="el" href="a06758.html">3d/zone.cpp</a>. +<p> +References <a class="el" href="a06760.html#l00489">getNumPatchs()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05981.html#l00104">sint</a>. +<p> +<div class="fragment"><pre>01348 { +01349 <a class="code" href="a04199.html#a6">nlassert</a>(numPatch>=0); +01350 <a class="code" href="a04199.html#a6">nlassert</a>(numPatch<<a class="code" href="a03730.html#NL3D_1_1CZonea15">getNumPatchs</a>()); +01351 +01352 <span class="comment">// Update the patch texture.</span> +01353 <span class="keywordflow">return</span> <a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>[numPatch].TileColors; +01354 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZonea20" doxytag="NL3D::CZone::getPatchConnect" ></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 <a class="el" href="a03731.html">CPatchConnect</a>* NL3D::CZone::getPatchConnect </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a14">sint</a> </td> + <td class="mdname1" valign="top" nowrap> <em>patch</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Get a read only patch connect pointer.<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>patch</em> </td><td>the index of patch to get. </td></tr> + </table> +</dl> +<dl compact><dt><b>Returns:</b></dt><dd>A patch pointer in read only.</dd></dl> + +<p> +Definition at line <a class="el" href="a06760.html#l00507">507</a> of file <a class="el" href="a06760.html">src/3d/zone.h</a>. +<p> +References <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06760.html#l00577">PatchConnects</a>, and <a class="el" href="a05981.html#l00104">sint</a>. +<p> +Referenced by <a class="el" href="a06758.html#l00718">buildBindInfo()</a>, <a class="el" href="a05862.html#l02232">NL3D::CLandscape::checkZoneBinds()</a>, and <a class="el" href="a06764.html#l00134">NL3D::CZoneCornerSmoother::computeAllCornerSmoothFlags()</a>. +<p> +<div class="fragment"><pre>00508 {<a class="code" href="a04199.html#a6">nlassert</a>(patch>=0 && patch<(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>.size()); <span class="keywordflow">return</span> &(<a class="code" href="a03730.html#NL3D_1_1CZoner11">PatchConnects</a>[patch]);} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZonea21" doxytag="NL3D::CZone::getPatchScale" ></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 NL3D::CZone::getPatchScale </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</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="a06760.html#l00486">486</a> of file <a class="el" href="a06760.html">src/3d/zone.h</a>. +<p> +References <a class="el" href="a06760.html#l00565">PatchScale</a>. +<p> +Referenced by <a class="el" href="a06155.html#l00192">NL3D::CPatch::unpack()</a>. +<p> +<div class="fragment"><pre>00486 {<span class="keywordflow">return</span> <a class="code" href="a03730.html#NL3D_1_1CZoner13">PatchScale</a>;} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZonea22" doxytag="NL3D::CZone::getPatchTexture" ></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 std::vector< <a class="el" href="a03522.html">CTileElement</a> > & NL3D::CZone::getPatchTexture </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a14">sint</a> </td> + <td class="mdname1" valign="top" nowrap> <em>numPatch</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const</td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Get a patch texture. Return the tile array. <dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>numPatch</em> </td><td>the index of patch in this zone which will get his texture. assert if bad id. </td></tr> + <tr><td valign=top><em>\return</em> </td><td>The tiles the patch texture. The size should be OrderS*OrderT. </td></tr> + </table> +</dl> +<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a03730.html#NL3D_1_1CZonea16">getPatch()</a></dd></dl> + +<p> +Definition at line <a class="el" href="a06758.html#l01336">1336</a> of file <a class="el" href="a06758.html">3d/zone.cpp</a>. +<p> +References <a class="el" href="a06760.html#l00489">getNumPatchs()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05981.html#l00104">sint</a>. +<p> +<div class="fragment"><pre>01337 { +01338 <a class="code" href="a04199.html#a6">nlassert</a>(numPatch>=0); +01339 <a class="code" href="a04199.html#a6">nlassert</a>(numPatch<<a class="code" href="a03730.html#NL3D_1_1CZonea15">getNumPatchs</a>()); +01340 +01341 <span class="comment">// Update the patch texture.</span> +01342 <span class="keywordflow">return</span> <a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>[numPatch].Tiles; +01343 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZonea23" doxytag="NL3D::CZone::getZoneBB" ></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 <a class="el" href="a02157.html">CAABBoxExt</a>& NL3D::CZone::getZoneBB </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</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="a06760.html#l00491">491</a> of file <a class="el" href="a06760.html">src/3d/zone.h</a>. +<p> +References <a class="el" href="a06760.html#l00563">ZoneBB</a>. +<p> +Referenced by <a class="el" href="a06034.html#l00116">NL3D::CMiniCol::addZone()</a>, <a class="el" href="a05862.html#l00385">NL3D::CLandscape::addZone()</a>, <a class="el" href="a06768.html#l02045">NL3D::CZoneLighter::buildZoneInformation()</a>, <a class="el" href="a06768.html#l00920">NL3D::CZoneLighter::light()</a>, and <a class="el" href="a05862.html#l00447">NL3D::CLandscape::removeZone()</a>. +<p> +<div class="fragment"><pre>00491 {<span class="keywordflow">return</span> <a class="code" href="a03730.html#NL3D_1_1CZoner14">ZoneBB</a>;} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZonea24" doxytag="NL3D::CZone::getZoneId" ></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#a9">uint16</a> NL3D::CZone::getZoneId </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</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="a06760.html#l00488">488</a> of file <a class="el" href="a06760.html">src/3d/zone.h</a>. +<p> +References <a class="el" href="a05981.html#l00098">uint16</a>. +<p> +Referenced by <a class="el" href="a05862.html#l00385">NL3D::CLandscape::addZone()</a>, <a class="el" href="a06768.html#l02045">NL3D::CZoneLighter::buildZoneInformation()</a>, <a class="el" href="a05862.html#l02232">NL3D::CLandscape::checkZoneBinds()</a>, <a class="el" href="a06768.html#l01261">NL3D::CZoneLighter::copyTileFlags()</a>, <a class="el" href="a06768.html#l01506">NL3D::CZoneLighter::getNormal()</a>, <a class="el" href="a05874.html#l00265">NL3D::CLandscapeUser::refreshZonesAround()</a>, <a class="el" href="a05862.html#l00447">NL3D::CLandscape::removeZone()</a>, and <a class="el" href="a06758.html#l00289">retrieve()</a>. +<p> +<div class="fragment"><pre>00488 {<span class="keywordflow">return</span> <a class="code" href="a03730.html#NL3D_1_1CZoner15">ZoneId</a>;} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZoneh1" doxytag="NL3D::CZone::getZonePatch" ></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="a03057.html">CPatch</a> * NL3D::CZone::getZonePatch </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a05363.html#a362">TZoneMap</a> & </td> + <td class="mdname" nowrap> <em>loadedZones</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a14">sint</a> </td> + <td class="mdname" nowrap> <em>zoneId</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a14">sint</a> </td> + <td class="mdname" nowrap> <em>patch</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [static, 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="a06758.html#l00705">705</a> of file <a class="el" href="a06758.html">3d/zone.cpp</a>. +<p> +References <a class="el" href="a05981.html#l00104">sint</a>, and <a class="el" href="a06760.html#l00057">NL3D::TZoneMap</a>. +<p> +<div class="fragment"><pre>00706 { +00707 <span class="preprocessor">#ifdef NL3D_DEBUG_DONT_BIND_PATCH</span> +00708 <span class="preprocessor"></span> <span class="keywordflow">return</span> NULL; +00709 <span class="preprocessor">#endif</span> +00710 <span class="preprocessor"></span> <span class="keywordflow">if</span>(loadedZones.find(zoneId)==loadedZones.end()) +00711 <span class="keywordflow">return</span> NULL; +00712 <span class="keywordflow">else</span> +00713 <span class="keywordflow">return</span> (loadedZones[zoneId])->getPatch(patch); +00714 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZonea25" doxytag="NL3D::CZone::isPatchRenderClipped" ></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 NL3D::CZone::isPatchRenderClipped </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>patch</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Is the patch clipped (ie not visible). crash if bad Id. +<p> + +<p> +Definition at line <a class="el" href="a06760.html#l00539">539</a> of file <a class="el" href="a06760.html">src/3d/zone.h</a>. +<p> +References <a class="el" href="a06760.html#l00580">_PatchRenderClipped</a>, <a class="el" href="a05485.html#l00087">NLMISC::CBitSet::get()</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +Referenced by <a class="el" href="a06155.html#l00594">NL3D::CPatch::isRenderClipped()</a>. +<p> +<div class="fragment"><pre>00539 {<span class="keywordflow">return</span> <a class="code" href="a03730.html#NL3D_1_1CZoner2">_PatchRenderClipped</a>.<a class="code" href="a02272.html#NLMISC_1_1CBitSetz1920_3">get</a>(patch);} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZoned5" doxytag="NL3D::CZone::patchOnBorder" ></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 NL3D::CZone::patchOnBorder </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a03731.html">CPatchConnect</a> & </td> + <td class="mdname1" valign="top" nowrap> <em>pc</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<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="a06758.html#l00882">882</a> of file <a class="el" href="a06758.html">3d/zone.cpp</a>. +<p> +References <a class="el" href="a06760.html#l00307">NL3D::CZone::CPatchConnect::BindEdges</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06760.html#l00101">NL3D::CPatchInfo::CBindInfo::NPatchs</a>, <a class="el" href="a05981.html#l00104">sint</a>, and <a class="el" href="a06760.html#l00104">NL3D::CPatchInfo::CBindInfo::ZoneId</a>. +<p> +Referenced by <a class="el" href="a06758.html#l00686">rebindBorder()</a>. +<p> +<div class="fragment"><pre>00883 { +00884 <span class="comment">// If only one of neighbor patch is not of this zone, we are on a border.</span> +00885 +00886 <span class="comment">// Test all edges.</span> +00887 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0;i<4;i++) +00888 { +00889 <span class="keyword">const</span> CPatchInfo::CBindInfo &pcBind= pc.BindEdges[i]; +00890 +00891 <a class="code" href="a04199.html#a6">nlassert</a>(pcBind.NPatchs==0 || pcBind.NPatchs==1 || pcBind.NPatchs==2 || pcBind.NPatchs==4 || pcBind.NPatchs==5); +00892 <span class="keywordflow">if</span>(pcBind.NPatchs>=1) +00893 { +00894 <span class="keywordflow">if</span>(pcBind.ZoneId != <a class="code" href="a03730.html#NL3D_1_1CZoner15">ZoneId</a>) +00895 <span class="keywordflow">return</span> <span class="keyword">true</span>; +00896 } +00897 } +00898 +00899 <span class="keywordflow">return</span> <span class="keyword">false</span>; +00900 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZonea26" doxytag="NL3D::CZone::preRender" ></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::CZone::preRender </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> +PreRender a zone (if needed). +<p> + +<p> +Definition at line <a class="el" href="a06758.html#l01175">1175</a> of file <a class="el" href="a06758.html">3d/zone.cpp</a>. +<p> +References <a class="el" href="a06760.html#l00579">_PatchBSpheres</a>, <a class="el" href="a06760.html#l00580">_PatchRenderClipped</a>, <a class="el" href="a03730.html#NL3D_1_1CZoney5NL3D_1_1CZoney1">ClipOut</a>, <a class="el" href="a06760.html#l00595">ClipResult</a>, <a class="el" href="a03730.html#NL3D_1_1CZoney5NL3D_1_1CZoney2">ClipSide</a>, <a class="el" href="a06760.html#l00562">Compiled</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +<div class="fragment"><pre>01176 { +01177 <a class="code" href="a04199.html#a6">nlassert</a>(Compiled); +01178 +01179 <span class="comment">// Must be 2^X-1.</span> +01180 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="a04558.html#a15">uint</a> updateFarRefineFreq= 15; +01181 <span class="comment">// Take the renderDate here.</span> +01182 <a class="code" href="a04558.html#a15">uint</a> curDateMod= CLandscapeGlobals::CurrentRenderDate & updateFarRefineFreq; +01183 +01184 <span class="comment">// If no patchs, do nothing.</span> +01185 <span class="keywordflow">if</span>(<a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>.empty()) +01186 <span class="keywordflow">return</span>; +01187 +01188 <span class="comment">/* If patchs invisible, must still update their Far Textures,</span> +01189 <span class="comment"> else, there may be slowdown when we turn the head.</span> +01190 <span class="comment"> */</span> +01191 +01192 +01193 <span class="comment">// If all the zone is invisible.</span> +01194 <span class="keywordflow">if</span>(<a class="code" href="a03730.html#NL3D_1_1CZoner6">ClipResult</a>==<a class="code" href="a03730.html#NL3D_1_1CZoney5NL3D_1_1CZoney1">ClipOut</a>) +01195 { +01196 <span class="comment">// No patchs are visible, but maybe update the far textures.</span> +01197 <span class="keywordflow">if</span>( curDateMod==(<a class="code" href="a03730.html#NL3D_1_1CZoner15">ZoneId</a> & updateFarRefineFreq) ) +01198 { +01199 <span class="comment">// updateTextureFarOnly for all patchs.</span> +01200 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0;i<<a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>.size();i++) +01201 { +01202 <a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>[i].updateTextureFarOnly(_PatchBSpheres[i]); +01203 } +01204 } +01205 } +01206 <span class="comment">// else If some patchs only are visible.</span> +01207 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="a03730.html#NL3D_1_1CZoner6">ClipResult</a>==<a class="code" href="a03730.html#NL3D_1_1CZoney5NL3D_1_1CZoney2">ClipSide</a>) +01208 { +01209 <span class="comment">// PreRender Pass, or updateTextureFarOnly(), according to _PatchRenderClipped state.</span> +01210 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0;i<<a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>.size();i++) +01211 { +01212 <span class="comment">// If the patch is visible</span> +01213 <span class="keywordflow">if</span>(!<a class="code" href="a03730.html#NL3D_1_1CZoner2">_PatchRenderClipped</a>[i]) +01214 { +01215 <span class="comment">// Then preRender it.</span> +01216 <a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>[i].preRender(_PatchBSpheres[i]); +01217 } +01218 <span class="keywordflow">else</span> +01219 { +01220 <span class="comment">// else maybe updateFar it.</span> +01221 <span class="comment">// ZoneId+i for better repartition.</span> +01222 <span class="keywordflow">if</span>( curDateMod==((<a class="code" href="a03730.html#NL3D_1_1CZoner15">ZoneId</a>+i) & updateFarRefineFreq) ) +01223 <a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>[i].updateTextureFarOnly(_PatchBSpheres[i]); +01224 } +01225 } +01226 } +01227 <span class="keywordflow">else</span> <span class="comment">// ClipResult==ClipIn</span> +01228 { +01229 <span class="comment">// PreRender Pass for All</span> +01230 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0;i<<a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>.size();i++) +01231 { +01232 <a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>[i].preRender(_PatchBSpheres[i]); +01233 } +01234 } +01235 +01236 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZoned6" doxytag="NL3D::CZone::rebindBorder" ></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::CZone::rebindBorder </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a05363.html#a362">TZoneMap</a> & </td> + <td class="mdname1" valign="top" nowrap> <em>loadedZones</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> +Force border patchs (those who don't bind to current zone) to re bind() them, using new neighborood. no-op if zone is not compiled. +<p> +Definition at line <a class="el" href="a06758.html#l00686">686</a> of file <a class="el" href="a06758.html">3d/zone.cpp</a>. +<p> +References <a class="el" href="a06758.html#l00776">bindPatch()</a>, <a class="el" href="a06760.html#l00577">PatchConnects</a>, <a class="el" href="a06758.html#l00882">patchOnBorder()</a>, <a class="el" href="a05981.html#l00104">sint</a>, and <a class="el" href="a06760.html#l00057">NL3D::TZoneMap</a>. +<p> +<div class="fragment"><pre>00687 { +00688 <a class="code" href="a04558.html#a14">sint</a> j; +00689 +00690 <span class="comment">// rebind patchs which are on border.</span> +00691 <span class="keywordflow">for</span>(j=0;j<(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>.size();j++) +00692 { +00693 <a class="code" href="a03730.html#NL3D_1_1CZonen1">CPatch</a> &pa= <a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>[j]; +00694 CPatchConnect &pc= <a class="code" href="a03730.html#NL3D_1_1CZoner11">PatchConnects</a>[j]; +00695 +00696 <span class="keywordflow">if</span>(<a class="code" href="a03730.html#NL3D_1_1CZoned5">patchOnBorder</a>(pc)) +00697 { +00698 <span class="comment">// rebind the patch. This is a rebind.</span> +00699 <a class="code" href="a03730.html#NL3D_1_1CZoneh0">bindPatch</a>(loadedZones, pa, pc, <span class="keyword">true</span>); +00700 } +00701 } +00702 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZonea27" doxytag="NL3D::CZone::refineAll" ></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::CZone::refineAll </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> +force Refine a zone. +<p> + +<p> +Definition at line <a class="el" href="a06758.html#l01132">1132</a> of file <a class="el" href="a06758.html">3d/zone.cpp</a>. +<p> +References <a class="el" href="a06760.html#l00562">Compiled</a>, <a class="el" href="a06156.html#l00807">NL3D::CPatch::ExcludeFromRefineAll</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06155.html#l01493">NL3D::CPatch::refineAll()</a>, and <a class="el" href="a05981.html#l00104">sint</a>. +<p> +<div class="fragment"><pre>01133 { +01134 <a class="code" href="a04199.html#a6">nlassert</a>(Compiled); +01135 +01136 <span class="comment">// Fuck stlport....</span> +01137 <span class="keywordflow">if</span>(<a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>.size()==0) +01138 <span class="keywordflow">return</span>; +01139 +01140 <span class="comment">// DO NOT do a forceNoRenderClip(), to avoid big allocation of Near/Far VB vertices in driver.</span> +01141 <span class="comment">// DO NOT modify ClipResult, to avoid big allocation of Near/Far VB vertices in driver.</span> +01142 +01143 <span class="comment">// refine ALL patchs (even those which may be invisible).</span> +01144 <a class="code" href="a03730.html#NL3D_1_1CZonen1">CPatch</a> *pPatch= &(*<a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>.begin()); +01145 <a class="code" href="a04558.html#a14">sint</a> n; +01146 <span class="keywordflow">for</span>(n=(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>.size();n>0;n--, pPatch++) +01147 { +01148 <span class="comment">// For Pacs construction: may exclude some patch from refineAll (for speed improvement).</span> +01149 <span class="keywordflow">if</span>(!pPatch->ExcludeFromRefineAll) +01150 pPatch->refineAll(); +01151 } +01152 +01153 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZonea28" doxytag="NL3D::CZone::refreshTesselationGeometry" ></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::CZone::refreshTesselationGeometry </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a14">sint</a> </td> + <td class="mdname1" valign="top" nowrap> <em>numPatch</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> +refresh the geometry (re-compute vertices). Usefull for Tile Noise edition. Do it after calling <a class="el" href="a03730.html#NL3D_1_1CZonea5">changePatchTextureAndColor()</a>. NB: a <a class="el" href="a03730.html#NL3D_1_1CZonea28">refreshTesselationGeometry()</a> should be done on All patchs, and all direct neighbors of this patch (including patchs on corners). WARNING: specially coded for Tile edition. Result is not perfect:<ul> +<li>only EndPos of tesselation is modified. because Tile edition always subdivide at max.</li><li>Pos=EndPos. because TileEdition always subdivide at max, and don't refine...</li><li>TessBlocks BSphere may be too big. Clip is worse (too big), but doesn't matter. <dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>numPatch</em> </td><td>the index of patch in this zone. assert if bad id.</td></tr> + </table> +</dl> +</li></ul> + +<p> +Definition at line <a class="el" href="a06758.html#l01322">1322</a> of file <a class="el" href="a06758.html">3d/zone.cpp</a>. +<p> +References <a class="el" href="a05863.html#l00719">NL3D::CLandscape::_RenderMustRefillVB</a>, <a class="el" href="a06760.html#l00562">Compiled</a>, <a class="el" href="a06760.html#l00489">getNumPatchs()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05981.html#l00104">sint</a>. +<p> +<div class="fragment"><pre>01323 { +01324 <a class="code" href="a04199.html#a6">nlassert</a>(numPatch>=0); +01325 <a class="code" href="a04199.html#a6">nlassert</a>(numPatch<<a class="code" href="a03730.html#NL3D_1_1CZonea15">getNumPatchs</a>()); +01326 <a class="code" href="a04199.html#a6">nlassert</a>(Compiled); +01327 +01328 <span class="comment">// At next render, we must re-fill the entire unclipped VB, so change are taken into account.</span> +01329 <a class="code" href="a03730.html#NL3D_1_1CZoner8">Landscape</a>->_RenderMustRefillVB= <span class="keyword">true</span>; +01330 +01331 <a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>[numPatch].refreshTesselationGeometry(); +01332 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZonea29" doxytag="NL3D::CZone::release" ></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::CZone::release </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a05363.html#a362">TZoneMap</a> & </td> + <td class="mdname1" valign="top" nowrap> <em>loadedZones</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> +Release a zone. This method do:<ul> +<li>detach this zone to loadedZones.</li><li>destroy/unlink the base vertices (internal..), according to present neigbor zones.</li><li>unbind() the patchs.</li><li><a class="el" href="a03730.html#NL3D_1_1CZonea29">release()</a> the patchs.</li><li><a class="el" href="a03730.html#NL3D_1_1CZoned6">rebindBorder()</a> on neighbor zones.</li></ul> +<p> +NB: no-op if not compiled. +<p> +Definition at line <a class="el" href="a06758.html#l00603">603</a> of file <a class="el" href="a06758.html">3d/zone.cpp</a>. +<p> +References <a class="el" href="a03730.html#NL3D_1_1CZoney5NL3D_1_1CZoney1">ClipOut</a>, <a class="el" href="a06760.html#l00595">ClipResult</a>, <a class="el" href="a06760.html#l00562">Compiled</a>, <a class="el" href="a06760.html#l00058">NL3D::ItZoneMap</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06155.html#l00115">NL3D::CPatch::release()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06760.html#l00057">NL3D::TZoneMap</a>, and <a class="el" href="a06758.html#l00868">unbindPatch()</a>. +<p> +Referenced by <a class="el" href="a05862.html#l00447">NL3D::CLandscape::removeZone()</a>. +<p> +<div class="fragment"><pre>00604 { +00605 <a class="code" href="a04558.html#a14">sint</a> i,j; +00606 +00607 <span class="keywordflow">if</span>(!<a class="code" href="a03730.html#NL3D_1_1CZoner7">Compiled</a>) +00608 <span class="keywordflow">return</span>; +00609 +00610 <span class="comment">// detach this zone to loadedZones.</span> +00611 <span class="comment">//=================================</span> +00612 <a class="code" href="a04199.html#a6">nlassert</a>(loadedZones.find(ZoneId)!=loadedZones.end()); +00613 loadedZones.erase(ZoneId); +00614 <span class="comment">// It doesn't server to unbindPatch(), since patch is not binded to neigbors.</span> +00615 +00616 +00617 <span class="comment">// unbind() the patchs.</span> +00618 <span class="comment">//=====================</span> +00619 <span class="keywordflow">for</span>(j=0;j<(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>.size();j++) +00620 { +00621 <a class="code" href="a03730.html#NL3D_1_1CZonen1">CPatch</a> &pa= <a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>[j]; +00622 <a class="code" href="a03730.html#NL3D_1_1CZoneh2">unbindPatch</a>(pa); +00623 } +00624 +00625 +00626 <span class="comment">// rebindBorder() on neighbor zones.</span> +00627 <span class="comment">//==================================</span> +00628 <span class="comment">// Build the nieghborood.</span> +00629 <a class="code" href="a05363.html#a362">TZoneMap</a> neighborZones; +00630 <span class="keywordflow">for</span>(i=0;i<(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a03730.html#NL3D_1_1CZoner5">BorderVertices</a>.size();i++) +00631 { +00632 <a class="code" href="a04558.html#a14">sint</a> cur= <a class="code" href="a03730.html#NL3D_1_1CZoner5">BorderVertices</a>[i].CurrentVertex; +00633 <a class="code" href="a04558.html#a14">sint</a> zoneto= BorderVertices[i].NeighborZoneId; +00634 <a class="code" href="a04199.html#a6">nlassert</a>(cur<NumVertices); +00635 +00636 <span class="keywordflow">if</span>(loadedZones.find(zoneto)!=loadedZones.end()) +00637 { +00638 <a class="code" href="a03730.html#NL3D_1_1CZonea10">CZone</a> *zone; +00639 zone= (*loadedZones.find(zoneto)).second; +00640 <a class="code" href="a04199.html#a6">nlassert</a>(zone!=<span class="keyword">this</span>); +00641 <span class="comment">// insert the zone in the neigborood (if not done...).</span> +00642 neighborZones[zoneto]= zone; +00643 } +00644 } +00645 <span class="comment">// rebind borders.</span> +00646 <a class="code" href="a05363.html#a363">ItZoneMap</a> zoneIt; +00647 <span class="comment">// Traverse the neighborood.</span> +00648 <span class="keywordflow">for</span>(zoneIt= neighborZones.begin(); zoneIt!=neighborZones.end(); zoneIt++) +00649 { +00650 <span class="comment">// Since </span> +00651 (*zoneIt).second->rebindBorder(loadedZones); +00652 } +00653 +00654 +00655 <span class="comment">// release() the patchs.</span> +00656 <span class="comment">//======================</span> +00657 <span class="comment">// unbind() need compiled neigbor patchs, so do the release after all unbind (so after rebindBorder() too...).</span> +00658 <span class="keywordflow">for</span>(j=0;j<(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>.size();j++) +00659 { +00660 <a class="code" href="a03730.html#NL3D_1_1CZonen1">CPatch</a> &pa= <a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>[j]; +00661 pa.release(); +00662 } +00663 +00664 +00665 <span class="comment">// destroy/unlink the base vertices (internal..), according to present neigbor zones.</span> +00666 <span class="comment">//=================================</span> +00667 <span class="comment">// Just release the smartptrs (easy!!). Do it after patchs released...</span> +00668 <a class="code" href="a03730.html#NL3D_1_1CZoner4">BaseVertices</a>.clear(); +00669 +00670 +00671 <span class="comment">// End!!</span> +00672 <a class="code" href="a03730.html#NL3D_1_1CZoner7">Compiled</a>= <span class="keyword">false</span>; +00673 <a class="code" href="a03730.html#NL3D_1_1CZoner8">Landscape</a>= NULL; +00674 <a class="code" href="a03730.html#NL3D_1_1CZoner6">ClipResult</a>= <a class="code" href="a03730.html#NL3D_1_1CZoney5NL3D_1_1CZoney1">ClipOut</a>; +00675 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZonea30" doxytag="NL3D::CZone::resetRenderFarAndDeleteVBFV" ></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::CZone::resetRenderFarAndDeleteVBFV </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="a06758.html#l01240">1240</a> of file <a class="el" href="a06758.html">3d/zone.cpp</a>. +<p> +References <a class="el" href="a06760.html#l00580">_PatchRenderClipped</a>, <a class="el" href="a05485.html#l00075">NLMISC::CBitSet::set()</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +<div class="fragment"><pre>01241 { +01242 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0;i<<a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>.size();i++) +01243 { +01244 <span class="comment">// If patch is visible</span> +01245 <span class="keywordflow">if</span>(!<a class="code" href="a03730.html#NL3D_1_1CZoner2">_PatchRenderClipped</a>[i]) +01246 { +01247 <span class="comment">// release VertexBuffer, and FaceBuffer</span> +01248 <a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>[i].deleteVBAndFaceVector(); +01249 <span class="comment">// Flag.</span> +01250 <a class="code" href="a03730.html#NL3D_1_1CZoner2">_PatchRenderClipped</a>.<a class="code" href="a02272.html#NLMISC_1_1CBitSetz1920_8">set</a>(i, <span class="keyword">true</span>); +01251 } +01252 +01253 <a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>[i].resetRenderFar(); +01254 } +01255 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZonea31" doxytag="NL3D::CZone::retrieve" ></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::CZone::retrieve </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">std::vector< <a class="el" href="a03066.html">CPatchInfo</a> > & </td> + <td class="mdname" nowrap> <em>patchs</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>std::vector< <a class="el" href="a02290.html">CBorderVertex</a> > & </td> + <td class="mdname" nowrap> <em>borderVertices</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Retrieve zone patchinfo. Deprecated. Should use <a class="el" href="a03730.html#NL3D_1_1CZonea32">retrieve(CZoneInfo &)</a> instead. see this method. +<p> +Definition at line <a class="el" href="a06758.html#l00278">278</a> of file <a class="el" href="a06758.html">3d/zone.cpp</a>. +<p> +References <a class="el" href="a06760.html#l00274">NL3D::CZoneInfo::BorderVertices</a>, <a class="el" href="a06760.html#l00269">NL3D::CZoneInfo::Patchs</a>, and <a class="el" href="a06758.html#l00289">retrieve()</a>. +<p> +<div class="fragment"><pre>00279 { +00280 CZoneInfo zinfo; +00281 +00282 <a class="code" href="a03730.html#NL3D_1_1CZonea32">retrieve</a>(zinfo); +00283 +00284 patchs= zinfo.Patchs; +00285 borderVertices= zinfo.BorderVertices; +00286 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZonea32" doxytag="NL3D::CZone::retrieve" ></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::CZone::retrieve </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a03738.html">CZoneInfo</a> & </td> + <td class="mdname1" valign="top" nowrap> <em>zoneInfo</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> +Retrieve zone patchinfo. This method uncompress the patchs coordinates and all info into the patch info/borderVertices. Warning!!! Due to compression, data won't be the same as those given in <a class="el" href="a03730.html#NL3D_1_1CZonea4">build()</a>. Same remark for TileLightInfluences, due to light sorting. +<p> +Definition at line <a class="el" href="a06758.html#l00289">289</a> of file <a class="el" href="a06758.html">3d/zone.cpp</a>. +<p> +References <a class="el" href="a06760.html#l00306">NL3D::CZone::CPatchConnect::BaseVertices</a>, <a class="el" href="a06760.html#l00126">NL3D::CPatchInfo::BaseVertices</a>, <a class="el" href="a06760.html#l00307">NL3D::CZone::CPatchConnect::BindEdges</a>, <a class="el" href="a06760.html#l00236">NL3D::CPatchInfo::BindEdges</a>, <a class="el" href="a06760.html#l00274">NL3D::CZoneInfo::BorderVertices</a>, <a class="el" href="a06760.html#l00305">NL3D::CZone::CPatchConnect::ErrorSize</a>, <a class="el" href="a06760.html#l00124">NL3D::CPatchInfo::ErrorSize</a>, <a class="el" href="a06156.html#l00840">NL3D::CPatch::Flags</a>, <a class="el" href="a06760.html#l00130">NL3D::CPatchInfo::Flags</a>, <a class="el" href="a06158.html#l00962">NL3D::CPatch::getCornerSmoothFlag()</a>, <a class="el" href="a06187.html#l00063">NL3D::CPointLightNamedArray::getPointLights()</a>, <a class="el" href="a06760.html#l00488">getZoneId()</a>, <a class="el" href="a05479.html#l00081">NL3D::CBezierPatch::Interiors</a>, <a class="el" href="a06156.html#l00329">NL3D::CPatch::Interiors</a>, <a class="el" href="a06760.html#l00161">NL3D::CPatchInfo::Lumels</a>, <a class="el" href="a06156.html#l00057">NL_PATCH_SMOOTH_FLAG_MASK</a>, <a class="el" href="a06156.html#l00056">NL_PATCH_SMOOTH_FLAG_SHIFT</a>, <a class="el" href="a06156.html#l00352">NL3D::CPatch::NoiseRotation</a>, <a class="el" href="a06760.html#l00134">NL3D::CPatchInfo::NoiseRotation</a>, <a class="el" href="a06760.html#l00122">NL3D::CPatchInfo::OrderS</a>, <a class="el" href="a06156.html#l00804">NL3D::CPatch::OrderS</a>, <a class="el" href="a06760.html#l00122">NL3D::CPatchInfo::OrderT</a>, <a class="el" href="a06156.html#l00804">NL3D::CPatch::OrderT</a>, <a class="el" href="a06760.html#l00120">NL3D::CPatchInfo::Patch</a>, <a class="el" href="a06760.html#l00564">PatchBias</a>, <a class="el" href="a06760.html#l00577">PatchConnects</a>, <a class="el" href="a06760.html#l00269">NL3D::CZoneInfo::Patchs</a>, <a class="el" href="a06760.html#l00565">PatchScale</a>, <a class="el" href="a06760.html#l00279">NL3D::CZoneInfo::PointLights</a>, <a class="el" href="a06758.html#l00056">NL3D::CPatchInfo::setCornerSmoothFlag()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05479.html#l00079">NL3D::CBezierPatch::Tangents</a>, <a class="el" href="a06156.html#l00328">NL3D::CPatch::Tangents</a>, <a class="el" href="a06156.html#l00343">NL3D::CPatch::TileColors</a>, <a class="el" href="a06760.html#l00155">NL3D::CPatchInfo::TileColors</a>, <a class="el" href="a06156.html#l00346">NL3D::CPatch::TileLightInfluences</a>, <a class="el" href="a06760.html#l00171">NL3D::CPatchInfo::TileLightInfluences</a>, <a class="el" href="a06156.html#l00340">NL3D::CPatch::Tiles</a>, <a class="el" href="a06760.html#l00149">NL3D::CPatchInfo::Tiles</a>, <a class="el" href="a06156.html#l00121">NL3D::CVector3s::unpack()</a>, <a class="el" href="a06157.html#l00170">NL3D::CPatch::unpackShadowMap()</a>, <a class="el" href="a05479.html#l00077">NL3D::CBezierPatch::Vertices</a>, <a class="el" href="a06156.html#l00327">NL3D::CPatch::Vertices</a>, and <a class="el" href="a06760.html#l00267">NL3D::CZoneInfo::ZoneId</a>. +<p> +Referenced by <a class="el" href="a06768.html#l00920">NL3D::CZoneLighter::light()</a>, and <a class="el" href="a06758.html#l00278">retrieve()</a>. +<p> +<div class="fragment"><pre>00290 { +00291 <a class="code" href="a04558.html#a14">sint</a> i,j; +00292 +00293 <span class="comment">// Ref on input.</span> +00294 std::vector<CPatchInfo> &patchs= zoneInfo.Patchs; +00295 std::vector<CBorderVertex> &borderVertices= zoneInfo.BorderVertices; +00296 <span class="comment">// Copy zoneId.</span> +00297 zoneInfo.ZoneId= <a class="code" href="a03730.html#NL3D_1_1CZonea24">getZoneId</a>(); +00298 +00299 +00300 <span class="comment">// uncompress Patchs.</span> +00301 <span class="comment">//=========================</span> +00302 patchs.resize(<a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>.size()); +00303 <span class="keywordflow">for</span>(j=0;j<(<a class="code" href="a04558.html#a14">sint</a>)patchs.size();j++) +00304 { +00305 CPatchInfo &pi= patchs[j]; +00306 CBezierPatch &p= pi.Patch; +00307 <a class="code" href="a03730.html#NL3D_1_1CZonen1">CPatch</a> &pa= <a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>[j]; +00308 CPatchConnect &pc= <a class="code" href="a03730.html#NL3D_1_1CZoner11">PatchConnects</a>[j]; +00309 +00310 +00311 <span class="comment">// Smoothing flags</span> +00312 pi.Flags= (pa.Flags&<a class="code" href="a04733.html#a5">NL_PATCH_SMOOTH_FLAG_MASK</a>)>><a class="code" href="a04733.html#a4">NL_PATCH_SMOOTH_FLAG_SHIFT</a>; +00313 +00314 +00315 <span class="comment">// Noise Data</span> +00316 <span class="comment">// copy noise rotation.</span> +00317 pi.NoiseRotation= pa.NoiseRotation; +00318 <span class="comment">// copy all noise smoothing info.</span> +00319 <span class="keywordflow">for</span>(i=0;i<4;i++) +00320 { +00321 pi.setCornerSmoothFlag(i, pa.getCornerSmoothFlag(i)); +00322 } +00323 +00324 +00325 <span class="comment">// re-Build the uncompressed bezier patch.</span> +00326 <span class="keywordflow">for</span>(i=0;i<4;i++) +00327 pa.Vertices[i].unpack(p.Vertices[i], PatchBias, PatchScale); +00328 <span class="keywordflow">for</span>(i=0;i<8;i++) +00329 pa.Tangents[i].unpack(p.Tangents[i], PatchBias, PatchScale); +00330 <span class="keywordflow">for</span>(i=0;i<4;i++) +00331 pa.Interiors[i].unpack(p.Interiors[i], PatchBias, PatchScale); +00332 pi.Tiles= pa.Tiles; +00333 pi.TileColors= pa.TileColors; +00334 pi.TileLightInfluences= pa.TileLightInfluences; +00335 pi.Lumels.resize ((pa.OrderS*4)*(pa.OrderT*4)); +00336 pi.Flags=(pa.Flags&<a class="code" href="a04733.html#a5">NL_PATCH_SMOOTH_FLAG_MASK</a>)>><a class="code" href="a04733.html#a4">NL_PATCH_SMOOTH_FLAG_SHIFT</a>; +00337 +00338 <span class="comment">// Unpack the lumel map</span> +00339 pa.unpackShadowMap (&pi.Lumels[0]); +00340 +00341 <span class="comment">// from the patchConnect.</span> +00342 pi.OrderS= pa.OrderS; +00343 pi.OrderT= pa.OrderT; +00344 pi.ErrorSize= pc.ErrorSize; +00345 <span class="keywordflow">for</span>(i=0;i<4;i++) +00346 { +00347 pi.BaseVertices[i]= pc.BaseVertices[i]; +00348 } +00349 <span class="keywordflow">for</span>(i=0;i<4;i++) +00350 pi.BindEdges[i]= pc.BindEdges[i]; +00351 } +00352 +00353 <span class="comment">// retrieve bordervertices.</span> +00354 <span class="comment">//=========================</span> +00355 borderVertices= <a class="code" href="a03730.html#NL3D_1_1CZoner5">BorderVertices</a>; +00356 +00357 <span class="comment">// retrieve PointLights.</span> +00358 <span class="comment">//=========================</span> +00359 zoneInfo.PointLights= <a class="code" href="a03730.html#NL3D_1_1CZoner3">_PointLightArray</a>.getPointLights(); +00360 +00361 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZonea33" doxytag="NL3D::CZone::serial" ></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::CZone::serial </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a02270.html">NLMISC::IStream</a> & </td> + <td class="mdname1" valign="top" nowrap> <em>f</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> +Load/save a zone. Save work even if zone is not compiled, but load must be done on a not compiled zone... +<p> +Definition at line <a class="el" href="a06758.html#l00432">432</a> of file <a class="el" href="a06758.html">3d/zone.cpp</a>. +<p> +References <a class="el" href="a06760.html#l00581">_PatchOldRenderClipped</a>, <a class="el" href="a06760.html#l00580">_PatchRenderClipped</a>, <a class="el" href="a06463.html#l00064">NLMISC::IStream::isReading()</a>, <a class="el" href="a06760.html#l00564">PatchBias</a>, <a class="el" href="a06760.html#l00577">PatchConnects</a>, <a class="el" href="a06760.html#l00565">PatchScale</a>, <a class="el" href="a05484.html#l00081">NLMISC::CBitSet::resize()</a>, <a class="el" href="a06462.html#l00232">NLMISC::IStream::serial()</a>, <a class="el" href="a06462.html#l00520">NLMISC::IStream::serialCheck()</a>, <a class="el" href="a06462.html#l00324">NLMISC::IStream::serialCont()</a>, <a class="el" href="a06461.html#l00266">NLMISC::IStream::serialVersion()</a>, <a class="el" href="a05484.html#l00117">NLMISC::CBitSet::setAll()</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00100">uint32</a>, <a class="el" href="a06462.html#l00759">NLMISC::IStream::xmlPop()</a>, <a class="el" href="a06462.html#l00701">NLMISC::IStream::xmlPush()</a>, <a class="el" href="a06462.html#l00647">NLMISC::IStream::xmlSerial()</a>, and <a class="el" href="a06760.html#l00563">ZoneBB</a>. +<p> +Referenced by <a class="el" href="a06770.html#l00244">NL3D::CZoneLoadingTask::run()</a>. +<p> +<div class="fragment"><pre>00433 { +00434 <span class="comment">/*</span> +00435 <span class="comment"> Version 4:</span> +00436 <span class="comment"> - PointLights</span> +00437 <span class="comment"> Version 3:</span> +00438 <span class="comment"> - Lumels compression version 2.</span> +00439 <span class="comment"> Version 2:</span> +00440 <span class="comment"> - Lumels.</span> +00441 <span class="comment"> Version 1:</span> +00442 <span class="comment"> - Tile color.</span> +00443 <span class="comment"> Version 0:</span> +00444 <span class="comment"> - base verison.</span> +00445 <span class="comment"> */</span> +00446 <a class="code" href="a04558.html#a15">uint</a> ver= f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2035_8">serialVersion</a>(4); +00447 +00448 <span class="comment">// No more compatibility before version 3</span> +00449 <span class="keywordflow">if</span> (ver<3) +00450 { +00451 <span class="keywordflow">throw</span> <a class="code" href="a03798.html">EOlderStream</a>(f); +00452 } +00453 +00454 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2035_0">serialCheck</a>((<a class="code" href="a04558.html#a11">uint32</a>)'ENOZ'); +00455 +00456 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2037_3">xmlSerial</a> (ZoneId, <span class="stringliteral">"ZONE_ID"</span>); +00457 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2037_3">xmlSerial</a> (ZoneBB, <span class="stringliteral">"BB"</span>); +00458 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2037_3">xmlSerial</a> (PatchBias, <span class="stringliteral">"PATCH_BIAS"</span>); +00459 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2037_3">xmlSerial</a> (PatchScale, <span class="stringliteral">"PATCH_SCALE"</span>); +00460 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2037_3">xmlSerial</a> (NumVertices, <span class="stringliteral">"NUM_VERTICES"</span>); +00461 +00462 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2038_0">xmlPush</a> (<span class="stringliteral">"BORDER_VERTICES"</span>); +00463 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2033_9">serialCont</a>(BorderVertices); +00464 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2039_2">xmlPop</a> (); +00465 +00466 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2038_0">xmlPush</a> (<span class="stringliteral">"PATCHES"</span>); +00467 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2033_9">serialCont</a>(Patchs); +00468 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2039_2">xmlPop</a> (); +00469 +00470 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2038_0">xmlPush</a> (<span class="stringliteral">"PATCH_CONNECTS"</span>); +00471 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2033_9">serialCont</a>(PatchConnects); +00472 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2039_2">xmlPop</a> (); +00473 +00474 <span class="keywordflow">if</span> (ver>=4) +00475 { +00476 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2038_0">xmlPush</a> (<span class="stringliteral">"POINT_LIGHTS"</span>); +00477 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(_PointLightArray); +00478 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2039_2">xmlPop</a> (); +00479 } +00480 +00481 <span class="comment">// If read, must create and init Patch Clipped state to true (clipped even if not compiled)</span> +00482 <span class="keywordflow">if</span>(f.<a class="code" href="a02270.html#NLMISC_1_1IStreama0">isReading</a>()) +00483 { +00484 <a class="code" href="a03730.html#NL3D_1_1CZoner2">_PatchRenderClipped</a>.<a class="code" href="a02272.html#NLMISC_1_1CBitSetz1920_5">resize</a>(<a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>.size()); +00485 <a class="code" href="a03730.html#NL3D_1_1CZoner1">_PatchOldRenderClipped</a>.<a class="code" href="a02272.html#NLMISC_1_1CBitSetz1920_5">resize</a>(<a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>.size()); +00486 <a class="code" href="a03730.html#NL3D_1_1CZoner2">_PatchRenderClipped</a>.<a class="code" href="a02272.html#NLMISC_1_1CBitSetz1920_9">setAll</a>(); +00487 <a class="code" href="a03730.html#NL3D_1_1CZoner1">_PatchOldRenderClipped</a>.<a class="code" href="a02272.html#NLMISC_1_1CBitSetz1920_9">setAll</a>(); +00488 } +00489 +00490 <span class="comment">// If read and version 0, must init default TileColors of patchs.</span> +00491 <span class="comment">//===============================================================</span> +00492 <span class="comment">// if(f.isReading() && ver<2) ... </span> +00493 <span class="comment">// Deprecated, because ver<3 not supported</span> +00494 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZonea34" doxytag="NL3D::CZone::setTileColor" ></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::CZone::setTileColor </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">bool </td> + <td class="mdname" nowrap> <em>monochrome</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>float </td> + <td class="mdname" nowrap> <em>factor</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Set the zone tile color to monochrome or not and apply multiplier factor Set all tile colors of all patch of this zone to monochrome or not and apply a multiplier factor convertion to monochrome is done by that formula : newR = newG = newB = 0.28 * R + 0.59 * G + 0.13 * B; for monochrome the factor is applied like for the color mode +<p> +Definition at line <a class="el" href="a06758.html#l01357">1357</a> of file <a class="el" href="a06758.html">3d/zone.cpp</a>. +<p> +References <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05981.html#l00098">uint16</a>, and <a class="el" href="a05981.html#l00100">uint32</a>. +<p> +Referenced by <a class="el" href="a06770.html#l00244">NL3D::CZoneLoadingTask::run()</a>. +<p> +<div class="fragment"><pre>01358 { +01359 <a class="code" href="a04199.html#a6">nlassert</a>(factor >= 0.0f); <span class="comment">// factor must not be negative as its a multiplier</span> +01360 +01361 <span class="keywordflow">if</span> (monochrome) +01362 { +01363 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a11">uint32</a> i = 0; i < <a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>.size(); ++i) +01364 { +01365 vector<CTileColor> &rTC = <a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>[i].TileColors; +01366 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a11">uint32</a> j = 0; j < rTC.size(); ++j) +01367 { +01368 <span class="keywordtype">float</span> fR = (rTC[j].Color565 & 31) / 32.0f; +01369 <span class="keywordtype">float</span> fG = ((rTC[j].Color565 >> 5) & 63) / 64.0f; +01370 <span class="keywordtype">float</span> fB = ((rTC[j].Color565 >> 11) & 31) / 32.0f; +01371 +01372 fR = 0.28f * fR + 0.59f * fG + 0.13f * fB; +01373 +01374 <a class="code" href="a04199.html#a6">nlassert</a>(fR < 0.99f); +01375 +01376 fR *= factor; +01377 <span class="keywordflow">if</span> (fR > 0.99f) fR = 0.99f; <span class="comment">// Avoid reaching 1</span> +01378 +01379 <a class="code" href="a04558.html#a9">uint16</a> nR = (<a class="code" href="a04558.html#a9">uint16</a>)(fR * 32.0f); +01380 <a class="code" href="a04558.html#a9">uint16</a> nG = (<a class="code" href="a04558.html#a9">uint16</a>)(fR * 64.0f); +01381 <a class="code" href="a04558.html#a9">uint16</a> nB = (<a class="code" href="a04558.html#a9">uint16</a>)(fR * 32.0f); +01382 +01383 rTC[j].Color565 = nR + (nG << 5) + (nB << 11); +01384 } +01385 } +01386 } +01387 <span class="keywordflow">else</span> +01388 { +01389 <span class="keywordflow">if</span> (factor != 1.0f) +01390 { +01391 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a11">uint32</a> i = 0; i < <a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>.size(); ++i) +01392 { +01393 vector<CTileColor> &rTC = <a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>[i].TileColors; +01394 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a11">uint32</a> j = 0; j < rTC.size(); ++j) +01395 { +01396 <span class="keywordtype">float</span> fR = (rTC[j].Color565 & 31) / 32.0f; +01397 <span class="keywordtype">float</span> fG = ((rTC[j].Color565 >> 5) & 63) / 64.0f; +01398 <span class="keywordtype">float</span> fB = ((rTC[j].Color565 >> 11) & 31) / 32.0f; +01399 +01400 fR *= factor; +01401 fG *= factor; +01402 fB *= factor; +01403 +01404 <span class="keywordflow">if</span> (fR > 0.99f) fR = 0.99f; +01405 <span class="keywordflow">if</span> (fG > 0.99f) fG = 0.99f; +01406 <span class="keywordflow">if</span> (fB > 0.99f) fB = 0.99f; +01407 +01408 <a class="code" href="a04558.html#a9">uint16</a> nR = (<a class="code" href="a04558.html#a9">uint16</a>)(fR * 32.0f); +01409 <a class="code" href="a04558.html#a9">uint16</a> nG = (<a class="code" href="a04558.html#a9">uint16</a>)(fG * 64.0f); +01410 <a class="code" href="a04558.html#a9">uint16</a> nB = (<a class="code" href="a04558.html#a9">uint16</a>)(fB * 32.0f); +01411 +01412 rTC[j].Color565 = nR + (nG << 5) + (nB << 11); +01413 } +01414 } +01415 } +01416 } +01417 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZonea35" doxytag="NL3D::CZone::setupColorsFromTileFlags" ></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::CZone::setupColorsFromTileFlags </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a03337.html">NLMISC::CRGBA</a> </td> + <td class="mdname1" valign="top" nowrap> <em>colors</em>[4] </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> +Debug purpose only : setup the colors of the patch of this zone so that it shows which tiles have vegetable disabled, or are above, below water. User provides a table with 4 colors for each state : color 0 = above water color 1 = underwater color 2 = intersect water color 3 = vegetable disabled +<p> +Definition at line <a class="el" href="a06758.html#l01532">1532</a> of file <a class="el" href="a06758.html">3d/zone.cpp</a>. +<p> +References <a class="el" href="a05981.html#l00105">uint</a>. +<p> +<div class="fragment"><pre>01533 { +01534 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> k = 0; k < <a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>.size(); ++k) +01535 { +01536 <a class="code" href="a03730.html#NL3D_1_1CZoner12">Patchs</a>[k].setupColorsFromTileFlags(colors); +01537 } +01538 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZoneh2" doxytag="NL3D::CZone::unbindPatch" ></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::CZone::unbindPatch </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a03057.html">CPatch</a> & </td> + <td class="mdname1" valign="top" nowrap> <em>pa</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [static, 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="a06758.html#l00868">868</a> of file <a class="el" href="a06758.html">3d/zone.cpp</a>. +<p> +References <a class="el" href="a06155.html#l01724">NL3D::CPatch::unbind()</a>. +<p> +Referenced by <a class="el" href="a06758.html#l00603">release()</a>. +<p> +<div class="fragment"><pre>00869 { +00870 <span class="comment">/*</span> +00871 <span class="comment"> Remind: the old version with CPatch::unbindFrom*() doesn't work because of CZone::release(). This function</span> +00872 <span class="comment"> first erase the zone from loadedZones...</span> +00873 <span class="comment"> Not matter here. We use CPatch::unbind() which should do all the good job correctly (unbind pa from ohters</span> +00874 <span class="comment"> , and unbind others from pa at same time).</span> +00875 <span class="comment"> */</span> +00876 +00877 pa.unbind(); +00878 } +</pre></div> </td> + </tr> +</table> +<hr><h2>Friends And Related Function Documentation</h2> +<a class="anchor" name="NL3D_1_1CZonen0" doxytag="NL3D::CZone::CLandscape" ></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"> friend class <a class="el" href="a02702.html">CLandscape</a><code> [friend]</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="a06760.html#l00590">590</a> of file <a class="el" href="a06760.html">src/3d/zone.h</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZonen1" doxytag="NL3D::CZone::CPatch" ></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"> friend class <a class="el" href="a03057.html">CPatch</a><code> [friend]</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="a06760.html#l00593">593</a> of file <a class="el" href="a06760.html">src/3d/zone.h</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZonen2" doxytag="NL3D::CZone::CTessFace" ></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"> friend class <a class="el" href="a03476.html">CTessFace</a><code> [friend]</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="a06760.html#l00591">591</a> of file <a class="el" href="a06760.html">src/3d/zone.h</a>. </td> + </tr> +</table> +<hr><h2>Field Documentation</h2> +<a class="anchor" name="NL3D_1_1CZoner0" doxytag="NL3D::CZone::_PatchBSpheres" ></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="a02291.html">CBSphere</a>> <a class="el" href="a03730.html#NL3D_1_1CZoner0">NL3D::CZone::_PatchBSpheres</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="a06760.html#l00579">579</a> of file <a class="el" href="a06760.html">src/3d/zone.h</a>. +<p> +Referenced by <a class="el" href="a06758.html#l01038">clipPatchs()</a>, <a class="el" href="a06758.html#l00499">compile()</a>, <a class="el" href="a06758.html#l00911">getPatchBSphere()</a>, and <a class="el" href="a06758.html#l01175">preRender()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZoner1" doxytag="NL3D::CZone::_PatchOldRenderClipped" ></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="a02272.html">NLMISC::CBitSet</a> <a class="el" href="a03730.html#NL3D_1_1CZoner1">NL3D::CZone::_PatchOldRenderClipped</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="a06760.html#l00581">581</a> of file <a class="el" href="a06760.html">src/3d/zone.h</a>. +<p> +Referenced by <a class="el" href="a06758.html#l00122">build()</a>, <a class="el" href="a06758.html#l00922">clip()</a>, <a class="el" href="a06155.html#l00115">NL3D::CPatch::release()</a>, and <a class="el" href="a06758.html#l00432">serial()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZoner2" doxytag="NL3D::CZone::_PatchRenderClipped" ></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="a02272.html">NLMISC::CBitSet</a> <a class="el" href="a03730.html#NL3D_1_1CZoner2">NL3D::CZone::_PatchRenderClipped</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="a06760.html#l00580">580</a> of file <a class="el" href="a06760.html">src/3d/zone.h</a>. +<p> +Referenced by <a class="el" href="a06758.html#l00122">build()</a>, <a class="el" href="a06758.html#l01279">changePatchTextureAndColor()</a>, <a class="el" href="a06758.html#l00922">clip()</a>, <a class="el" href="a06758.html#l01038">clipPatchs()</a>, <a class="el" href="a06760.html#l00539">isPatchRenderClipped()</a>, <a class="el" href="a06758.html#l01175">preRender()</a>, <a class="el" href="a06155.html#l00115">NL3D::CPatch::release()</a>, <a class="el" href="a06758.html#l01240">resetRenderFarAndDeleteVBFV()</a>, and <a class="el" href="a06758.html#l00432">serial()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZoner3" doxytag="NL3D::CZone::_PointLightArray" ></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="a03095.html">CPointLightNamedArray</a> <a class="el" href="a03730.html#NL3D_1_1CZoner3">NL3D::CZone::_PointLightArray</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +List of PointLights that may influences Patchs and objects walking on them. +<p> +Definition at line <a class="el" href="a06760.html#l00586">586</a> of file <a class="el" href="a06760.html">src/3d/zone.h</a>. +<p> +Referenced by <a class="el" href="a05862.html#l00385">NL3D::CLandscape::addZone()</a>, <a class="el" href="a06157.html#l01543">NL3D::CPatch::appendTileLightInfluences()</a>, <a class="el" href="a06758.html#l00365">build()</a>, and <a class="el" href="a06157.html#l01655">NL3D::CPatch::getCurrentTileTLIColors()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZoner4" doxytag="NL3D::CZone::BaseVertices" ></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="a03730.html#NL3D_1_1CZoney4">TBaseVerticesVec</a> <a class="el" href="a03730.html#NL3D_1_1CZoner4">NL3D::CZone::BaseVertices</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="a06760.html#l00570">570</a> of file <a class="el" href="a06760.html">src/3d/zone.h</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZoner5" doxytag="NL3D::CZone::BorderVertices" ></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="a02290.html">CBorderVertex</a>> <a class="el" href="a03730.html#NL3D_1_1CZoner5">NL3D::CZone::BorderVertices</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="a06760.html#l00572">572</a> of file <a class="el" href="a06760.html">src/3d/zone.h</a>. +<p> +Referenced by <a class="el" href="a06758.html#l00365">build()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZoner6" doxytag="NL3D::CZone::ClipResult" ></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#a14">sint</a> <a class="el" href="a03730.html#NL3D_1_1CZoner6">NL3D::CZone::ClipResult</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="a06760.html#l00595">595</a> of file <a class="el" href="a06760.html">src/3d/zone.h</a>. +<p> +Referenced by <a class="el" href="a06758.html#l00922">clip()</a>, <a class="el" href="a06758.html#l00083">CZone()</a>, <a class="el" href="a06758.html#l01175">preRender()</a>, and <a class="el" href="a06758.html#l00603">release()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZoner7" doxytag="NL3D::CZone::Compiled" ></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 <a class="el" href="a03730.html#NL3D_1_1CZoner7">NL3D::CZone::Compiled</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="a06760.html#l00562">562</a> of file <a class="el" href="a06760.html">src/3d/zone.h</a>. +<p> +Referenced by <a class="el" href="a06758.html#l01157">averageTesselationVertices()</a>, <a class="el" href="a06758.html#l00122">build()</a>, <a class="el" href="a06758.html#l01279">changePatchTextureAndColor()</a>, <a class="el" href="a06758.html#l00922">clip()</a>, <a class="el" href="a06758.html#l00499">compile()</a>, <a class="el" href="a06760.html#l00487">compiled()</a>, <a class="el" href="a06758.html#l00083">CZone()</a>, <a class="el" href="a06758.html#l01119">excludePatchFromRefineAll()</a>, <a class="el" href="a06758.html#l01175">preRender()</a>, <a class="el" href="a06758.html#l01132">refineAll()</a>, <a class="el" href="a06758.html#l01322">refreshTesselationGeometry()</a>, <a class="el" href="a06758.html#l00603">release()</a>, and <a class="el" href="a06758.html#l00091">~CZone()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZoner8" doxytag="NL3D::CZone::Landscape" ></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="a02702.html">CLandscape</a>* <a class="el" href="a03730.html#NL3D_1_1CZoner8">NL3D::CZone::Landscape</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="a06760.html#l00558">558</a> of file <a class="el" href="a06760.html">src/3d/zone.h</a>. +<p> +Referenced by <a class="el" href="a06161.html#l00054">NL3D::CPatch::computeNewFar()</a>, <a class="el" href="a06157.html#l01191">NL3D::CPatch::getTileLightMap()</a>, <a class="el" href="a06157.html#l01225">NL3D::CPatch::getTileLightMapUvInfo()</a>, <a class="el" href="a06155.html#l02040">NL3D::CPatch::getTileRenderPass()</a>, <a class="el" href="a06155.html#l02080">NL3D::CPatch::getTileUvInfo()</a>, <a class="el" href="a06157.html#l01247">NL3D::CPatch::releaseTileLightMap()</a>, <a class="el" href="a06155.html#l01555">NL3D::CPatch::resetRenderFar()</a>, and <a class="el" href="a06157.html#l01909">NL3D::CPatch::updateTessBlockLighting()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZoner9" doxytag="NL3D::CZone::NumVertices" ></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#a10">sint32</a> <a class="el" href="a03730.html#NL3D_1_1CZoner9">NL3D::CZone::NumVertices</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="a06760.html#l00568">568</a> of file <a class="el" href="a06760.html">src/3d/zone.h</a>. +<p> +Referenced by <a class="el" href="a06758.html#l00365">build()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZoner10" doxytag="NL3D::CZone::PatchBias" ></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="a03128.html">CVector</a> <a class="el" href="a03730.html#NL3D_1_1CZoner10">NL3D::CZone::PatchBias</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="a06760.html#l00564">564</a> of file <a class="el" href="a06760.html">src/3d/zone.h</a>. +<p> +Referenced by <a class="el" href="a06758.html#l01452">applyHeightField()</a>, <a class="el" href="a06758.html#l00122">build()</a>, <a class="el" href="a06758.html#l00099">computeBBScaleBias()</a>, <a class="el" href="a06760.html#l00485">getPatchBias()</a>, <a class="el" href="a06758.html#l00289">retrieve()</a>, and <a class="el" href="a06758.html#l00432">serial()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZoner11" doxytag="NL3D::CZone::PatchConnects" ></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="a03731.html">CPatchConnect</a>> <a class="el" href="a03730.html#NL3D_1_1CZoner11">NL3D::CZone::PatchConnects</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="a06760.html#l00577">577</a> of file <a class="el" href="a06760.html">src/3d/zone.h</a>. +<p> +Referenced by <a class="el" href="a06758.html#l00122">build()</a>, <a class="el" href="a06758.html#l00718">buildBindInfo()</a>, <a class="el" href="a06758.html#l00499">compile()</a>, <a class="el" href="a06758.html#l01420">debugBinds()</a>, <a class="el" href="a06760.html#l00507">getPatchConnect()</a>, <a class="el" href="a06758.html#l00686">rebindBorder()</a>, <a class="el" href="a06758.html#l00289">retrieve()</a>, and <a class="el" href="a06758.html#l00432">serial()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZoner12" doxytag="NL3D::CZone::Patchs" ></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="a03057.html">CPatch</a>> <a class="el" href="a03730.html#NL3D_1_1CZoner12">NL3D::CZone::Patchs</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="a06760.html#l00576">576</a> of file <a class="el" href="a06760.html">src/3d/zone.h</a>. +<p> +Referenced by <a class="el" href="a06758.html#l00365">build()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZoner13" doxytag="NL3D::CZone::PatchScale" ></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="a03730.html#NL3D_1_1CZoner13">NL3D::CZone::PatchScale</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="a06760.html#l00565">565</a> of file <a class="el" href="a06760.html">src/3d/zone.h</a>. +<p> +Referenced by <a class="el" href="a06758.html#l01452">applyHeightField()</a>, <a class="el" href="a06758.html#l00122">build()</a>, <a class="el" href="a06758.html#l00099">computeBBScaleBias()</a>, <a class="el" href="a06760.html#l00486">getPatchScale()</a>, <a class="el" href="a06758.html#l00289">retrieve()</a>, and <a class="el" href="a06758.html#l00432">serial()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZoner14" doxytag="NL3D::CZone::ZoneBB" ></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="a02157.html">CAABBoxExt</a> <a class="el" href="a03730.html#NL3D_1_1CZoner14">NL3D::CZone::ZoneBB</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="a06760.html#l00563">563</a> of file <a class="el" href="a06760.html">src/3d/zone.h</a>. +<p> +Referenced by <a class="el" href="a06758.html#l00365">build()</a>, <a class="el" href="a06758.html#l00922">clip()</a>, <a class="el" href="a06758.html#l00099">computeBBScaleBias()</a>, <a class="el" href="a06760.html#l00491">getZoneBB()</a>, and <a class="el" href="a06758.html#l00432">serial()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CZoner15" doxytag="NL3D::CZone::ZoneId" ></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#a9">uint16</a> <a class="el" href="a03730.html#NL3D_1_1CZoner15">NL3D::CZone::ZoneId</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="a06760.html#l00561">561</a> of file <a class="el" href="a06760.html">src/3d/zone.h</a>. +<p> +Referenced by <a class="el" href="a06758.html#l00365">build()</a>. </td> + </tr> +</table> +<hr>The documentation for this class was generated from the following files:<ul> +<li><a class="el" href="a06760.html">src/3d/zone.h</a><li><a class="el" href="a06758.html">3d/zone.cpp</a></ul> +<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 08:34:04 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> |