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

Revision 692, 34.6 KB checked in by mattausch, 18 years ago (diff)

adding ogre 1.2 and dependencies

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