source: OGRE/trunk/ogrenew/Docs/api/html/classOgre_1_1TerrainPageSource.html @ 657

Revision 657, 34.7 KB checked in by mattausch, 18 years ago (diff)

added ogre dependencies and patched ogre sources

Line 
1<html>
2<head>
3<title>Ogre::TerrainPageSource class Reference - OGRE Documentation</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
4<link type="text/css" rel="stylesheet" href="style.css">
5</head>
6
7<body>
8<!-- Generated by Doxygen 1.3.6 -->
9<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>
10<h1>Ogre::TerrainPageSource Class Reference</h1>Abstract class which describes the interface which a source of terrain pages must implement. 
11<a href="#_details">More...</a>
12<p>
13<code>#include &lt;<a class="el" href="OgreTerrainPageSource_8h-source.html">OgreTerrainPageSource.h</a>&gt;</code>
14<p>
15<p>Inheritance diagram for Ogre::TerrainPageSource:
16<p><center><img src="classOgre_1_1TerrainPageSource.png" usemap="#Ogre::TerrainPageSource_map" border="0" alt=""></center>
17<map name="Ogre::TerrainPageSource_map">
18<area href="classOgre_1_1HeightmapTerrainPageSource.html" alt="Ogre::HeightmapTerrainPageSource" shape="rect" coords="0,56,217,80">
19</map>
20<a href="classOgre_1_1TerrainPageSource-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
21<tr><td></td></tr>
22<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
23<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>
24
25<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>
26
27<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#a561">TerrainPageSourceOptionList</a> &amp;optionList)</td></tr>
28
29<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>
30<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>
31
32<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>
33<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>
34
35<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>
36<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>
37
38<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>
39<tr><td colspan=2><br><h2>Static Public Member Functions</h2></td></tr>
40<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>
41
42<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>
43<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>
44
45<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>
46<tr><td colspan=2><br><h2>Protected Member Functions</h2></td></tr>
47<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>
48
49<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>
50<tr><td colspan=2><br><h2>Static Protected Member Functions</h2></td></tr>
51<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>
52
53<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>
54<tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr>
55<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>
56
57<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Link back to parent manager.  <a href="#Ogre_1_1TerrainPageSourcep0"></a><br><br></td></tr>
58<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>
59
60<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Has asynchronous loading been requested?  <a href="#Ogre_1_1TerrainPageSourcep1"></a><br><br></td></tr>
61<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>
62
63<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>
64<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>
65
66<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>
67</table>
68<hr><a name="_details"></a><h2>Detailed Description</h2>
69Abstract class which describes the interface which a source of terrain pages must implement.
70<p>
71<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>
72<dl compact><dt><b></b></dt><dd>The overall sequence of events is this: <ol>
73<li>
74<a class="el" href="classOgre_1_1TerrainSceneManager.html">TerrainSceneManager</a> is created as usual, and options such as tile size etc are set. </li>
75<li>
76CustomTerrainPageSource 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>
77<li>
78</li>
79<li>
80<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>
81<li>
82</li>
83<li>
84As 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>
85<li>
86It 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>
87<li>
88When 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>
89</ol>
90</dd></dl>
91<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>
92
93<p>
94
95<p>
96Definition 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>
97<a class="anchor" name="Ogre_1_1TerrainPageSourcea0" doxytag="Ogre::TerrainPageSource::TerrainPageSource" ></a><p>
98<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
99  <tr>
100    <td class="mdRow">
101      <table cellpadding="0" cellspacing="0" border="0">
102        <tr>
103          <td class="md" nowrap valign="top"> Ogre::TerrainPageSource::TerrainPageSource </td>
104          <td class="md" valign="top">(&nbsp;</td>
105          <td class="mdname1" valign="top" nowrap>          </td>
106          <td class="md" valign="top">&nbsp;)&nbsp;</td>
107          <td class="md" nowrap></td>
108        </tr>
109
110      </table>
111    </td>
112  </tr>
113</table>
114<table cellspacing=5 cellpadding=0 border=0>
115  <tr>
116    <td>
117      &nbsp;
118    </td>
119    <td>
120
121<p>
122    </td>
123  </tr>
124</table>
125<a class="anchor" name="Ogre_1_1TerrainPageSourcea1" doxytag="Ogre::TerrainPageSource::~TerrainPageSource" ></a><p>
126<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
127  <tr>
128    <td class="mdRow">
129      <table cellpadding="0" cellspacing="0" border="0">
130        <tr>
131          <td class="md" nowrap valign="top"> virtual Ogre::TerrainPageSource::~<a class="el" href="classOgre_1_1TerrainPageSource.html">TerrainPageSource</a> </td>
132          <td class="md" valign="top">(&nbsp;</td>
133          <td class="mdname1" valign="top" nowrap>          </td>
134          <td class="md" valign="top">&nbsp;)&nbsp;</td>
135          <td class="md" nowrap><code> [virtual]</code></td>
136        </tr>
137
138      </table>
139    </td>
140  </tr>
141</table>
142<table cellspacing=5 cellpadding=0 border=0>
143  <tr>
144    <td>
145      &nbsp;
146    </td>
147    <td>
148
149<p>
150
151<p>
152Definition 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>
153  </tr>
154</table>
155<hr><h2>Member Function Documentation</h2>
156<a class="anchor" name="Ogre_1_1TerrainPageSourcee0" doxytag="Ogre::TerrainPageSource::addListener" ></a><p>
157<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
158  <tr>
159    <td class="mdRow">
160      <table cellpadding="0" cellspacing="0" border="0">
161        <tr>
162          <td class="md" nowrap valign="top"> void Ogre::TerrainPageSource::addListener </td>
163          <td class="md" valign="top">(&nbsp;</td>
164          <td class="md" nowrap valign="top"><a class="el" href="classOgre_1_1TerrainPageSourceListener.html">TerrainPageSourceListener</a> *&nbsp;</td>
165          <td class="mdname1" valign="top" nowrap> <em>pl</em>          </td>
166          <td class="md" valign="top">&nbsp;)&nbsp;</td>
167          <td class="md" nowrap><code> [static]</code></td>
168        </tr>
169
170      </table>
171    </td>
172  </tr>
173</table>
174<table cellspacing=5 cellpadding=0 border=0>
175  <tr>
176    <td>
177      &nbsp;
178    </td>
179    <td>
180
181<p>
182Register a class which will be called back whenever a new page is available.
183<p>
184<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>
185    </td>
186  </tr>
187</table>
188<a class="anchor" name="Ogre_1_1TerrainPageSourceb0" doxytag="Ogre::TerrainPageSource::buildPage" ></a><p>
189<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
190  <tr>
191    <td class="mdRow">
192      <table cellpadding="0" cellspacing="0" border="0">
193        <tr>
194          <td class="md" nowrap valign="top"> virtual <a class="el" href="classOgre_1_1TerrainPage.html">TerrainPage</a>* Ogre::TerrainPageSource::buildPage </td>
195          <td class="md" valign="top">(&nbsp;</td>
196          <td class="md" nowrap valign="top"><a class="el" href="namespaceOgre.html#a420">Real</a> *&nbsp;</td>
197          <td class="mdname" nowrap> <em>heightData</em>, </td>
198        </tr>
199        <tr>
200          <td class="md" nowrap align="right"></td>
201          <td></td>
202          <td class="md" nowrap>const <a class="el" href="classOgre_1_1MaterialPtr.html">MaterialPtr</a> &amp;&nbsp;</td>
203          <td class="mdname" nowrap> <em>pMaterial</em></td>
204        </tr>
205        <tr>
206          <td></td>
207          <td class="md">)&nbsp;</td>
208          <td class="md" colspan="2"><code> [protected, virtual]</code></td>
209        </tr>
210
211      </table>
212    </td>
213  </tr>
214</table>
215<table cellspacing=5 cellpadding=0 border=0>
216  <tr>
217    <td>
218      &nbsp;
219    </td>
220    <td>
221
222<p>
223Utility method for building a page of tiles based on some source data, wherever that may have come from.
224<p>
225<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>
226    </td>
227  </tr>
228</table>
229<a class="anchor" name="Ogre_1_1TerrainPageSourcea5" doxytag="Ogre::TerrainPageSource::expirePage" ></a><p>
230<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
231  <tr>
232    <td class="mdRow">
233      <table cellpadding="0" cellspacing="0" border="0">
234        <tr>
235          <td class="md" nowrap valign="top"> virtual void Ogre::TerrainPageSource::expirePage </td>
236          <td class="md" valign="top">(&nbsp;</td>
237          <td class="md" nowrap valign="top"><a class="el" href="namespaceOgre.html#a422">ushort</a>&nbsp;</td>
238          <td class="mdname" nowrap> <em>x</em>, </td>
239        </tr>
240        <tr>
241          <td class="md" nowrap align="right"></td>
242          <td></td>
243          <td class="md" nowrap><a class="el" href="namespaceOgre.html#a422">ushort</a>&nbsp;</td>
244          <td class="mdname" nowrap> <em>z</em></td>
245        </tr>
246        <tr>
247          <td></td>
248          <td class="md">)&nbsp;</td>
249          <td class="md" colspan="2"><code> [pure virtual]</code></td>
250        </tr>
251
252      </table>
253    </td>
254  </tr>
255</table>
256<table cellspacing=5 cellpadding=0 border=0>
257  <tr>
258    <td>
259      &nbsp;
260    </td>
261    <td>
262
263<p>
264This notifies the tile source that the specified page of tiles has been automatically detached.
265<p>
266<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>
267<dl compact><dt><b>Parameters:</b></dt><dd>
268  <table border="0" cellspacing="2" cellpadding="0">
269    <tr><td valign=top><em>x</em>&nbsp;</td><td>The x index of the page expired </td></tr>
270    <tr><td valign=top><em>z</em>&nbsp;</td><td>The z index of the page expired </td></tr>
271  </table>
272</dl>
273
274<p>
275Implemented in <a class="el" href="classOgre_1_1HeightmapTerrainPageSource.html#Ogre_1_1HeightmapTerrainPageSourcea4">Ogre::HeightmapTerrainPageSource</a>.    </td>
276  </tr>
277</table>
278<a class="anchor" name="Ogre_1_1TerrainPageSourcef0" doxytag="Ogre::TerrainPageSource::firePageConstructed" ></a><p>
279<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
280  <tr>
281    <td class="mdRow">
282      <table cellpadding="0" cellspacing="0" border="0">
283        <tr>
284          <td class="md" nowrap valign="top"> void Ogre::TerrainPageSource::firePageConstructed </td>
285          <td class="md" valign="top">(&nbsp;</td>
286          <td class="md" nowrap valign="top">size_t&nbsp;</td>
287          <td class="mdname" nowrap> <em>pagex</em>, </td>
288        </tr>
289        <tr>
290          <td class="md" nowrap align="right"></td>
291          <td></td>
292          <td class="md" nowrap>size_t&nbsp;</td>
293          <td class="mdname" nowrap> <em>pagez</em>, </td>
294        </tr>
295        <tr>
296          <td class="md" nowrap align="right"></td>
297          <td></td>
298          <td class="md" nowrap><a class="el" href="namespaceOgre.html#a420">Real</a> *&nbsp;</td>
299          <td class="mdname" nowrap> <em>heightData</em></td>
300        </tr>
301        <tr>
302          <td></td>
303          <td class="md">)&nbsp;</td>
304          <td class="md" colspan="2"><code> [static, protected]</code></td>
305        </tr>
306
307      </table>
308    </td>
309  </tr>
310</table>
311<table cellspacing=5 cellpadding=0 border=0>
312  <tr>
313    <td>
314      &nbsp;
315    </td>
316    <td>
317
318<p>
319Internal method for firing pageContructed events.
320<p>
321    </td>
322  </tr>
323</table>
324<a class="anchor" name="Ogre_1_1TerrainPageSourcea2" doxytag="Ogre::TerrainPageSource::initialise" ></a><p>
325<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
326  <tr>
327    <td class="mdRow">
328      <table cellpadding="0" cellspacing="0" border="0">
329        <tr>
330          <td class="md" nowrap valign="top"> virtual void Ogre::TerrainPageSource::initialise </td>
331          <td class="md" valign="top">(&nbsp;</td>
332          <td class="md" nowrap valign="top"><a class="el" href="classOgre_1_1TerrainSceneManager.html">TerrainSceneManager</a> *&nbsp;</td>
333          <td class="mdname" nowrap> <em>tsm</em>, </td>
334        </tr>
335        <tr>
336          <td class="md" nowrap align="right"></td>
337          <td></td>
338          <td class="md" nowrap><a class="el" href="namespaceOgre.html#a422">ushort</a>&nbsp;</td>
339          <td class="mdname" nowrap> <em>tileSize</em>, </td>
340        </tr>
341        <tr>
342          <td class="md" nowrap align="right"></td>
343          <td></td>
344          <td class="md" nowrap><a class="el" href="namespaceOgre.html#a422">ushort</a>&nbsp;</td>
345          <td class="mdname" nowrap> <em>pageSize</em>, </td>
346        </tr>
347        <tr>
348          <td class="md" nowrap align="right"></td>
349          <td></td>
350          <td class="md" nowrap>bool&nbsp;</td>
351          <td class="mdname" nowrap> <em>asyncLoading</em>, </td>
352        </tr>
353        <tr>
354          <td class="md" nowrap align="right"></td>
355          <td></td>
356          <td class="md" nowrap><a class="el" href="namespaceOgre.html#a561">TerrainPageSourceOptionList</a> &amp;&nbsp;</td>
357          <td class="mdname" nowrap> <em>optionList</em></td>
358        </tr>
359        <tr>
360          <td></td>
361          <td class="md">)&nbsp;</td>
362          <td class="md" colspan="2"><code> [virtual]</code></td>
363        </tr>
364
365      </table>
366    </td>
367  </tr>
368</table>
369<table cellspacing=5 cellpadding=0 border=0>
370  <tr>
371    <td>
372      &nbsp;
373    </td>
374    <td>
375
376<p>
377Initialise this tile source based on a series of options as dictated by the scene manager.
378<p>
379<dl compact><dt><b>Parameters:</b></dt><dd>
380  <table border="0" cellspacing="2" cellpadding="0">
381    <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>
382    <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>
383    <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>
384    <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>
385    <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>
386  </table>
387</dl>
388
389<p>
390Reimplemented in <a class="el" href="classOgre_1_1HeightmapTerrainPageSource.html#Ogre_1_1HeightmapTerrainPageSourcea5">Ogre::HeightmapTerrainPageSource</a>.
391<p>
392Definition 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>.
393<p>
394References <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>
395  </tr>
396</table>
397<a class="anchor" name="Ogre_1_1TerrainPageSourcee1" doxytag="Ogre::TerrainPageSource::removeListener" ></a><p>
398<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
399  <tr>
400    <td class="mdRow">
401      <table cellpadding="0" cellspacing="0" border="0">
402        <tr>
403          <td class="md" nowrap valign="top"> void Ogre::TerrainPageSource::removeListener </td>
404          <td class="md" valign="top">(&nbsp;</td>
405          <td class="md" nowrap valign="top"><a class="el" href="classOgre_1_1TerrainPageSourceListener.html">TerrainPageSourceListener</a> *&nbsp;</td>
406          <td class="mdname1" valign="top" nowrap> <em>pl</em>          </td>
407          <td class="md" valign="top">&nbsp;)&nbsp;</td>
408          <td class="md" nowrap><code> [static]</code></td>
409        </tr>
410
411      </table>
412    </td>
413  </tr>
414</table>
415<table cellspacing=5 cellpadding=0 border=0>
416  <tr>
417    <td>
418      &nbsp;
419    </td>
420    <td>
421
422<p>
423Unregister a class which will be called back whenever a new page is available.
424<p>
425    </td>
426  </tr>
427</table>
428<a class="anchor" name="Ogre_1_1TerrainPageSourcea4" doxytag="Ogre::TerrainPageSource::requestPage" ></a><p>
429<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
430  <tr>
431    <td class="mdRow">
432      <table cellpadding="0" cellspacing="0" border="0">
433        <tr>
434          <td class="md" nowrap valign="top"> virtual void Ogre::TerrainPageSource::requestPage </td>
435          <td class="md" valign="top">(&nbsp;</td>
436          <td class="md" nowrap valign="top"><a class="el" href="namespaceOgre.html#a422">ushort</a>&nbsp;</td>
437          <td class="mdname" nowrap> <em>x</em>, </td>
438        </tr>
439        <tr>
440          <td class="md" nowrap align="right"></td>
441          <td></td>
442          <td class="md" nowrap><a class="el" href="namespaceOgre.html#a422">ushort</a>&nbsp;</td>
443          <td class="mdname" nowrap> <em>z</em></td>
444        </tr>
445        <tr>
446          <td></td>
447          <td class="md">)&nbsp;</td>
448          <td class="md" colspan="2"><code> [pure virtual]</code></td>
449        </tr>
450
451      </table>
452    </td>
453  </tr>
454</table>
455<table cellspacing=5 cellpadding=0 border=0>
456  <tr>
457    <td>
458      &nbsp;
459    </td>
460    <td>
461
462<p>
463Requests a new page of tiles from the source.
464<p>
465<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>
466<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>
467<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>
468<dl compact><dt><b>Parameters:</b></dt><dd>
469  <table border="0" cellspacing="2" cellpadding="0">
470    <tr><td valign=top><em>x</em>&nbsp;</td><td>The x index of the page requested </td></tr>
471    <tr><td valign=top><em>z</em>&nbsp;</td><td>The z index of the page requested </td></tr>
472  </table>
473</dl>
474
475<p>
476Implemented in <a class="el" href="classOgre_1_1HeightmapTerrainPageSource.html#Ogre_1_1HeightmapTerrainPageSourcea3">Ogre::HeightmapTerrainPageSource</a>.    </td>
477  </tr>
478</table>
479<a class="anchor" name="Ogre_1_1TerrainPageSourcea3" doxytag="Ogre::TerrainPageSource::shutdown" ></a><p>
480<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
481  <tr>
482    <td class="mdRow">
483      <table cellpadding="0" cellspacing="0" border="0">
484        <tr>
485          <td class="md" nowrap valign="top"> virtual void Ogre::TerrainPageSource::shutdown </td>
486          <td class="md" valign="top">(&nbsp;</td>
487          <td class="md" nowrap valign="top">void&nbsp;</td>
488          <td class="mdname1" valign="top" nowrap>          </td>
489          <td class="md" valign="top">&nbsp;)&nbsp;</td>
490          <td class="md" nowrap><code> [virtual]</code></td>
491        </tr>
492
493      </table>
494    </td>
495  </tr>
496</table>
497<table cellspacing=5 cellpadding=0 border=0>
498  <tr>
499    <td>
500      &nbsp;
501    </td>
502    <td>
503
504<p>
505Shut down this tile source, freeing all it's memory ready for decommissioning.
506<p>
507<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>
508
509<p>
510Reimplemented in <a class="el" href="classOgre_1_1HeightmapTerrainPageSource.html#Ogre_1_1HeightmapTerrainPageSourcea2">Ogre::HeightmapTerrainPageSource</a>.
511<p>
512Definition 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>
513  </tr>
514</table>
515<hr><h2>Member Data Documentation</h2>
516<a class="anchor" name="Ogre_1_1TerrainPageSourcep1" doxytag="Ogre::TerrainPageSource::mAsyncLoading" ></a><p>
517<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
518  <tr>
519    <td class="mdRow">
520      <table cellpadding="0" cellspacing="0" border="0">
521        <tr>
522          <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>
523      </table>
524    </td>
525  </tr>
526</table>
527<table cellspacing=5 cellpadding=0 border=0>
528  <tr>
529    <td>
530      &nbsp;
531    </td>
532    <td>
533
534<p>
535Has asynchronous loading been requested?
536<p>
537
538<p>
539Definition 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>
540  </tr>
541</table>
542<a class="anchor" name="Ogre_1_1TerrainPageSourcep2" doxytag="Ogre::TerrainPageSource::mPageSize" ></a><p>
543<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
544  <tr>
545    <td class="mdRow">
546      <table cellpadding="0" cellspacing="0" border="0">
547        <tr>
548          <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>
549      </table>
550    </td>
551  </tr>
552</table>
553<table cellspacing=5 cellpadding=0 border=0>
554  <tr>
555    <td>
556      &nbsp;
557    </td>
558    <td>
559
560<p>
561The expected size of the page in number of vertices.
562<p>
563
564<p>
565Definition 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>
566  </tr>
567</table>
568<a class="anchor" name="Ogre_1_1TerrainPageSourcep0" doxytag="Ogre::TerrainPageSource::mSceneManager" ></a><p>
569<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
570  <tr>
571    <td class="mdRow">
572      <table cellpadding="0" cellspacing="0" border="0">
573        <tr>
574          <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>
575      </table>
576    </td>
577  </tr>
578</table>
579<table cellspacing=5 cellpadding=0 border=0>
580  <tr>
581    <td>
582      &nbsp;
583    </td>
584    <td>
585
586<p>
587Link back to parent manager.
588<p>
589
590<p>
591Definition 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>
592  </tr>
593</table>
594<a class="anchor" name="Ogre_1_1TerrainPageSourcep3" doxytag="Ogre::TerrainPageSource::mTileSize" ></a><p>
595<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
596  <tr>
597    <td class="mdRow">
598      <table cellpadding="0" cellspacing="0" border="0">
599        <tr>
600          <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>
601      </table>
602    </td>
603  </tr>
604</table>
605<table cellspacing=5 cellpadding=0 border=0>
606  <tr>
607    <td>
608      &nbsp;
609    </td>
610    <td>
611
612<p>
613The expected size of a tile in number of vertices.
614<p>
615
616<p>
617Definition 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>
618  </tr>
619</table>
620<hr>The documentation for this class was generated from the following file:<ul>
621<li><a class="el" href="OgreTerrainPageSource_8h-source.html">OgreTerrainPageSource.h</a></ul>
622<hr>
623<p>
624Copyright &copy; 2000-2005 by The OGRE Team<br />
625<!--Creative Commons License--><a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/"><img alt="Creative Commons License" border="0" src="http://creativecommons.org/images/public/somerights20.png"/></a><br/>
626This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/">Creative Commons Attribution-ShareAlike 2.5 License</a>.<br/>
627                <!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
628                <Work rdf:about="">
629                        <license rdf:resource="http://creativecommons.org/licenses/by-sa/2.5/" />
630        <dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
631                </Work>
632                <License rdf:about="http://creativecommons.org/licenses/by-sa/2.5/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
633
634Last modified Sun Feb 12 13:06:27 2006
635</p>
636</body>
637</html>
Note: See TracBrowser for help on using the repository browser.