Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > c64f89a8a05df304b0d9ff680ae1aa00 > files > 60

mercator-devel-0.2.7-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::Area 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.3 -->
<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_1Area.html">Area</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a>  </div>
  <div class="headertitle">
<h1>Mercator::Area Class Reference</h1>  </div>
</div>
<div class="contents">
<!-- doxytag: class="Mercator::Area" -->
<p>Region of terrain surface which is modified.  
<a href="#_details">More...</a></p>

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

<p><a href="classMercator_1_1Area-members.html">List of all members.</a></p>
<table class="memberdecls">
<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_1Area.html#a7c878e0c945ee272b9bc882b8e7facd7">Area</a> (int layer, bool hole)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <a href="#a7c878e0c945ee272b9bc882b8e7facd7"></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_1Area.html#a7fcab9894d4b401b23222a1e9a9d6f9b">setLayer</a> (int layer, bool hole)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the layer number and flag indicating whether this is a hole.  <a href="#a7fcab9894d4b401b23222a1e9a9d6f9b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afc2e16fe3fe371db9d4160996befc91e"></a><!-- doxytag: member="Mercator::Area::setShape" ref="afc2e16fe3fe371db9d4160996befc91e" args="(const WFMath::Polygon&lt; 2 &gt; &amp;p)" -->
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Area.html#afc2e16fe3fe371db9d4160996befc91e">setShape</a> (const WFMath::Polygon&lt; 2 &gt; &amp;p)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the geometric shape of this area. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa10b34db6052f0d26a736cf3ffb31fc5"></a><!-- doxytag: member="Mercator::Area::contains" ref="aa10b34db6052f0d26a736cf3ffb31fc5" args="(double x, double y) const " -->
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Area.html#aa10b34db6052f0d26a736cf3ffb31fc5">contains</a> (double x, double y) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Determine if a point is contained by the shape of this area. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9d81d485c5e85c682753842211cc933f"></a><!-- doxytag: member="Mercator::Area::getLayer" ref="a9d81d485c5e85c682753842211cc933f" args="() const " -->
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Area.html#a9d81d485c5e85c682753842211cc933f">getLayer</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Accessor for the layer number. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7039127a59ac3e55a18c643b6ce2b261"></a><!-- doxytag: member="Mercator::Area::isHole" ref="a7039127a59ac3e55a18c643b6ce2b261" args="() const " -->
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Area.html#a7039127a59ac3e55a18c643b6ce2b261">isHole</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Accessor for the flag indicating whether this is a hole. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aeb2617db5868cfd139dd7cbeac31cadb"></a><!-- doxytag: member="Mercator::Area::bbox" ref="aeb2617db5868cfd139dd7cbeac31cadb" args="() const " -->
const WFMath::AxisBox&lt; 2 &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Area.html#aeb2617db5868cfd139dd7cbeac31cadb">bbox</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Accessor for the bounding box of the geometric shape. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5d795116bdab81597e4f86b6880d59db"></a><!-- doxytag: member="Mercator::Area::shape" ref="a5d795116bdab81597e4f86b6880d59db" args="() const " -->
const WFMath::Polygon&lt; 2 &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Area.html#a5d795116bdab81597e4f86b6880d59db">shape</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Accessor for the geometric shape. <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_1Area.html#a42c098d924e789ea77914d076f553bcf">checkIntersects</a> (const <a class="el" href="classMercator_1_1Segment.html">Segment</a> &amp;s) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">WFMath::Polygon&lt; 2 &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Area.html#ae1ccc0db586cbc1ea0d9dbef67da2251">clipToSegment</a> (const <a class="el" href="classMercator_1_1Segment.html">Segment</a> &amp;s) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Clip the shape of this area to a given segment.  <a href="#ae1ccc0db586cbc1ea0d9dbef67da2251"></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="a9c5453670b795204eb81f4b19ecfe5b6"></a><!-- doxytag: member="Mercator::Area::m_layer" ref="a9c5453670b795204eb81f4b19ecfe5b6" args="" -->
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Area.html#a9c5453670b795204eb81f4b19ecfe5b6">m_layer</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The layer number. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a10a76a9d5e31c5d90dd59592e91e8795"></a><!-- doxytag: member="Mercator::Area::m_hole" ref="a10a76a9d5e31c5d90dd59592e91e8795" args="" -->
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Area.html#a10a76a9d5e31c5d90dd59592e91e8795">m_hole</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">A flag indicating whether this is a hole. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a08b8fae164886e22219c2264eff655a9"></a><!-- doxytag: member="Mercator::Area::m_shape" ref="a08b8fae164886e22219c2264eff655a9" args="" -->
WFMath::Polygon&lt; 2 &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Area.html#a08b8fae164886e22219c2264eff655a9">m_shape</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The geometric shape. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad37818603fb85847e2cbb7c676a79810"></a><!-- doxytag: member="Mercator::Area::m_box" ref="ad37818603fb85847e2cbb7c676a79810" args="" -->
WFMath::AxisBox&lt; 2 &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMercator_1_1Area.html#ad37818603fb85847e2cbb7c676a79810">m_box</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The bounding box of the geometric shape. <br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Region of terrain surface which is modified. </p>
<p>Objects of this class describe regions of the surface which have been changed. Which layers of the shaded terrain is affected by their layer number. For example, if they are below the snow layer then the snow shader will cover them where the area affected by snow intersects with the area, but the lower grass area will be overriden. In order to get the best effect it is important to select the layer carefully. </p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a7c878e0c945ee272b9bc882b8e7facd7"></a><!-- doxytag: member="Mercator::Area::Area" ref="a7c878e0c945ee272b9bc882b8e7facd7" args="(int layer, bool hole)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Mercator::Area::Area </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>layer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>hole</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Constructor. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">layer</td><td>layer number. </td></tr>
    <tr><td class="paramname">hole</td><td>flag indicating whether this is a hole. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a42c098d924e789ea77914d076f553bcf"></a><!-- doxytag: member="Mercator::Area::checkIntersects" ref="a42c098d924e789ea77914d076f553bcf" args="(const Segment &amp;s) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Mercator::Area::checkIntersects </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classMercator_1_1Segment.html">Segment</a> &amp;&#160;</td>
          <td class="paramname"><em>s</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Test if a segment intersects this area </p>

<p>Referenced by <a class="el" href="classMercator_1_1Terrain.html#ad391b60b4fcea43445c390c5e61f6dfd">Mercator::Terrain::addArea()</a>, <a class="el" href="classMercator_1_1Terrain.html#ad2f7fa62ce4a1ce226804a73d318eccf">Mercator::Terrain::removeArea()</a>, and <a class="el" href="classMercator_1_1Terrain.html#ab9f5ce5bef83d9877474e51195c861b9">Mercator::Terrain::updateArea()</a>.</p>

</div>
</div>
<a class="anchor" id="ae1ccc0db586cbc1ea0d9dbef67da2251"></a><!-- doxytag: member="Mercator::Area::clipToSegment" ref="ae1ccc0db586cbc1ea0d9dbef67da2251" args="(const Segment &amp;s) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">WFMath::Polygon&lt; 2 &gt; Mercator::Area::clipToSegment </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classMercator_1_1Segment.html">Segment</a> &amp;&#160;</td>
          <td class="paramname"><em>s</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Clip the shape of this area to a given segment. </p>
<p>Determines the intersection of the geometric shape of this area with a square terrain segment, and returns the intersection as a geometric shape. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">s</td><td>the segment that the shape should be clipped to. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the shape of the intersection of this area with the segment. </dd></dl>

</div>
</div>
<a class="anchor" id="a7fcab9894d4b401b23222a1e9a9d6f9b"></a><!-- doxytag: member="Mercator::Area::setLayer" ref="a7fcab9894d4b401b23222a1e9a9d6f9b" args="(int layer, bool hole)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Mercator::Area::setLayer </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>layer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>hole</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the layer number and flag indicating whether this is a hole. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">layer</td><td>layer number. </td></tr>
    <tr><td class="paramname">hole</td><td>flag indicating whether this is a hole. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="Area_8h_source.html">Area.h</a></li>
<li>Area.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.3 </small></address>
</body>
</html>