Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 96617cbbea5434e5cff4ccd67437c037 > files > 32

mercator-devel-0.2.7-3.fc12.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Mercator: BasePoint.h Source File</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.5.9 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
    </ul>
  </div>
<h1>BasePoint.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// This file may be redistributed and modified only under the terms of</span>
<a name="l00002"></a>00002 <span class="comment">// the GNU General Public License (See COPYING for details).</span>
<a name="l00003"></a>00003 <span class="comment">// Copyright (C) 2003 Damien McGinnes, Alistair Riddoch</span>
<a name="l00004"></a>00004 
<a name="l00005"></a>00005 <span class="preprocessor">#ifndef MERCATOR_BASE_POINT_H</span>
<a name="l00006"></a>00006 <span class="preprocessor"></span><span class="preprocessor">#define MERCATOR_BASE_POINT_H</span>
<a name="l00007"></a>00007 <span class="preprocessor"></span>
<a name="l00008"></a>00008 <span class="preprocessor">#include &lt;iostream&gt;</span>
<a name="l00009"></a>00009 
<a name="l00010"></a>00010 <span class="keyword">namespace </span>Mercator { 
<a name="l00011"></a>00011 
<a name="l00019"></a><a class="code" href="classMercator_1_1BasePoint.html">00019</a> <span class="keyword">class </span><a class="code" href="classMercator_1_1BasePoint.html" title="Point on the fundamental grid that is used as the basis for terrain.">BasePoint</a> {
<a name="l00020"></a>00020   <span class="keyword">private</span>:
<a name="l00022"></a><a class="code" href="classMercator_1_1BasePoint.html#6d371a9676d73f928347be68da1f8488">00022</a>     <span class="keywordtype">float</span> <a class="code" href="classMercator_1_1BasePoint.html#6d371a9676d73f928347be68da1f8488" title="The height at the base point.">m_height</a>;
<a name="l00024"></a><a class="code" href="classMercator_1_1BasePoint.html#351e22d1f6e0772e5a017680ebd3e313">00024</a>     <span class="keywordtype">float</span> <a class="code" href="classMercator_1_1BasePoint.html#351e22d1f6e0772e5a017680ebd3e313" title="The roughness at the base point.">m_roughness</a>;
<a name="l00026"></a><a class="code" href="classMercator_1_1BasePoint.html#d5e4dd8cec302b2c5d9b4ae3e024a449">00026</a>     <span class="keywordtype">float</span> <a class="code" href="classMercator_1_1BasePoint.html#d5e4dd8cec302b2c5d9b4ae3e024a449" title="The falloff at the base point.">m_falloff</a>;
<a name="l00027"></a>00027 
<a name="l00028"></a>00028   <span class="keyword">public</span>:
<a name="l00030"></a><a class="code" href="classMercator_1_1BasePoint.html#75ea29975e41decd1d28910c860b9c7c">00030</a>     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">float</span> <a class="code" href="classMercator_1_1BasePoint.html#75ea29975e41decd1d28910c860b9c7c" title="Default height at the base point.">HEIGHT</a>;
<a name="l00032"></a><a class="code" href="classMercator_1_1BasePoint.html#4cba8bcf0560a5dc44676d57b482b7d6">00032</a>     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">float</span> <a class="code" href="classMercator_1_1BasePoint.html#4cba8bcf0560a5dc44676d57b482b7d6" title="Default roughness at the base point.">ROUGHNESS</a>;
<a name="l00034"></a><a class="code" href="classMercator_1_1BasePoint.html#c6fea8de72cf7f30d993e2a7b55cf603">00034</a>     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">float</span> <a class="code" href="classMercator_1_1BasePoint.html#c6fea8de72cf7f30d993e2a7b55cf603" title="Default falloff at the base point.">FALLOFF</a>;
<a name="l00035"></a>00035 
<a name="l00041"></a><a class="code" href="classMercator_1_1BasePoint.html#cb0738f587daed82d0eee6a9ccc3d98a">00041</a>     <span class="keyword">explicit</span> <a class="code" href="classMercator_1_1BasePoint.html#cb0738f587daed82d0eee6a9ccc3d98a" title="Constructor.">BasePoint</a>(<span class="keywordtype">float</span> h = <a class="code" href="classMercator_1_1BasePoint.html#75ea29975e41decd1d28910c860b9c7c" title="Default height at the base point.">HEIGHT</a>,
<a name="l00042"></a>00042                        <span class="keywordtype">float</span> r = <a class="code" href="classMercator_1_1BasePoint.html#4cba8bcf0560a5dc44676d57b482b7d6" title="Default roughness at the base point.">ROUGHNESS</a>,
<a name="l00043"></a>00043                        <span class="keywordtype">float</span> f = <a class="code" href="classMercator_1_1BasePoint.html#c6fea8de72cf7f30d993e2a7b55cf603" title="Default falloff at the base point.">FALLOFF</a>) :
<a name="l00044"></a>00044              <a class="code" href="classMercator_1_1BasePoint.html#6d371a9676d73f928347be68da1f8488" title="The height at the base point.">m_height</a>(h), <a class="code" href="classMercator_1_1BasePoint.html#351e22d1f6e0772e5a017680ebd3e313" title="The roughness at the base point.">m_roughness</a>(r), <a class="code" href="classMercator_1_1BasePoint.html#d5e4dd8cec302b2c5d9b4ae3e024a449" title="The falloff at the base point.">m_falloff</a>(f) {}
<a name="l00045"></a>00045 
<a name="l00047"></a><a class="code" href="classMercator_1_1BasePoint.html#3f742e08daa4aa5d74480f582b708240">00047</a>     <span class="keyword">const</span> <span class="keywordtype">float</span> <a class="code" href="classMercator_1_1BasePoint.html#3f742e08daa4aa5d74480f582b708240" title="Accessor for the height at the base point.">height</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classMercator_1_1BasePoint.html#6d371a9676d73f928347be68da1f8488" title="The height at the base point.">m_height</a>; }
<a name="l00049"></a><a class="code" href="classMercator_1_1BasePoint.html#fd06990a536cf5b7beb752aef72f64d4">00049</a>     <span class="keywordtype">float</span> &amp; <a class="code" href="classMercator_1_1BasePoint.html#fd06990a536cf5b7beb752aef72f64d4" title="Accessor for the height at the base point.">height</a>() { <span class="keywordflow">return</span> <a class="code" href="classMercator_1_1BasePoint.html#6d371a9676d73f928347be68da1f8488" title="The height at the base point.">m_height</a>; }
<a name="l00050"></a>00050 
<a name="l00052"></a><a class="code" href="classMercator_1_1BasePoint.html#8f2d0b4c91d0abedf6ccb17d7a3b3547">00052</a>     <span class="keyword">const</span> <span class="keywordtype">float</span> <a class="code" href="classMercator_1_1BasePoint.html#8f2d0b4c91d0abedf6ccb17d7a3b3547" title="Accessor for the roughness at the base point.">roughness</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classMercator_1_1BasePoint.html#351e22d1f6e0772e5a017680ebd3e313" title="The roughness at the base point.">m_roughness</a>; }
<a name="l00054"></a><a class="code" href="classMercator_1_1BasePoint.html#87074a8e4cd81cd53245ff63739836b9">00054</a>     <span class="keywordtype">float</span> &amp; <a class="code" href="classMercator_1_1BasePoint.html#87074a8e4cd81cd53245ff63739836b9" title="Accessor for the roughness at the base point.">roughness</a>() { <span class="keywordflow">return</span> <a class="code" href="classMercator_1_1BasePoint.html#351e22d1f6e0772e5a017680ebd3e313" title="The roughness at the base point.">m_roughness</a>; }
<a name="l00055"></a>00055 
<a name="l00057"></a><a class="code" href="classMercator_1_1BasePoint.html#1cd9349c213a54d4c11fa42278540aff">00057</a>     <span class="keyword">const</span> <span class="keywordtype">float</span> <a class="code" href="classMercator_1_1BasePoint.html#1cd9349c213a54d4c11fa42278540aff" title="Accessor for the falloff at the base point.">falloff</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classMercator_1_1BasePoint.html#d5e4dd8cec302b2c5d9b4ae3e024a449" title="The falloff at the base point.">m_falloff</a>; }
<a name="l00059"></a><a class="code" href="classMercator_1_1BasePoint.html#d559546ddf37cad56b510089f88672e4">00059</a>     <span class="keywordtype">float</span> &amp; <a class="code" href="classMercator_1_1BasePoint.html#d559546ddf37cad56b510089f88672e4" title="Accessor for the falloff at the base point.">falloff</a>() { <span class="keywordflow">return</span> <a class="code" href="classMercator_1_1BasePoint.html#d5e4dd8cec302b2c5d9b4ae3e024a449" title="The falloff at the base point.">m_falloff</a>; }
<a name="l00060"></a>00060 
<a name="l00062"></a><a class="code" href="classMercator_1_1BasePoint.html#479a70faeca80d1686a3fe273bf87507">00062</a>     <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classMercator_1_1BasePoint.html#479a70faeca80d1686a3fe273bf87507" title="Calculate the random seed used at this base point.">seed</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>)(<a class="code" href="classMercator_1_1BasePoint.html#6d371a9676d73f928347be68da1f8488" title="The height at the base point.">m_height</a> * 1000.0);}
<a name="l00063"></a>00063 };
<a name="l00064"></a>00064 
<a name="l00065"></a>00065 } <span class="comment">//namespace Mercator</span>
<a name="l00066"></a>00066 
<a name="l00067"></a>00067 <span class="preprocessor">#endif // MERCATOR_BASE_POINT_H</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated for Mercator by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address>
</body>
</html>