Sophie

Sophie

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

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: TileShader.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.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><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<h1>TileShader.h</h1>  </div>
</div>
<div class="contents">
<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) 2005 Alistair Riddoch</span>
<a name="l00004"></a>00004 
<a name="l00005"></a>00005 <span class="preprocessor">#ifndef MERCATOR_TILE_SHADER_H</span>
<a name="l00006"></a>00006 <span class="preprocessor"></span><span class="preprocessor">#define MERCATOR_TILE_SHADER_H</span>
<a name="l00007"></a>00007 <span class="preprocessor"></span>
<a name="l00008"></a>00008 <span class="preprocessor">#include &lt;Mercator/Shader.h&gt;</span>
<a name="l00009"></a>00009 
<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;map&gt;</span>
<a name="l00011"></a>00011 
<a name="l00012"></a>00012 <span class="keyword">namespace </span>Mercator {
<a name="l00013"></a>00013 
<a name="l00021"></a><a class="code" href="classMercator_1_1TileShader.html">00021</a> <span class="keyword">class </span><a class="code" href="classMercator_1_1TileShader.html" title="Shader agregating surface data.">TileShader</a> : <span class="keyword">public</span> <a class="code" href="classMercator_1_1Shader.html" title="Base class for Shader objects which create surface data for use when rendering terrain.">Shader</a> {
<a name="l00022"></a>00022   <span class="keyword">public</span>:
<a name="l00024"></a><a class="code" href="classMercator_1_1TileShader.html#a1ce547e611fde5576d949a0e6fc6eb06">00024</a>     <span class="keyword">typedef</span> std::map&lt;int, Shader *&gt; <a class="code" href="classMercator_1_1TileShader.html#a1ce547e611fde5576d949a0e6fc6eb06" title="STL map to store sparse array of Shader pointers.">Shaderstore</a>;
<a name="l00025"></a>00025   <span class="keyword">private</span>:
<a name="l00027"></a><a class="code" href="classMercator_1_1TileShader.html#aa3be6ff97532009c5db1e7f11983fe8d">00027</a>     <a class="code" href="classMercator_1_1TileShader.html#a1ce547e611fde5576d949a0e6fc6eb06" title="STL map to store sparse array of Shader pointers.">Shaderstore</a> <a class="code" href="classMercator_1_1TileShader.html#aa3be6ff97532009c5db1e7f11983fe8d" title="Store of shaders which are agregated by this shader.">m_subShaders</a>;
<a name="l00028"></a>00028   <span class="keyword">public</span>:
<a name="l00029"></a>00029     <span class="keyword">explicit</span> <a class="code" href="classMercator_1_1TileShader.html" title="Shader agregating surface data.">TileShader</a>();
<a name="l00030"></a>00030     <span class="keyword">virtual</span> ~<a class="code" href="classMercator_1_1TileShader.html" title="Shader agregating surface data.">TileShader</a>();
<a name="l00031"></a>00031 
<a name="l00033"></a><a class="code" href="classMercator_1_1TileShader.html#a107634b523f5ab462e19c5ea748d6bff">00033</a>     <span class="keywordtype">void</span> <a class="code" href="classMercator_1_1TileShader.html#a107634b523f5ab462e19c5ea748d6bff" title="Add a shader to those agregated by the tile shader.">addShader</a>(<a class="code" href="classMercator_1_1Shader.html" title="Base class for Shader objects which create surface data for use when rendering terrain.">Shader</a> * t, <span class="keywordtype">int</span> <span class="keywordtype">id</span>) {
<a name="l00034"></a>00034         <a class="code" href="classMercator_1_1TileShader.html#aa3be6ff97532009c5db1e7f11983fe8d" title="Store of shaders which are agregated by this shader.">m_subShaders</a>[id] = t;
<a name="l00035"></a>00035     }
<a name="l00036"></a>00036 
<a name="l00037"></a>00037     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classMercator_1_1TileShader.html#a5cb9b0c15d7ff4804db74485fbbb00b9" title="Check whether this Shader has any effect on the given Segment.">checkIntersect</a>(<span class="keyword">const</span> <a class="code" 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> &amp;) <span class="keyword">const</span>;
<a name="l00038"></a>00038     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classMercator_1_1TileShader.html#abd0a5c09f9df1db089ad410f974a7deb" title="Populate a Surface with data.">shade</a>(<a class="code" href="classMercator_1_1Surface.html" title="Data store for terrain surface data.">Surface</a> &amp;) <span class="keyword">const</span>;
<a name="l00039"></a>00039 };
<a name="l00040"></a>00040 
<a name="l00041"></a>00041 } <span class="comment">// namespace Mercator</span>
<a name="l00042"></a>00042 
<a name="l00043"></a>00043 <span class="preprocessor">#endif // MERCATOR_TILE_SHADER_H</span>
</pre></div></div>
</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>