Sophie

Sophie

distrib > Mandriva > 10.2 > i586 > media > contrib > by-pkgid > 04e5d8c10ae76748689b4e7f48e0fa33 > files > 3085

libogre5-devel-1.0.0-1mdk.i586.rpm

<html>
<head>
<title>Ogre::TerrainPageSource class Reference - OGRE Documentation</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 
<link type="text/css" rel="stylesheet" href="style.css">
</head>

<body>
<!-- Generated by Doxygen 1.3.6 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
<h1>Ogre::TerrainPageSource Class Reference</h1>Abstract class which describes the interface which a source of terrain pages must implement.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="OgreTerrainPageSource_8h-source.html">OgreTerrainPageSource.h</a>&gt;</code>
<p>
Inheritance diagram for Ogre::TerrainPageSource:<p><center><img src="classOgre_1_1TerrainPageSource__inherit__graph.png" border="0" usemap="#Ogre_1_1TerrainPageSource__inherit__map" alt="Inheritance graph"></center>
<map name="Ogre_1_1TerrainPageSource__inherit__map">
<area href="classOgre_1_1HeightmapTerrainPageSource.html" shape="rect" coords="7,87,231,105" alt="">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classOgre_1_1TerrainPageSource-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1TerrainPageSource.html#Ogre_1_1TerrainPageSourcea0">TerrainPageSource</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>virtual&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1TerrainPageSource.html#Ogre_1_1TerrainPageSourcea1">~TerrainPageSource</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1TerrainPageSource.html#Ogre_1_1TerrainPageSourcea2">initialise</a> (<a class="el" href="classOgre_1_1TerrainSceneManager.html">TerrainSceneManager</a> *tsm, <a class="el" href="namespaceOgre.html#a422">ushort</a> tileSize, <a class="el" href="namespaceOgre.html#a422">ushort</a> pageSize, bool asyncLoading, <a class="el" href="namespaceOgre.html#a560">TerrainPageSourceOptionList</a> &amp;optionList)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initialise this tile source based on a series of options as dictated by the scene manager.  <a href="#Ogre_1_1TerrainPageSourcea2"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1TerrainPageSource.html#Ogre_1_1TerrainPageSourcea3">shutdown</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Shut down this tile source, freeing all it's memory ready for decommissioning.  <a href="#Ogre_1_1TerrainPageSourcea3"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1TerrainPageSource.html#Ogre_1_1TerrainPageSourcea4">requestPage</a> (<a class="el" href="namespaceOgre.html#a422">ushort</a> x, <a class="el" href="namespaceOgre.html#a422">ushort</a> z)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Requests a new page of tiles from the source.  <a href="#Ogre_1_1TerrainPageSourcea4"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1TerrainPageSource.html#Ogre_1_1TerrainPageSourcea5">expirePage</a> (<a class="el" href="namespaceOgre.html#a422">ushort</a> x, <a class="el" href="namespaceOgre.html#a422">ushort</a> z)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This notifies the tile source that the specified page of tiles has been automatically detached.  <a href="#Ogre_1_1TerrainPageSourcea5"></a><br><br></td></tr>
<tr><td colspan=2><br><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1TerrainPageSource.html#Ogre_1_1TerrainPageSourcee0">addListener</a> (<a class="el" href="classOgre_1_1TerrainPageSourceListener.html">TerrainPageSourceListener</a> *pl)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Register a class which will be called back whenever a new page is available.  <a href="#Ogre_1_1TerrainPageSourcee0"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1TerrainPageSource.html#Ogre_1_1TerrainPageSourcee1">removeListener</a> (<a class="el" href="classOgre_1_1TerrainPageSourceListener.html">TerrainPageSourceListener</a> *pl)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Unregister a class which will be called back whenever a new page is available.  <a href="#Ogre_1_1TerrainPageSourcee1"></a><br><br></td></tr>
<tr><td colspan=2><br><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="classOgre_1_1TerrainPage.html">TerrainPage</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1TerrainPageSource.html#Ogre_1_1TerrainPageSourceb0">buildPage</a> (<a class="el" href="namespaceOgre.html#a420">Real</a> *heightData, const <a class="el" href="classOgre_1_1MaterialPtr.html">MaterialPtr</a> &amp;pMaterial)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Utility method for building a page of tiles based on some source data, wherever that may have come from.  <a href="#Ogre_1_1TerrainPageSourceb0"></a><br><br></td></tr>
<tr><td colspan=2><br><h2>Static Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1TerrainPageSource.html#Ogre_1_1TerrainPageSourcef0">firePageConstructed</a> (size_t pagex, size_t pagez, <a class="el" href="namespaceOgre.html#a420">Real</a> *heightData)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Internal method for firing pageContructed events.  <a href="#Ogre_1_1TerrainPageSourcef0"></a><br><br></td></tr>
<tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classOgre_1_1TerrainSceneManager.html">TerrainSceneManager</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1TerrainPageSource.html#Ogre_1_1TerrainPageSourcep0">mSceneManager</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Link back to parent manager.  <a href="#Ogre_1_1TerrainPageSourcep0"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1TerrainPageSource.html#Ogre_1_1TerrainPageSourcep1">mAsyncLoading</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Has asynchronous loading been requested?  <a href="#Ogre_1_1TerrainPageSourcep1"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>unsigned short&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1TerrainPageSource.html#Ogre_1_1TerrainPageSourcep2">mPageSize</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The expected size of the page in number of vertices.  <a href="#Ogre_1_1TerrainPageSourcep2"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>unsigned short&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1TerrainPageSource.html#Ogre_1_1TerrainPageSourcep3">mTileSize</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The expected size of a tile in number of vertices.  <a href="#Ogre_1_1TerrainPageSourcep3"></a><br><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Abstract class which describes the interface which a source of terrain pages must implement. 
<p>
<dl compact><dt><b>Remarks:</b></dt><dd>The <a class="el" href="classOgre_1_1TerrainSceneManager.html">TerrainSceneManager</a> can accept external classes as providers of terrain data, to allow terrain height data to come from anywhere the user application may choose, and additionally to support on-demand loading an unloading of terrain data. Providers must suclass this class, and implement the abstract methods (details are described within each method) </dd></dl>
<dl compact><dt><b></b></dt><dd>The overall sequence of events is this: <ol>
<li>
<a class="el" href="classOgre_1_1TerrainSceneManager.html">TerrainSceneManager</a> is created as usual, and options such as tile size etc are set. </li>
<li>
CustomTerrainPageSource is registered with <a class="el" href="classOgre_1_1TerrainSceneManager.html">TerrainSceneManager</a> by calling registerPageSource(), registering a particular named type of source data with this tile source. </li>
<li>
</li>
<li>
<a class="el" href="classOgre_1_1TerrainSceneManager.html#Ogre_1_1TerrainSceneManagera2">TerrainSceneManager::setWorldGeometry</a> is called. Depending on the configuration, this will call one of the page source classes initialise methods, when the scene manager will communicate it's preferred options. It does not have to load anything immediately on this call (especially if the terrain options include paging). It will also set this tile source as the primary.</li>
<li>
</li>
<li>
As and when <a class="el" href="classOgre_1_1TerrainSceneManager.html">TerrainSceneManager</a> requires more tiles (and this will either be done all up-front, or progressively depending on paging settings) it will call the primary tile source's <a class="el" href="classOgre_1_1TerrainPageSource.html#Ogre_1_1TerrainPageSourcea4">requestPage()</a> method, with the page it requires.  </li>
<li>
It is then the responsibility of the tile source to prepare <a class="el" href="classOgre_1_1TerrainRenderable.html">TerrainRenderable</a> instances for the page(s) requested, and to attach them to the <a class="el" href="classOgre_1_1TerrainSceneManager.html">TerrainSceneManager</a>. Note that preparing the tiles does not involve modifying any shared data so may be done in an alternate thread, if required. Attaching them must be done synchronously though. </li>
<li>
When paging, the <a class="el" href="classOgre_1_1TerrainSceneManager.html">TerrainSceneManager</a> will request tiles in advance, within it's 'buffer zone' so some delay in loading is acceptable. It will also indicate when tiles are no longer required (and will detach them); it is up to the tile source whether that memory is actually freed or held for a while longer. </li>
</ol>
</dd></dl>
<dl compact><dt><b>Note:</b></dt><dd>The comments on paging above are in principle, the implementation of paging in this manager is not present yet but the system is designed to extend to it. For now, all tiles are requested up-front. </dd></dl>

<p>

<p>
Definition at line <a class="el" href="OgreTerrainPageSource_8h-source.html#l00131">131</a> of file <a class="el" href="OgreTerrainPageSource_8h-source.html">OgreTerrainPageSource.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="Ogre_1_1TerrainPageSourcea0" doxytag="Ogre::TerrainPageSource::TerrainPageSource" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> Ogre::TerrainPageSource::TerrainPageSource </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a class="anchor" name="Ogre_1_1TerrainPageSourcea1" doxytag="Ogre::TerrainPageSource::~TerrainPageSource" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual Ogre::TerrainPageSource::~<a class="el" href="classOgre_1_1TerrainPageSource.html">TerrainPageSource</a> </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="OgreTerrainPageSource_8h-source.html#l00158">158</a> of file <a class="el" href="OgreTerrainPageSource_8h-source.html">OgreTerrainPageSource.h</a>.    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="Ogre_1_1TerrainPageSourcee0" doxytag="Ogre::TerrainPageSource::addListener" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void Ogre::TerrainPageSource::addListener </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="classOgre_1_1TerrainPageSourceListener.html">TerrainPageSourceListener</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>pl</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [static]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Register a class which will be called back whenever a new page is available. 
<p>
<dl compact><dt><b>Remarks:</b></dt><dd>Since this method is static, it applies to any page source which is in active use; there is no need to register one per source. </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="Ogre_1_1TerrainPageSourceb0" doxytag="Ogre::TerrainPageSource::buildPage" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual <a class="el" href="classOgre_1_1TerrainPage.html">TerrainPage</a>* Ogre::TerrainPageSource::buildPage </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="namespaceOgre.html#a420">Real</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>heightData</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="classOgre_1_1MaterialPtr.html">MaterialPtr</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>pMaterial</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [protected, virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Utility method for building a page of tiles based on some source data, wherever that may have come from. 
<p>
<dl compact><dt><b>Remarks:</b></dt><dd>It is expected that this height data is represented in the range [0..1], which will be duly scaled by the TerrainRenderables it creates. </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="Ogre_1_1TerrainPageSourcea5" doxytag="Ogre::TerrainPageSource::expirePage" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual void Ogre::TerrainPageSource::expirePage </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="namespaceOgre.html#a422">ushort</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>x</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="namespaceOgre.html#a422">ushort</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>z</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [pure virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
This notifies the tile source that the specified page of tiles has been automatically detached. 
<p>
<dl compact><dt><b>Remarks:</b></dt><dd>When paging is enabled, tiles go out of scope and the <a class="el" href="classOgre_1_1TerrainSceneManager.html">TerrainSceneManager</a> detaches them automatically, notifying the <a class="el" href="classOgre_1_1TerrainPageSource.html">TerrainPageSource</a> that this has happened. The tile source can choose to either keep these tiles in memory (incase they are requested again) or can delete them if it wishes to free memory. This freeing does not need to be done before the return of this method - like requesting tiles, the freeing of them can be done in another thread or across many frames if required, since the shared data in <a class="el" href="classOgre_1_1TerrainSceneManager.html">TerrainSceneManager</a> has already been updated synchronously when the page was detached. </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>x</em>&nbsp;</td><td>The x index of the page expired </td></tr>
    <tr><td valign=top><em>z</em>&nbsp;</td><td>The z index of the page expired </td></tr>
  </table>
</dl>

<p>
Implemented in <a class="el" href="classOgre_1_1HeightmapTerrainPageSource.html#Ogre_1_1HeightmapTerrainPageSourcea4">Ogre::HeightmapTerrainPageSource</a>.    </td>
  </tr>
</table>
<a class="anchor" name="Ogre_1_1TerrainPageSourcef0" doxytag="Ogre::TerrainPageSource::firePageConstructed" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void Ogre::TerrainPageSource::firePageConstructed </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">size_t&nbsp;</td>
          <td class="mdname" nowrap> <em>pagex</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>size_t&nbsp;</td>
          <td class="mdname" nowrap> <em>pagez</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="namespaceOgre.html#a420">Real</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>heightData</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [static, protected]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Internal method for firing pageContructed events. 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="Ogre_1_1TerrainPageSourcea2" doxytag="Ogre::TerrainPageSource::initialise" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual void Ogre::TerrainPageSource::initialise </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="classOgre_1_1TerrainSceneManager.html">TerrainSceneManager</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>tsm</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="namespaceOgre.html#a422">ushort</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>tileSize</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="namespaceOgre.html#a422">ushort</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>pageSize</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>asyncLoading</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="namespaceOgre.html#a560">TerrainPageSourceOptionList</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>optionList</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Initialise this tile source based on a series of options as dictated by the scene manager. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>tsm</em>&nbsp;</td><td>The <a class="el" href="classOgre_1_1TerrainSceneManager.html">TerrainSceneManager</a> doing the initialising. This should be allowed NULL, for use by external tools if they want to read data generically without necessarily having a real scene manager involved </td></tr>
    <tr><td valign=top><em>tileSize</em>&nbsp;</td><td>The number of horizontal (and hence also vertical) vertices in a single tile (which is a <a class="el" href="classOgre_1_1TerrainRenderable.html">TerrainRenderable</a>). This will always be (2^n)+1. </td></tr>
    <tr><td valign=top><em>pageSize</em>&nbsp;</td><td>The number of horizontal (and hence also vertical) vertices in a single page. This will always be (2^n)+1. </td></tr>
    <tr><td valign=top><em>asyncLoading</em>&nbsp;</td><td>True if the scene manager would like the tile source to load tiles asynchronously. It does not have to do this, although if it does not when requested, it will likely result in stalls in the terrain rendering. </td></tr>
    <tr><td valign=top><em>optionList</em>&nbsp;</td><td>A list of name/value pairs describing custom options for this particular page source. The expected convention for option names is "TypeName.OptionName", where TypeName is the type under which this page source has been registered. </td></tr>
  </table>
</dl>

<p>
Reimplemented in <a class="el" href="classOgre_1_1HeightmapTerrainPageSource.html#Ogre_1_1HeightmapTerrainPageSourcea5">Ogre::HeightmapTerrainPageSource</a>.
<p>
Definition at line <a class="el" href="OgreTerrainPageSource_8h-source.html#l00180">180</a> of file <a class="el" href="OgreTerrainPageSource_8h-source.html">OgreTerrainPageSource.h</a>.
<p>
References <a class="el" href="OgreTerrainPageSource_8h-source.html#l00035">Ogre::TerrainPageSourceOptionList</a>, and <a class="el" href="OgrePrerequisites_8h-source.html#l00140">Ogre::ushort</a>.    </td>
  </tr>
</table>
<a class="anchor" name="Ogre_1_1TerrainPageSourcee1" doxytag="Ogre::TerrainPageSource::removeListener" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void Ogre::TerrainPageSource::removeListener </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="classOgre_1_1TerrainPageSourceListener.html">TerrainPageSourceListener</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>pl</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [static]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Unregister a class which will be called back whenever a new page is available. 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="Ogre_1_1TerrainPageSourcea4" doxytag="Ogre::TerrainPageSource::requestPage" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual void Ogre::TerrainPageSource::requestPage </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="namespaceOgre.html#a422">ushort</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>x</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="namespaceOgre.html#a422">ushort</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>z</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [pure virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Requests a new page of tiles from the source. 
<p>
<dl compact><dt><b>Remarks:</b></dt><dd>The <a class="el" href="classOgre_1_1TerrainSceneManager.html">TerrainSceneManager</a> will call this method when it needs new tiles. In response, this class must prepare <a class="el" href="classOgre_1_1TerrainRenderable.html">TerrainRenderable</a> instances for the page requested and attach the entire page when ready using TerrainSceneManager::attachTerrainPage. </dd></dl>
<dl compact><dt><b></b></dt><dd>Now, the tile source does not necessarily need to do all that before the return of this method. If it likes, and particularly if asynchronous loading is enabled, it can merely queue this request, and process it either in another thread, or over a series of frames. The key thing is that attaching the new page has to be done synchronously with the main rendering loop in order to avoid concurrency issues; other than that, you are free to load and prepare new tiles in a concurrent fashion if you like. </dd></dl>
<dl compact><dt><b></b></dt><dd>Typically the scene manager will request at least one page up-front, with the possibility of requesting more if paging is enabled. </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>x</em>&nbsp;</td><td>The x index of the page requested </td></tr>
    <tr><td valign=top><em>z</em>&nbsp;</td><td>The z index of the page requested </td></tr>
  </table>
</dl>

<p>
Implemented in <a class="el" href="classOgre_1_1HeightmapTerrainPageSource.html#Ogre_1_1HeightmapTerrainPageSourcea3">Ogre::HeightmapTerrainPageSource</a>.    </td>
  </tr>
</table>
<a class="anchor" name="Ogre_1_1TerrainPageSourcea3" doxytag="Ogre::TerrainPageSource::shutdown" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual void Ogre::TerrainPageSource::shutdown </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">void&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Shut down this tile source, freeing all it's memory ready for decommissioning. 
<p>
<dl compact><dt><b>Remarks:</b></dt><dd>This method will normally just be called on destruction; however it may also be called by the <a class="el" href="classOgre_1_1TerrainSceneManager.html">TerrainSceneManager</a> if another source is provided for the same type of tile source. </dd></dl>

<p>
Reimplemented in <a class="el" href="classOgre_1_1HeightmapTerrainPageSource.html#Ogre_1_1HeightmapTerrainPageSourcea2">Ogre::HeightmapTerrainPageSource</a>.
<p>
Definition at line <a class="el" href="OgreTerrainPageSource_8h-source.html#l00196">196</a> of file <a class="el" href="OgreTerrainPageSource_8h-source.html">OgreTerrainPageSource.h</a>.    </td>
  </tr>
</table>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="Ogre_1_1TerrainPageSourcep1" doxytag="Ogre::TerrainPageSource::mAsyncLoading" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> bool <a class="el" href="classOgre_1_1TerrainPageSource.html#Ogre_1_1TerrainPageSourcep1">Ogre::TerrainPageSource::mAsyncLoading</a><code> [protected]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Has asynchronous loading been requested? 
<p>

<p>
Definition at line <a class="el" href="OgreTerrainPageSource_8h-source.html#l00137">137</a> of file <a class="el" href="OgreTerrainPageSource_8h-source.html">OgreTerrainPageSource.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="Ogre_1_1TerrainPageSourcep2" doxytag="Ogre::TerrainPageSource::mPageSize" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> unsigned short <a class="el" href="classOgre_1_1TerrainPageSource.html#Ogre_1_1TerrainPageSourcep2">Ogre::TerrainPageSource::mPageSize</a><code> [protected]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
The expected size of the page in number of vertices. 
<p>

<p>
Definition at line <a class="el" href="OgreTerrainPageSource_8h-source.html#l00139">139</a> of file <a class="el" href="OgreTerrainPageSource_8h-source.html">OgreTerrainPageSource.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="Ogre_1_1TerrainPageSourcep0" doxytag="Ogre::TerrainPageSource::mSceneManager" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="classOgre_1_1TerrainSceneManager.html">TerrainSceneManager</a>* <a class="el" href="classOgre_1_1TerrainPageSource.html#Ogre_1_1TerrainPageSourcep0">Ogre::TerrainPageSource::mSceneManager</a><code> [protected]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Link back to parent manager. 
<p>

<p>
Definition at line <a class="el" href="OgreTerrainPageSource_8h-source.html#l00135">135</a> of file <a class="el" href="OgreTerrainPageSource_8h-source.html">OgreTerrainPageSource.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="Ogre_1_1TerrainPageSourcep3" doxytag="Ogre::TerrainPageSource::mTileSize" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> unsigned short <a class="el" href="classOgre_1_1TerrainPageSource.html#Ogre_1_1TerrainPageSourcep3">Ogre::TerrainPageSource::mTileSize</a><code> [protected]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
The expected size of a tile in number of vertices. 
<p>

<p>
Definition at line <a class="el" href="OgreTerrainPageSource_8h-source.html#l00141">141</a> of file <a class="el" href="OgreTerrainPageSource_8h-source.html">OgreTerrainPageSource.h</a>.    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="OgreTerrainPageSource_8h-source.html">OgreTerrainPageSource.h</a></ul>
<p>
Copyright &copy; 2000-2005 by The OGRE Team<br />
Last modified Wed Feb 23 00:26:24 2005
</p>
</body>
</html>