Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 1cde9f5eeb6e9b0b43fefba286186769 > files > 121

mercator-devel-0.3.0-4.fc15.i686.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Mercator: Mercator::Segment Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.4 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Mercator</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>Mercator</b>      </li>
      <li class="navelem"><a class="el" href="classMercator_1_1Segment.html">Segment</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a>  </div>
  <div class="headertitle">
<div class="title">Mercator::Segment Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="Mercator::Segment" -->
<p>Class storing heightfield and other data for a single fixed size square area of terrain defined by four adjacent <a class="el" href="classMercator_1_1BasePoint.html" title="Point on the fundamental grid that is used as the basis for terrain.">BasePoint</a> objects.  
 <a href="classMercator_1_1Segment.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="Segment_8h_source.html">Segment.h</a>&gt;</code></p>

<p><a href="classMercator_1_1Segment-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4a47008ac7949b6958f07159b3e82262"></a><!-- doxytag: member="Mercator::Segment::Surfacestore" ref="a4a47008ac7949b6958f07159b3e82262" args="" -->
typedef std::map&lt; int, <a class="el" href="classMercator_1_1Surface.html">Surface</a> * &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#a4a47008ac7949b6958f07159b3e82262">Surfacestore</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">STL map of pointers to <a class="el" href="classMercator_1_1Surface.html" title="Data store for terrain surface data.">Surface</a> objects. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6130a62575f791f631825177a2acacd1"></a><!-- doxytag: member="Mercator::Segment::Areastore" ref="a6130a62575f791f631825177a2acacd1" args="" -->
typedef std::multimap&lt; int, <br class="typebreak"/>
const <a class="el" href="classMercator_1_1Area.html">Area</a> * &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#a6130a62575f791f631825177a2acacd1">Areastore</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">STL multimap of pointers to <a class="el" href="classMercator_1_1Area.html" title="Region of terrain surface which is modified.">Area</a> objects affecting this segment. <br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#a52dcdd9bf2119d4be307ec4a4cc200ca">Segment</a> (int x, int y, unsigned int resolution)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct an empty segment with the given resolution.  <a href="#a52dcdd9bf2119d4be307ec4a4cc200ca"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#afb36a3fda77564d705e72edf4fe80c04">~Segment</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Destruct the <a class="el" href="classMercator_1_1Segment.html" title="Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...">Segment</a>.  <a href="#afb36a3fda77564d705e72edf4fe80c04"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0d84f96353ff60732a60b39609f127c2"></a><!-- doxytag: member="Mercator::Segment::getResolution" ref="a0d84f96353ff60732a60b39609f127c2" args="() const " -->
const int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#a0d84f96353ff60732a60b39609f127c2">getResolution</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Accessor for resolution of this segment. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a344de223eb8af9cd47afb8c406783466"></a><!-- doxytag: member="Mercator::Segment::getSize" ref="a344de223eb8af9cd47afb8c406783466" args="() const " -->
const int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#a344de223eb8af9cd47afb8c406783466">getSize</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Accessor for array size of this segment. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0af58690a77291326481d94c73a916a4"></a><!-- doxytag: member="Mercator::Segment::getXRef" ref="a0af58690a77291326481d94c73a916a4" args="() const " -->
const int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#a0af58690a77291326481d94c73a916a4">getXRef</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Accessor for Global x reference of this segment. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a05f29873596234b74ca0d45f80970d92"></a><!-- doxytag: member="Mercator::Segment::getYRef" ref="a05f29873596234b74ca0d45f80970d92" args="() const " -->
const int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#a05f29873596234b74ca0d45f80970d92">getYRef</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Accessor for Global y reference of this segment. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#a0db338f77e6209301ce61eb2a9f9ad46">isValid</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Check whether this <a class="el" href="classMercator_1_1Segment.html" title="Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...">Segment</a> contains valid point data.  <a href="#a0db338f77e6209301ce61eb2a9f9ad46"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#a7806c078346ecb524e9b8b32b80071f3">setMinMax</a> (float min, float max)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set min and max height values for this <a class="el" href="classMercator_1_1Segment.html" title="Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...">Segment</a>.  <a href="#a7806c078346ecb524e9b8b32b80071f3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#af576b4f2de72a6a5eb5f6cd7d83c1440">invalidate</a> (bool points=true)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Mark the contents of this <a class="el" href="classMercator_1_1Segment.html" title="Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...">Segment</a> as stale.  <a href="#af576b4f2de72a6a5eb5f6cd7d83c1440"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#aa77a2f47f03333a1be1d4e8ec6d1995a">setCornerPoint</a> (unsigned int x, unsigned int y, const <a class="el" href="classMercator_1_1BasePoint.html">BasePoint</a> &amp;bp)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the <a class="el" href="classMercator_1_1BasePoint.html" title="Point on the fundamental grid that is used as the basis for terrain.">BasePoint</a> data for one of the four that define this <a class="el" href="classMercator_1_1Segment.html" title="Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...">Segment</a>.  <a href="#aa77a2f47f03333a1be1d4e8ec6d1995a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa763522ab22e67e924670b690da6d9c7"></a><!-- doxytag: member="Mercator::Segment::getControlPoints" ref="aa763522ab22e67e924670b690da6d9c7" args="() const " -->
const <a class="el" href="classMercator_1_1Matrix.html">Matrix</a>&lt; 2, 2, <a class="el" href="classMercator_1_1BasePoint.html">BasePoint</a> &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#aa763522ab22e67e924670b690da6d9c7">getControlPoints</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Accessor for 2D matrix of base points. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a96982b1977a321cbe43ada0f277cae82"></a><!-- doxytag: member="Mercator::Segment::getControlPoints" ref="a96982b1977a321cbe43ada0f277cae82" args="()" -->
<a class="el" href="classMercator_1_1Matrix.html">Matrix</a>&lt; 2, 2, <a class="el" href="classMercator_1_1BasePoint.html">BasePoint</a> &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#a96982b1977a321cbe43ada0f277cae82">getControlPoints</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Accessor for modifying 2D matrix of base points. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3a54bd89ebaedb6b6b67759db6cf5d5a"></a><!-- doxytag: member="Mercator::Segment::getSurfaces" ref="a3a54bd89ebaedb6b6b67759db6cf5d5a" args="() const " -->
const <a class="el" href="classMercator_1_1Segment.html#a4a47008ac7949b6958f07159b3e82262">Surfacestore</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#a3a54bd89ebaedb6b6b67759db6cf5d5a">getSurfaces</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Accessor for list of attached <a class="el" href="classMercator_1_1Surface.html" title="Data store for terrain surface data.">Surface</a> objects. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a98c913863ad84e76791326527a56b67c"></a><!-- doxytag: member="Mercator::Segment::getSurfaces" ref="a98c913863ad84e76791326527a56b67c" args="()" -->
<a class="el" href="classMercator_1_1Segment.html#a4a47008ac7949b6958f07159b3e82262">Surfacestore</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#a98c913863ad84e76791326527a56b67c">getSurfaces</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Accessor for modifying list of attached <a class="el" href="classMercator_1_1Surface.html" title="Data store for terrain surface data.">Surface</a> objects. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1ccc784c8d62838972cb093f7061655d"></a><!-- doxytag: member="Mercator::Segment::getPoints" ref="a1ccc784c8d62838972cb093f7061655d" args="() const " -->
const float *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#a1ccc784c8d62838972cb093f7061655d">getPoints</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Accessor for buffer containing height points. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a960838ae49895e75bbea60f2a8d06d57"></a><!-- doxytag: member="Mercator::Segment::getPoints" ref="a960838ae49895e75bbea60f2a8d06d57" args="()" -->
float *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#a960838ae49895e75bbea60f2a8d06d57">getPoints</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Accessor for write access to buffer containing height points. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac549eabb29ac3b021d99c08d69906197"></a><!-- doxytag: member="Mercator::Segment::getNormals" ref="ac549eabb29ac3b021d99c08d69906197" args="() const " -->
const float *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#ac549eabb29ac3b021d99c08d69906197">getNormals</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Accessor for buffer containing surface normals. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9e4c71441bbfd097b76e55d950f696df"></a><!-- doxytag: member="Mercator::Segment::getNormals" ref="a9e4c71441bbfd097b76e55d950f696df" args="()" -->
float *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#a9e4c71441bbfd097b76e55d950f696df">getNormals</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Accessor for write access to buffer containing surface normals. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5710d0991f8922b734f457b2fbb18f65"></a><!-- doxytag: member="Mercator::Segment::get" ref="a5710d0991f8922b734f457b2fbb18f65" args="(int x, int y) const " -->
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#a5710d0991f8922b734f457b2fbb18f65">get</a> (int x, int y) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the height at a relative integer position in the <a class="el" href="classMercator_1_1Segment.html" title="Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...">Segment</a>. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#a5b0e305c1c9b87e5b6dbd0291c7cea01">getHeightAndNormal</a> (float x, float y, float &amp;h, WFMath::Vector&lt; 3 &gt; &amp;normal) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get an accurate height and normal vector at a given coordinate relative to this segment.  <a href="#a5b0e305c1c9b87e5b6dbd0291c7cea01"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#aab07ede0cd641dc7a96023cc97695f65">clipToSegment</a> (const WFMath::AxisBox&lt; 2 &gt; &amp;bbox, int &amp;lx, int &amp;hx, int &amp;ly, int &amp;hy) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Determine the intersection between an axis aligned box and this segment.  <a href="#aab07ede0cd641dc7a96023cc97695f65"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#a58cc1d8e3359fae3ea38c14fcf3b3e88">populate</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Populate the <a class="el" href="classMercator_1_1Segment.html" title="Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...">Segment</a> with heightfield data.  <a href="#a58cc1d8e3359fae3ea38c14fcf3b3e88"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#a73f1453d0e22f30e1941b458ba69ed9f">populateNormals</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Populate the <a class="el" href="classMercator_1_1Segment.html" title="Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...">Segment</a> with surface normal data.  <a href="#a73f1453d0e22f30e1941b458ba69ed9f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#aeb53cd468934f8053ee7898e6f1505d8">populateSurfaces</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Populate the surfaces associated with this <a class="el" href="classMercator_1_1Segment.html" title="Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...">Segment</a>.  <a href="#aeb53cd468934f8053ee7898e6f1505d8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab956f69332118b0829b37cf3703b6ed2"></a><!-- doxytag: member="Mercator::Segment::getMax" ref="ab956f69332118b0829b37cf3703b6ed2" args="() const " -->
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#ab956f69332118b0829b37cf3703b6ed2">getMax</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Accessor for the maximum height value in this <a class="el" href="classMercator_1_1Segment.html" title="Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...">Segment</a>. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae5d0fd3bd438a7ddfedae5030525f8ca"></a><!-- doxytag: member="Mercator::Segment::getMin" ref="ae5d0fd3bd438a7ddfedae5030525f8ca" args="() const " -->
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#ae5d0fd3bd438a7ddfedae5030525f8ca">getMin</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Accessor for the minimum height value in this <a class="el" href="classMercator_1_1Segment.html" title="Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...">Segment</a>. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab83e3a523eb6c9ca15a8143a6d994289"></a><!-- doxytag: member="Mercator::Segment::getRect" ref="ab83e3a523eb6c9ca15a8143a6d994289" args="() const " -->
WFMath::AxisBox&lt; 2 &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#ab83e3a523eb6c9ca15a8143a6d994289">getRect</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The 2d area covered by this segment. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad7165c7f86288bc04aba21d243edee85"></a><!-- doxytag: member="Mercator::Segment::getBox" ref="ad7165c7f86288bc04aba21d243edee85" args="() const " -->
WFMath::AxisBox&lt; 3 &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#ad7165c7f86288bc04aba21d243edee85">getBox</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The 3d box covered by this segment. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#a57f2af8a8e02ceb2af77fa53b6487734">addMod</a> (const <a class="el" href="classMercator_1_1TerrainMod.html">TerrainMod</a> *t)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a <a class="el" href="classMercator_1_1TerrainMod.html" title="Base class for modifiers to the procedurally generated terrain.">TerrainMod</a> to this <a class="el" href="classMercator_1_1Segment.html" title="Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...">Segment</a>.  <a href="#a57f2af8a8e02ceb2af77fa53b6487734"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#a1ba7befbcd3a14438e43f777cada7742">updateMod</a> (const <a class="el" href="classMercator_1_1TerrainMod.html">TerrainMod</a> *t)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Update a <a class="el" href="classMercator_1_1TerrainMod.html" title="Base class for modifiers to the procedurally generated terrain.">TerrainMod</a> in this <a class="el" href="classMercator_1_1Segment.html" title="Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...">Segment</a>.  <a href="#a1ba7befbcd3a14438e43f777cada7742"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#a5189556605469694eae6239f01296ec7">removeMod</a> (const <a class="el" href="classMercator_1_1TerrainMod.html">TerrainMod</a> *t)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove a <a class="el" href="classMercator_1_1TerrainMod.html" title="Base class for modifiers to the procedurally generated terrain.">TerrainMod</a> from this <a class="el" href="classMercator_1_1Segment.html" title="Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...">Segment</a>.  <a href="#a5189556605469694eae6239f01296ec7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#afa3f6bf647f377e13a54656581f2d846">clearMods</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Delete all the modifications applied to this <a class="el" href="classMercator_1_1Segment.html" title="Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...">Segment</a>.  <a href="#afa3f6bf647f377e13a54656581f2d846"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae5209f0c97ae9a316c21ad5bde3dbfe0"></a><!-- doxytag: member="Mercator::Segment::getAreas" ref="ae5209f0c97ae9a316c21ad5bde3dbfe0" args="() const " -->
const <a class="el" href="classMercator_1_1Segment.html#a6130a62575f791f631825177a2acacd1">Areastore</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#ae5209f0c97ae9a316c21ad5bde3dbfe0">getAreas</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Accessor for multimap of <a class="el" href="classMercator_1_1Area.html" title="Region of terrain surface which is modified.">Area</a> objects. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6a705f65a81a3a775b7e36114bfb5f4c"></a><!-- doxytag: member="Mercator::Segment::getMods" ref="a6a705f65a81a3a775b7e36114bfb5f4c" args="() const " -->
const ModList &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>getMods</b> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#ac75f2abb81cfcd6823d534407fc7081c">addArea</a> (const <a class="el" href="classMercator_1_1Area.html">Area</a> *a)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Add an area to those that affect this segment.  <a href="#ac75f2abb81cfcd6823d534407fc7081c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a78f3bb5bdbbfaf4eaf426f6c9ca9f02c"></a><!-- doxytag: member="Mercator::Segment::updateArea" ref="a78f3bb5bdbbfaf4eaf426f6c9ca9f02c" args="(const Area *a)" -->
int&#160;</td><td class="memItemRight" valign="bottom"><b>updateArea</b> (const <a class="el" href="classMercator_1_1Area.html">Area</a> *a)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac7200d70fdc50f1585162668235db4f9"></a><!-- doxytag: member="Mercator::Segment::removeArea" ref="ac7200d70fdc50f1585162668235db4f9" args="(const Area *a)" -->
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#ac7200d70fdc50f1585162668235db4f9">removeArea</a> (const <a class="el" href="classMercator_1_1Area.html">Area</a> *a)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove an area from those that affect this segment. <br/></td></tr>
<tr><td colspan="2"><h2><a name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#ad4bff40869f8b8b3bf5d1cb60e9ffc27">checkMaxMin</a> (float h)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Check a value against m_min and m_max and set one of them if appropriate.  <a href="#ad4bff40869f8b8b3bf5d1cb60e9ffc27"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#a83e6e6c1dac2d37ed3402702cb3e1df6">fill1d</a> (const <a class="el" href="classMercator_1_1BasePoint.html">BasePoint</a> &amp;l, const <a class="el" href="classMercator_1_1BasePoint.html">BasePoint</a> &amp;h, float *array) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">One dimensional midpoint displacement fractal.  <a href="#a83e6e6c1dac2d37ed3402702cb3e1df6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#aebf73701914c4751d15d9cec484ce4a0">fill2d</a> (const <a class="el" href="classMercator_1_1BasePoint.html">BasePoint</a> &amp;p1, const <a class="el" href="classMercator_1_1BasePoint.html">BasePoint</a> &amp;p2, const <a class="el" href="classMercator_1_1BasePoint.html">BasePoint</a> &amp;p3, const <a class="el" href="classMercator_1_1BasePoint.html">BasePoint</a> &amp;p4)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Two dimensional midpoint displacement fractal.  <a href="#aebf73701914c4751d15d9cec484ce4a0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aaadf516dda37c6c58af36e7029b14656"></a><!-- doxytag: member="Mercator::Segment::qRMD" ref="aaadf516dda37c6c58af36e7029b14656" args="(WFMath::MTRand &amp;rng, float nn, float fn, float ff, float nf, float roughness, float falloff, int depth) const " -->
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#aaadf516dda37c6c58af36e7029b14656">qRMD</a> (WFMath::MTRand &amp;rng, float nn, float fn, float ff, float nf, float roughness, float falloff, int depth) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">quasi-Random Midpoint Displacement (qRMD) algorithm. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#a1ce0d1f46aa2efc5e50e09e882605b39">applyMod</a> (const <a class="el" href="classMercator_1_1TerrainMod.html">TerrainMod</a> *t)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Modify the heightfield data using the <a class="el" href="classMercator_1_1TerrainMod.html" title="Base class for modifiers to the procedurally generated terrain.">TerrainMod</a> objects which are attached to this <a class="el" href="classMercator_1_1Segment.html" title="Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...">Segment</a>.  <a href="#a1ce0d1f46aa2efc5e50e09e882605b39"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#a95f3bf7b2c6146edff9d84760c62be3b">invalidateSurfaces</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Mark surfaces as stale.  <a href="#a95f3bf7b2c6146edff9d84760c62be3b"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abd9c19268851728d53a0032e6fa0a78c"></a><!-- doxytag: member="Mercator::Segment::m_res" ref="abd9c19268851728d53a0032e6fa0a78c" args="" -->
const int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#abd9c19268851728d53a0032e6fa0a78c">m_res</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Distance between segments. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a491907412d4eb428e2347eee96b05a28"></a><!-- doxytag: member="Mercator::Segment::m_size" ref="a491907412d4eb428e2347eee96b05a28" args="" -->
const int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#a491907412d4eb428e2347eee96b05a28">m_size</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Size of segment, m_res + 1. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad1277eafb57d7b03b03a53736307e375"></a><!-- doxytag: member="Mercator::Segment::m_xRef" ref="ad1277eafb57d7b03b03a53736307e375" args="" -->
const int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#ad1277eafb57d7b03b03a53736307e375">m_xRef</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Global x reference of this segment. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aee621475381f71afa25e89f830ab0d45"></a><!-- doxytag: member="Mercator::Segment::m_yRef" ref="aee621475381f71afa25e89f830ab0d45" args="" -->
const int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#aee621475381f71afa25e89f830ab0d45">m_yRef</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Global y reference of this segment. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a21d4394ff5c5e586410bf9c7dea6b6af"></a><!-- doxytag: member="Mercator::Segment::m_controlPoints" ref="a21d4394ff5c5e586410bf9c7dea6b6af" args="" -->
<a class="el" href="classMercator_1_1Matrix.html">Matrix</a>&lt; 2, 2, <a class="el" href="classMercator_1_1BasePoint.html">BasePoint</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#a21d4394ff5c5e586410bf9c7dea6b6af">m_controlPoints</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">2x2 matrix of points which control this segment <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac22600d95051cd017f53f10fca12a20e"></a><!-- doxytag: member="Mercator::Segment::m_points" ref="ac22600d95051cd017f53f10fca12a20e" args="" -->
float *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#ac22600d95051cd017f53f10fca12a20e">m_points</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to buffer containing height points. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac0b0f720ce76aab5d6dcebfcd5469ed6"></a><!-- doxytag: member="Mercator::Segment::m_normals" ref="ac0b0f720ce76aab5d6dcebfcd5469ed6" args="" -->
float *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#ac0b0f720ce76aab5d6dcebfcd5469ed6">m_normals</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to buffer containing normals for height points. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a771ad07baa6490732728ab150fd11b9d"></a><!-- doxytag: member="Mercator::Segment::m_max" ref="a771ad07baa6490732728ab150fd11b9d" args="" -->
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#a771ad07baa6490732728ab150fd11b9d">m_max</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum height of any point in this segment. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a18c43d5280f8072849cac10927296a2b"></a><!-- doxytag: member="Mercator::Segment::m_min" ref="a18c43d5280f8072849cac10927296a2b" args="" -->
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#a18c43d5280f8072849cac10927296a2b">m_min</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Minimum height of any point in this segment. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a14403c34b1b0668886484b2f569064e3"></a><!-- doxytag: member="Mercator::Segment::m_surfaces" ref="a14403c34b1b0668886484b2f569064e3" args="" -->
<a class="el" href="classMercator_1_1Segment.html#a4a47008ac7949b6958f07159b3e82262">Surfacestore</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#a14403c34b1b0668886484b2f569064e3">m_surfaces</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Store of surfaces which can be rendered on this terrain. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab63a28adb71347baccdffd5eab91f58a"></a><!-- doxytag: member="Mercator::Segment::m_areas" ref="ab63a28adb71347baccdffd5eab91f58a" args="" -->
<a class="el" href="classMercator_1_1Segment.html#a6130a62575f791f631825177a2acacd1">Areastore</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#ab63a28adb71347baccdffd5eab91f58a">m_areas</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Areas which intersect this segment. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6ce82dd99e6fdfc257a09bd09a7f50bb"></a><!-- doxytag: member="Mercator::Segment::m_modList" ref="a6ce82dd99e6fdfc257a09bd09a7f50bb" args="" -->
ModList&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Segment.html#a6ce82dd99e6fdfc257a09bd09a7f50bb">m_modList</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">List of <a class="el" href="classMercator_1_1TerrainMod.html" title="Base class for modifiers to the procedurally generated terrain.">TerrainMod</a> objects that are applied to this <a class="el" href="classMercator_1_1Segment.html" title="Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...">Segment</a>. <br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Class storing heightfield and other data for a single fixed size square area of terrain defined by four adjacent <a class="el" href="classMercator_1_1BasePoint.html" title="Point on the fundamental grid that is used as the basis for terrain.">BasePoint</a> objects. </p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a52dcdd9bf2119d4be307ec4a4cc200ca"></a><!-- doxytag: member="Mercator::Segment::Segment" ref="a52dcdd9bf2119d4be307ec4a4cc200ca" args="(int x, int y, unsigned int resolution)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Mercator::Segment::Segment </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>resolution</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [explicit]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Construct an empty segment with the given resolution. </p>
<p>Generally it is not necessary to call this from outside the Mercator library <a class="el" href="classMercator_1_1Segment.html" title="Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...">Segment</a> objects are created as required. The <a class="el" href="classMercator_1_1Segment.html" title="Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...">Segment</a> is constructed without allocating any storage for heightfield or surface normal data. The m_min and m_max members are initialised to extreme values, and should be set to appropriate using <a class="el" href="classMercator_1_1Segment.html#a7806c078346ecb524e9b8b32b80071f3" title="Set min and max height values for this Segment.">setMinMax()</a> as soon as possible after construction. Similarly the control points should be set soon after construction. </p>

</div>
</div>
<a class="anchor" id="afb36a3fda77564d705e72edf4fe80c04"></a><!-- doxytag: member="Mercator::Segment::~Segment" ref="afb36a3fda77564d705e72edf4fe80c04" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Mercator::Segment::~Segment </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Destruct the <a class="el" href="classMercator_1_1Segment.html" title="Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...">Segment</a>. </p>
<p>Generally it is not necessary to delete <a class="el" href="classMercator_1_1Segment.html" title="Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...">Segment</a> objects from application code, as <a class="el" href="classMercator_1_1Segment.html" title="Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...">Segment</a> instances are owned by the <a class="el" href="classMercator_1_1Terrain.html" title="Class storing centrally all data about an instance of some terrain.">Terrain</a> object. Storage allocated for heightfield and surface normals is implicitly deleted as well as all surfaces. </p>

<p>References <a class="el" href="classMercator_1_1Segment.html#afa3f6bf647f377e13a54656581f2d846">clearMods()</a>, <a class="el" href="classMercator_1_1Segment.html#ac0b0f720ce76aab5d6dcebfcd5469ed6">m_normals</a>, <a class="el" href="classMercator_1_1Segment.html#ac22600d95051cd017f53f10fca12a20e">m_points</a>, and <a class="el" href="classMercator_1_1Segment.html#a14403c34b1b0668886484b2f569064e3">m_surfaces</a>.</p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ac75f2abb81cfcd6823d534407fc7081c"></a><!-- doxytag: member="Mercator::Segment::addArea" ref="ac75f2abb81cfcd6823d534407fc7081c" args="(const Area *a)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Mercator::Segment::addArea </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classMercator_1_1Area.html">Area</a> *&#160;</td>
          <td class="paramname"><em>ar</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Add an area to those that affect this segment. </p>
<p>Call from <a class="el" href="classMercator_1_1Terrain.html" title="Class storing centrally all data about an instance of some terrain.">Terrain</a> when an <a class="el" href="classMercator_1_1Area.html" title="Region of terrain surface which is modified.">Area</a> is added which is found to intersect this segment. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">ar</td><td>the area to be added. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>zero if the area was added, non-zero otherwise </dd></dl>

<p>References <a class="el" href="classMercator_1_1Area.html#a9d81d485c5e85c682753842211cc933f">Mercator::Area::getLayer()</a>, <a class="el" href="classMercator_1_1Segment.html#ab63a28adb71347baccdffd5eab91f58a">m_areas</a>, <a class="el" href="classMercator_1_1Segment.html#a14403c34b1b0668886484b2f569064e3">m_surfaces</a>, and <a class="el" href="classMercator_1_1Shader.html#a0dea70d66bcc68dd955548c24d0acc44">Mercator::Shader::newSurface()</a>.</p>

</div>
</div>
<a class="anchor" id="a57f2af8a8e02ceb2af77fa53b6487734"></a><!-- doxytag: member="Mercator::Segment::addMod" ref="a57f2af8a8e02ceb2af77fa53b6487734" args="(const TerrainMod *t)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Mercator::Segment::addMod </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classMercator_1_1TerrainMod.html">TerrainMod</a> *&#160;</td>
          <td class="paramname"><em>t</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Add a <a class="el" href="classMercator_1_1TerrainMod.html" title="Base class for modifiers to the procedurally generated terrain.">TerrainMod</a> to this <a class="el" href="classMercator_1_1Segment.html" title="Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...">Segment</a>. </p>
<p>Called from <a class="el" href="classMercator_1_1Terrain.html#a85c7d22d30653534b0a9e82c61fdbc78" title="Add a modifier to the terrain.">Terrain::addMod()</a>. If this point data is already valid, the modification will be applied directly. </p>

<p>References <a class="el" href="classMercator_1_1Segment.html#af576b4f2de72a6a5eb5f6cd7d83c1440">invalidate()</a>, and <a class="el" href="classMercator_1_1Segment.html#a6ce82dd99e6fdfc257a09bd09a7f50bb">m_modList</a>.</p>

</div>
</div>
<a class="anchor" id="a1ce0d1f46aa2efc5e50e09e882605b39"></a><!-- doxytag: member="Mercator::Segment::applyMod" ref="a1ce0d1f46aa2efc5e50e09e882605b39" args="(const TerrainMod *t)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Mercator::Segment::applyMod </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classMercator_1_1TerrainMod.html">TerrainMod</a> *&#160;</td>
          <td class="paramname"><em>t</em></td><td>)</td>
          <td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Modify the heightfield data using the <a class="el" href="classMercator_1_1TerrainMod.html" title="Base class for modifiers to the procedurally generated terrain.">TerrainMod</a> objects which are attached to this <a class="el" href="classMercator_1_1Segment.html" title="Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...">Segment</a>. </p>
<p>Usually called from <a class="el" href="classMercator_1_1Segment.html#a58cc1d8e3359fae3ea38c14fcf3b3e88" title="Populate the Segment with heightfield data.">Segment::populate()</a>. It is not normally necessary to call this function from the application. </p>

<p>References <a class="el" href="classMercator_1_1TerrainMod.html#a89b94b74a24df696460e4a8b9bc06fe9">Mercator::TerrainMod::apply()</a>, <a class="el" href="classMercator_1_1Effector.html#a65b1ab0b53c32cb45bc1523b387437c2">Mercator::Effector::bbox()</a>, <a class="el" href="classMercator_1_1Segment.html#aab07ede0cd641dc7a96023cc97695f65">clipToSegment()</a>, <a class="el" href="classMercator_1_1Segment.html#af576b4f2de72a6a5eb5f6cd7d83c1440">invalidate()</a>, <a class="el" href="classMercator_1_1Segment.html#ac22600d95051cd017f53f10fca12a20e">m_points</a>, <a class="el" href="classMercator_1_1Segment.html#a491907412d4eb428e2347eee96b05a28">m_size</a>, <a class="el" href="classMercator_1_1Segment.html#ad1277eafb57d7b03b03a53736307e375">m_xRef</a>, and <a class="el" href="classMercator_1_1Segment.html#aee621475381f71afa25e89f830ab0d45">m_yRef</a>.</p>

<p>Referenced by <a class="el" href="classMercator_1_1Segment.html#a58cc1d8e3359fae3ea38c14fcf3b3e88">populate()</a>.</p>

</div>
</div>
<a class="anchor" id="ad4bff40869f8b8b3bf5d1cb60e9ffc27"></a><!-- doxytag: member="Mercator::Segment::checkMaxMin" ref="ad4bff40869f8b8b3bf5d1cb60e9ffc27" args="(float h)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Mercator::Segment::checkMaxMin </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>h</em></td><td>)</td>
          <td><code> [inline, private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Check a value against m_min and m_max and set one of them if appropriate. </p>
<p>Called by internal functions whenever a new data point is generated. </p>

<p>References <a class="el" href="classMercator_1_1Segment.html#a771ad07baa6490732728ab150fd11b9d">m_max</a>, and <a class="el" href="classMercator_1_1Segment.html#a18c43d5280f8072849cac10927296a2b">m_min</a>.</p>

<p>Referenced by <a class="el" href="classMercator_1_1Segment.html#aebf73701914c4751d15d9cec484ce4a0">fill2d()</a>.</p>

</div>
</div>
<a class="anchor" id="afa3f6bf647f377e13a54656581f2d846"></a><!-- doxytag: member="Mercator::Segment::clearMods" ref="afa3f6bf647f377e13a54656581f2d846" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Mercator::Segment::clearMods </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Delete all the modifications applied to this <a class="el" href="classMercator_1_1Segment.html" title="Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...">Segment</a>. </p>
<p>Usually called from the destructor. It is not normally necessary to call this function from the application. </p>

<p>References <a class="el" href="classMercator_1_1Segment.html#af576b4f2de72a6a5eb5f6cd7d83c1440">invalidate()</a>, and <a class="el" href="classMercator_1_1Segment.html#a6ce82dd99e6fdfc257a09bd09a7f50bb">m_modList</a>.</p>

<p>Referenced by <a class="el" href="classMercator_1_1Segment.html#afb36a3fda77564d705e72edf4fe80c04">~Segment()</a>.</p>

</div>
</div>
<a class="anchor" id="aab07ede0cd641dc7a96023cc97695f65"></a><!-- doxytag: member="Mercator::Segment::clipToSegment" ref="aab07ede0cd641dc7a96023cc97695f65" args="(const WFMath::AxisBox&lt; 2 &gt; &amp;bbox, int &amp;lx, int &amp;hx, int &amp;ly, int &amp;hy) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Mercator::Segment::clipToSegment </td>
          <td>(</td>
          <td class="paramtype">const WFMath::AxisBox&lt; 2 &gt; &amp;&#160;</td>
          <td class="paramname"><em>bbox</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"><em>lx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"><em>hx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"><em>ly</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"><em>hy</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Determine the intersection between an axis aligned box and this segment. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">bbox</td><td>axis aligned box to be tested. </td></tr>
    <tr><td class="paramname">lx</td><td>lower x coordinate of intersection area. </td></tr>
    <tr><td class="paramname">hx</td><td>upper x coordinate of intersection area. </td></tr>
    <tr><td class="paramname">ly</td><td>lower y coordinate of intersection area. </td></tr>
    <tr><td class="paramname">hy</td><td>upper y coordinate of intersection area. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if the box intersects with this <a class="el" href="classMercator_1_1Segment.html" title="Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...">Segment</a>, false otherwise. </dd></dl>

<p>References <a class="el" href="classMercator_1_1Segment.html#abd9c19268851728d53a0032e6fa0a78c">m_res</a>.</p>

<p>Referenced by <a class="el" href="classMercator_1_1Segment.html#a1ce0d1f46aa2efc5e50e09e882605b39">applyMod()</a>.</p>

</div>
</div>
<a class="anchor" id="a83e6e6c1dac2d37ed3402702cb3e1df6"></a><!-- doxytag: member="Mercator::Segment::fill1d" ref="a83e6e6c1dac2d37ed3402702cb3e1df6" args="(const BasePoint &amp;l, const BasePoint &amp;h, float *array) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Mercator::Segment::fill1d </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classMercator_1_1BasePoint.html">BasePoint</a> &amp;&#160;</td>
          <td class="paramname"><em>l</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classMercator_1_1BasePoint.html">BasePoint</a> &amp;&#160;</td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float *&#160;</td>
          <td class="paramname"><em>array</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const<code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>One dimensional midpoint displacement fractal. </p>
<p>Size must be a power of 2. Falloff is the decay of displacement as the fractal is refined. Array is size + 1 long. array[0] and array[size] are filled with the control points for the fractal. </p>

<p>References <a class="el" href="classMercator_1_1BasePoint.html#ac6fea8de72cf7f30d993e2a7b55cf603">Mercator::BasePoint::FALLOFF</a>, <a class="el" href="classMercator_1_1BasePoint.html#a3f742e08daa4aa5d74480f582b708240">Mercator::BasePoint::height()</a>, <a class="el" href="classMercator_1_1Segment.html#abd9c19268851728d53a0032e6fa0a78c">m_res</a>, <a class="el" href="classMercator_1_1BasePoint.html#a8f2d0b4c91d0abedf6ccb17d7a3b3547">Mercator::BasePoint::roughness()</a>, and <a class="el" href="classMercator_1_1BasePoint.html#a479a70faeca80d1686a3fe273bf87507">Mercator::BasePoint::seed()</a>.</p>

<p>Referenced by <a class="el" href="classMercator_1_1Segment.html#aebf73701914c4751d15d9cec484ce4a0">fill2d()</a>.</p>

</div>
</div>
<a class="anchor" id="aebf73701914c4751d15d9cec484ce4a0"></a><!-- doxytag: member="Mercator::Segment::fill2d" ref="aebf73701914c4751d15d9cec484ce4a0" args="(const BasePoint &amp;p1, const BasePoint &amp;p2, const BasePoint &amp;p3, const BasePoint &amp;p4)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Mercator::Segment::fill2d </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classMercator_1_1BasePoint.html">BasePoint</a> &amp;&#160;</td>
          <td class="paramname"><em>p1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classMercator_1_1BasePoint.html">BasePoint</a> &amp;&#160;</td>
          <td class="paramname"><em>p2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classMercator_1_1BasePoint.html">BasePoint</a> &amp;&#160;</td>
          <td class="paramname"><em>p3</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classMercator_1_1BasePoint.html">BasePoint</a> &amp;&#160;</td>
          <td class="paramname"><em>p4</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Two dimensional midpoint displacement fractal. </p>
<p>For a tile where edges are to be filled by 1d fractals. Size must be a power of 2, array is (size + 1) * (size + 1) with the corners the control points. </p>

<p>References <a class="el" href="classMercator_1_1Segment.html#ad4bff40869f8b8b3bf5d1cb60e9ffc27">checkMaxMin()</a>, <a class="el" href="classMercator_1_1BasePoint.html#ac6fea8de72cf7f30d993e2a7b55cf603">Mercator::BasePoint::FALLOFF</a>, <a class="el" href="classMercator_1_1Segment.html#a83e6e6c1dac2d37ed3402702cb3e1df6">fill1d()</a>, <a class="el" href="classMercator_1_1Segment.html#ac22600d95051cd017f53f10fca12a20e">m_points</a>, <a class="el" href="classMercator_1_1Segment.html#abd9c19268851728d53a0032e6fa0a78c">m_res</a>, <a class="el" href="classMercator_1_1Segment.html#a491907412d4eb428e2347eee96b05a28">m_size</a>, <a class="el" href="classMercator_1_1Segment.html#aaadf516dda37c6c58af36e7029b14656">qRMD()</a>, <a class="el" href="classMercator_1_1BasePoint.html#a8f2d0b4c91d0abedf6ccb17d7a3b3547">Mercator::BasePoint::roughness()</a>, and <a class="el" href="classMercator_1_1BasePoint.html#a479a70faeca80d1686a3fe273bf87507">Mercator::BasePoint::seed()</a>.</p>

<p>Referenced by <a class="el" href="classMercator_1_1Segment.html#a58cc1d8e3359fae3ea38c14fcf3b3e88">populate()</a>.</p>

</div>
</div>
<a class="anchor" id="a5b0e305c1c9b87e5b6dbd0291c7cea01"></a><!-- doxytag: member="Mercator::Segment::getHeightAndNormal" ref="a5b0e305c1c9b87e5b6dbd0291c7cea01" args="(float x, float y, float &amp;h, WFMath::Vector&lt; 3 &gt; &amp;normal) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Mercator::Segment::getHeightAndNormal </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float &amp;&#160;</td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">WFMath::Vector&lt; 3 &gt; &amp;&#160;</td>
          <td class="paramname"><em>normal</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get an accurate height and normal vector at a given coordinate relative to this segment. </p>
<p>The height and surface normal are determined by finding the four adjacent height points nearest to the coordinate, and interpolating between those height values. The square area defined by the 4 height points is considered as two triangles for the purposes of interpolation to ensure that the calculated height falls on the surface rendered by a 3D graphics engine from the same heightfield data. The line used to divide the area is defined by the gradient y = x, so the first triangle has relative vertex coordinates (0,0) (1,0) (1,1) and the second triangle has vertex coordinates (0,0) (0,1) (1,1). </p>

<p>References <a class="el" href="classMercator_1_1Segment.html#abd9c19268851728d53a0032e6fa0a78c">m_res</a>.</p>

<p>Referenced by <a class="el" href="classMercator_1_1Terrain.html#aac5f058f9010a83b166a256504b12fd4">Mercator::Terrain::getHeightAndNormal()</a>.</p>

</div>
</div>
<a class="anchor" id="af576b4f2de72a6a5eb5f6cd7d83c1440"></a><!-- doxytag: member="Mercator::Segment::invalidate" ref="af576b4f2de72a6a5eb5f6cd7d83c1440" args="(bool points=true)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Mercator::Segment::invalidate </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>points</em> = <code>true</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Mark the contents of this <a class="el" href="classMercator_1_1Segment.html" title="Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...">Segment</a> as stale. </p>
<p>This is called internally whenever changes occur that mean that the heightfield and surface normal data are no longer valid. If surface normal storage is deallocated, and if the points argument is true the heightfield storage is also deallocated. </p>

<p>References <a class="el" href="classMercator_1_1Segment.html#a95f3bf7b2c6146edff9d84760c62be3b">invalidateSurfaces()</a>, <a class="el" href="classMercator_1_1Segment.html#ac0b0f720ce76aab5d6dcebfcd5469ed6">m_normals</a>, and <a class="el" href="classMercator_1_1Segment.html#ac22600d95051cd017f53f10fca12a20e">m_points</a>.</p>

<p>Referenced by <a class="el" href="classMercator_1_1Segment.html#a57f2af8a8e02ceb2af77fa53b6487734">addMod()</a>, <a class="el" href="classMercator_1_1Segment.html#a1ce0d1f46aa2efc5e50e09e882605b39">applyMod()</a>, <a class="el" href="classMercator_1_1Segment.html#afa3f6bf647f377e13a54656581f2d846">clearMods()</a>, <a class="el" href="classMercator_1_1Segment.html#a5189556605469694eae6239f01296ec7">removeMod()</a>, <a class="el" href="classMercator_1_1Segment.html#aa77a2f47f03333a1be1d4e8ec6d1995a">setCornerPoint()</a>, and <a class="el" href="classMercator_1_1Segment.html#a1ba7befbcd3a14438e43f777cada7742">updateMod()</a>.</p>

</div>
</div>
<a class="anchor" id="a95f3bf7b2c6146edff9d84760c62be3b"></a><!-- doxytag: member="Mercator::Segment::invalidateSurfaces" ref="a95f3bf7b2c6146edff9d84760c62be3b" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Mercator::Segment::invalidateSurfaces </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Mark surfaces as stale. </p>
<p>This is called internally from <a class="el" href="classMercator_1_1Segment.html#af576b4f2de72a6a5eb5f6cd7d83c1440" title="Mark the contents of this Segment as stale.">Segment::invalidate()</a> when changes occur that mean the surface data is no longer valid. The <a class="el" href="classMercator_1_1Buffer.html#a69db2f6662bdad65a863c7e3c55c50e0" title="De-allocate the storage for this buffer.">Surface::invalidate()</a> method is called for each surface. </p>

<p>References <a class="el" href="classMercator_1_1Segment.html#a14403c34b1b0668886484b2f569064e3">m_surfaces</a>.</p>

<p>Referenced by <a class="el" href="classMercator_1_1Segment.html#af576b4f2de72a6a5eb5f6cd7d83c1440">invalidate()</a>.</p>

</div>
</div>
<a class="anchor" id="a0db338f77e6209301ce61eb2a9f9ad46"></a><!-- doxytag: member="Mercator::Segment::isValid" ref="a0db338f77e6209301ce61eb2a9f9ad46" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const bool Mercator::Segment::isValid </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Check whether this <a class="el" href="classMercator_1_1Segment.html" title="Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...">Segment</a> contains valid point data. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if this <a class="el" href="classMercator_1_1Segment.html" title="Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...">Segment</a> is valid, false otherwise. </dd></dl>

<p>References <a class="el" href="classMercator_1_1Segment.html#ac22600d95051cd017f53f10fca12a20e">m_points</a>.</p>

<p>Referenced by <a class="el" href="classMercator_1_1Terrain.html#a62f7e7f8859f9a57ceb4ada5a8692aa1">Mercator::Terrain::get()</a>, and <a class="el" href="classMercator_1_1Terrain.html#aac5f058f9010a83b166a256504b12fd4">Mercator::Terrain::getHeightAndNormal()</a>.</p>

</div>
</div>
<a class="anchor" id="a58cc1d8e3359fae3ea38c14fcf3b3e88"></a><!-- doxytag: member="Mercator::Segment::populate" ref="a58cc1d8e3359fae3ea38c14fcf3b3e88" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Mercator::Segment::populate </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Populate the <a class="el" href="classMercator_1_1Segment.html" title="Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...">Segment</a> with heightfield data. </p>
<p>Storage for the heightfield data is allocated if necessary, the qRMD algorithm is used to calculate the heightfield data, and required modifications are applied. </p>

<p>References <a class="el" href="classMercator_1_1Segment.html#a1ce0d1f46aa2efc5e50e09e882605b39">applyMod()</a>, <a class="el" href="classMercator_1_1Segment.html#aebf73701914c4751d15d9cec484ce4a0">fill2d()</a>, <a class="el" href="classMercator_1_1Segment.html#a21d4394ff5c5e586410bf9c7dea6b6af">m_controlPoints</a>, <a class="el" href="classMercator_1_1Segment.html#a6ce82dd99e6fdfc257a09bd09a7f50bb">m_modList</a>, <a class="el" href="classMercator_1_1Segment.html#ac22600d95051cd017f53f10fca12a20e">m_points</a>, and <a class="el" href="classMercator_1_1Segment.html#a491907412d4eb428e2347eee96b05a28">m_size</a>.</p>

</div>
</div>
<a class="anchor" id="a73f1453d0e22f30e1941b458ba69ed9f"></a><!-- doxytag: member="Mercator::Segment::populateNormals" ref="a73f1453d0e22f30e1941b458ba69ed9f" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Mercator::Segment::populateNormals </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Populate the <a class="el" href="classMercator_1_1Segment.html" title="Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...">Segment</a> with surface normal data. </p>
<p>Storage for the normals is allocated if necessary, and the average normal at each heightpoint is calculated. The middle normals are calculated first, followed by the boundaries which are done in 2 dimensions to ensure that there is no visible seam between segments. </p>

<p>References <a class="el" href="classMercator_1_1Segment.html#ac0b0f720ce76aab5d6dcebfcd5469ed6">m_normals</a>, <a class="el" href="classMercator_1_1Segment.html#ac22600d95051cd017f53f10fca12a20e">m_points</a>, <a class="el" href="classMercator_1_1Segment.html#abd9c19268851728d53a0032e6fa0a78c">m_res</a>, and <a class="el" href="classMercator_1_1Segment.html#a491907412d4eb428e2347eee96b05a28">m_size</a>.</p>

</div>
</div>
<a class="anchor" id="aeb53cd468934f8053ee7898e6f1505d8"></a><!-- doxytag: member="Mercator::Segment::populateSurfaces" ref="aeb53cd468934f8053ee7898e6f1505d8" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Mercator::Segment::populateSurfaces </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Populate the surfaces associated with this <a class="el" href="classMercator_1_1Segment.html" title="Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...">Segment</a>. </p>
<p>Call <a class="el" href="classMercator_1_1Surface.html#a634963494548fbcaf469a15fce7c5ac9" title="Populate the data buffer using the correct shader.">Surface::populate()</a> for each <a class="el" href="classMercator_1_1Surface.html" title="Data store for terrain surface data.">Surface</a> in turn. </p>

<p>References <a class="el" href="classMercator_1_1Segment.html#a14403c34b1b0668886484b2f569064e3">m_surfaces</a>.</p>

<p>Referenced by <a class="el" href="classMercator_1_1Terrain.html#ae7e53d9e48fd297712b5622abd309105">Mercator::Terrain::shadeSurfaces()</a>.</p>

</div>
</div>
<a class="anchor" id="a5189556605469694eae6239f01296ec7"></a><!-- doxytag: member="Mercator::Segment::removeMod" ref="a5189556605469694eae6239f01296ec7" args="(const TerrainMod *t)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Mercator::Segment::removeMod </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classMercator_1_1TerrainMod.html">TerrainMod</a> *&#160;</td>
          <td class="paramname"><em>tm</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Remove a <a class="el" href="classMercator_1_1TerrainMod.html" title="Base class for modifiers to the procedurally generated terrain.">TerrainMod</a> from this <a class="el" href="classMercator_1_1Segment.html" title="Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...">Segment</a>. </p>
<p>Called from Terrain::removeMod(). </p>

<p>References <a class="el" href="classMercator_1_1Segment.html#af576b4f2de72a6a5eb5f6cd7d83c1440">invalidate()</a>, and <a class="el" href="classMercator_1_1Segment.html#a6ce82dd99e6fdfc257a09bd09a7f50bb">m_modList</a>.</p>

</div>
</div>
<a class="anchor" id="aa77a2f47f03333a1be1d4e8ec6d1995a"></a><!-- doxytag: member="Mercator::Segment::setCornerPoint" ref="aa77a2f47f03333a1be1d4e8ec6d1995a" args="(unsigned int x, unsigned int y, const BasePoint &amp;bp)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Mercator::Segment::setCornerPoint </td>
          <td>(</td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classMercator_1_1BasePoint.html">BasePoint</a> &amp;&#160;</td>
          <td class="paramname"><em>bp</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the <a class="el" href="classMercator_1_1BasePoint.html" title="Point on the fundamental grid that is used as the basis for terrain.">BasePoint</a> data for one of the four that define this <a class="el" href="classMercator_1_1Segment.html" title="Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...">Segment</a>. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>relative x coord of base point. Must be 0 or 1. </td></tr>
    <tr><td class="paramname">y</td><td>relative y coord of base point. Must be 0 or 1. </td></tr>
    <tr><td class="paramname">bp</td><td><a class="el" href="classMercator_1_1BasePoint.html" title="Point on the fundamental grid that is used as the basis for terrain.">BasePoint</a> data to be used. </td></tr>
  </table>
  </dd>
</dl>

<p>References <a class="el" href="classMercator_1_1Segment.html#af576b4f2de72a6a5eb5f6cd7d83c1440">invalidate()</a>, and <a class="el" href="classMercator_1_1Segment.html#a21d4394ff5c5e586410bf9c7dea6b6af">m_controlPoints</a>.</p>

<p>Referenced by <a class="el" href="classMercator_1_1Terrain.html#a3b197b14226ce7778fdebd830f17cfdd">Mercator::Terrain::setBasePoint()</a>.</p>

</div>
</div>
<a class="anchor" id="a7806c078346ecb524e9b8b32b80071f3"></a><!-- doxytag: member="Mercator::Segment::setMinMax" ref="a7806c078346ecb524e9b8b32b80071f3" args="(float min, float max)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Mercator::Segment::setMinMax </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>min</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>max</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set min and max height values for this <a class="el" href="classMercator_1_1Segment.html" title="Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...">Segment</a>. </p>
<p>This is used after construction to set the initial values, and should not be used after populate has been called. </p>

<p>References <a class="el" href="classMercator_1_1Segment.html#a771ad07baa6490732728ab150fd11b9d">m_max</a>, and <a class="el" href="classMercator_1_1Segment.html#a18c43d5280f8072849cac10927296a2b">m_min</a>.</p>

<p>Referenced by <a class="el" href="classMercator_1_1Terrain.html#a3b197b14226ce7778fdebd830f17cfdd">Mercator::Terrain::setBasePoint()</a>.</p>

</div>
</div>
<a class="anchor" id="a1ba7befbcd3a14438e43f777cada7742"></a><!-- doxytag: member="Mercator::Segment::updateMod" ref="a1ba7befbcd3a14438e43f777cada7742" args="(const TerrainMod *t)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Mercator::Segment::updateMod </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classMercator_1_1TerrainMod.html">TerrainMod</a> *&#160;</td>
          <td class="paramname"><em>tm</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Update a <a class="el" href="classMercator_1_1TerrainMod.html" title="Base class for modifiers to the procedurally generated terrain.">TerrainMod</a> in this <a class="el" href="classMercator_1_1Segment.html" title="Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...">Segment</a>. </p>
<p>Called from Terrain::removeMod(). </p>

<p>References <a class="el" href="classMercator_1_1Segment.html#af576b4f2de72a6a5eb5f6cd7d83c1440">invalidate()</a>, and <a class="el" href="classMercator_1_1Segment.html#a6ce82dd99e6fdfc257a09bd09a7f50bb">m_modList</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="Segment_8h_source.html">Segment.h</a></li>
<li>Segment.cpp</li>
</ul>
</div>
<hr class="footer"/><address class="footer"><small>Generated for Mercator by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>