PageRenderTime 61ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 1ms

/Docs/api/html/OgreTerrain_8h-source.html

https://bitbucket.org/bodge/ogre
HTML | 899 lines | 890 code | 2 blank | 7 comment | 0 complexity | 1c4f284ca2460ddb59e2e1cd58f0bfb0 MD5 | raw file
Possible License(s): Apache-2.0, Unlicense, MPL-2.0-no-copyleft-exception, GPL-2.0, BSD-2-Clause, BSD-3-Clause, MIT, LGPL-3.0, LGPL-2.1, ISC

Large files files are truncated, but you can click here to view the full file

  1. <html>
  2. <head>
  3. <title>OGRE: OgreTerrain.h Source File - OGRE Documentation</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  4. <link type="text/css" rel="stylesheet" href="doxygen.css">
  5. <link type="text/css" rel="stylesheet" href="tabs.css">
  6. </head>
  7. <body>
  8. <!-- Generated by Doxygen 1.5.5 -->
  9. <div class="navigation" id="top">
  10. <div class="tabs">
  11. <ul>
  12. <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
  13. <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  14. <li><a href="modules.html"><span>Modules</span></a></li>
  15. <li><a href="namespaces.html"><span>Namespaces</span></a></li>
  16. <li><a href="classes.html"><span>Classes</span></a></li>
  17. <li class="current"><a href="files.html"><span>Files</span></a></li>
  18. <li><a href="dirs.html"><span>Directories</span></a></li>
  19. </ul>
  20. </div>
  21. <div class="navpath"><a class="el" href="dir_4c07ad65be5afe5cd1867ae7571e7ae2.html">Components</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_62b93da639ce513b3cdb459c14f59886.html">Terrain</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_c1b77b4db57b8763484fd0dc299c9751.html">include</a>
  22. </div>
  23. </div>
  24. </div>
  25. <h1>OgreTerrain.h</h1><a href="OgreTerrain_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
  26. <a name="l00002"></a>00002 <span class="comment">-----------------------------------------------------------------------------</span>
  27. <a name="l00003"></a>00003 <span class="comment">This source file is part of OGRE</span>
  28. <a name="l00004"></a>00004 <span class="comment">(Object-oriented Graphics Rendering Engine)</span>
  29. <a name="l00005"></a>00005 <span class="comment">For the latest info, see http://www.ogre3d.org/</span>
  30. <a name="l00006"></a>00006 <span class="comment"></span>
  31. <a name="l00007"></a>00007 <span class="comment">Copyright (c) 2000-2009 Torus Knot Software Ltd</span>
  32. <a name="l00008"></a>00008 <span class="comment"></span>
  33. <a name="l00009"></a>00009 <span class="comment">Permission is hereby granted, free of charge, to any person obtaining a copy</span>
  34. <a name="l00010"></a>00010 <span class="comment">of this software and associated documentation files (the "Software"), to deal</span>
  35. <a name="l00011"></a>00011 <span class="comment">in the Software without restriction, including without limitation the rights</span>
  36. <a name="l00012"></a>00012 <span class="comment">to use, copy, modify, merge, publish, distribute, sublicense, and/or sell</span>
  37. <a name="l00013"></a>00013 <span class="comment">copies of the Software, and to permit persons to whom the Software is</span>
  38. <a name="l00014"></a>00014 <span class="comment">furnished to do so, subject to the following conditions:</span>
  39. <a name="l00015"></a>00015 <span class="comment"></span>
  40. <a name="l00016"></a>00016 <span class="comment">The above copyright notice and this permission notice shall be included in</span>
  41. <a name="l00017"></a>00017 <span class="comment">all copies or substantial portions of the Software.</span>
  42. <a name="l00018"></a>00018 <span class="comment"></span>
  43. <a name="l00019"></a>00019 <span class="comment">THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span>
  44. <a name="l00020"></a>00020 <span class="comment">IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span>
  45. <a name="l00021"></a>00021 <span class="comment">FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span>
  46. <a name="l00022"></a>00022 <span class="comment">AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span>
  47. <a name="l00023"></a>00023 <span class="comment">LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span>
  48. <a name="l00024"></a>00024 <span class="comment">OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN</span>
  49. <a name="l00025"></a>00025 <span class="comment">THE SOFTWARE.</span>
  50. <a name="l00026"></a>00026 <span class="comment">-----------------------------------------------------------------------------</span>
  51. <a name="l00027"></a>00027 <span class="comment">*/</span>
  52. <a name="l00028"></a>00028
  53. <a name="l00029"></a>00029 <span class="preprocessor">#ifndef __Ogre_Terrain_H__</span>
  54. <a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#define __Ogre_Terrain_H__</span>
  55. <a name="l00031"></a>00031 <span class="preprocessor"></span>
  56. <a name="l00032"></a>00032 <span class="preprocessor">#include "<a class="code" href="OgreTerrainPrerequisites_8h.html">OgreTerrainPrerequisites.h</a>"</span>
  57. <a name="l00033"></a>00033 <span class="preprocessor">#include "<a class="code" href="OgreCommon_8h.html">OgreCommon.h</a>"</span>
  58. <a name="l00034"></a>00034 <span class="preprocessor">#include "<a class="code" href="OgreVector3_8h.html">OgreVector3.h</a>"</span>
  59. <a name="l00035"></a>00035 <span class="preprocessor">#include "<a class="code" href="OgreAxisAlignedBox_8h.html">OgreAxisAlignedBox.h</a>"</span>
  60. <a name="l00036"></a>00036 <span class="preprocessor">#include "<a class="code" href="OgreSceneManager_8h.html">OgreSceneManager.h</a>"</span>
  61. <a name="l00037"></a>00037 <span class="preprocessor">#include "<a class="code" href="OgreTerrainMaterialGenerator_8h.html">OgreTerrainMaterialGenerator.h</a>"</span>
  62. <a name="l00038"></a>00038 <span class="preprocessor">#include "<a class="code" href="OgreTerrainLayerBlendMap_8h.html">OgreTerrainLayerBlendMap.h</a>"</span>
  63. <a name="l00039"></a>00039 <span class="preprocessor">#include "<a class="code" href="OgreWorkQueue_8h.html">OgreWorkQueue.h</a>"</span>
  64. <a name="l00040"></a>00040
  65. <a name="l00041"></a>00041 <span class="keyword">namespace </span>Ogre
  66. <a name="l00042"></a>00042 {
  67. <a name="l00261"></a><a class="code" href="classOgre_1_1Terrain.html">00261</a> <span class="keyword">class </span><a class="code" href="OgreTerrainPrerequisites_8h.html#2fbe49b54cb4b3c3e2757cd3ac167068">_OgreTerrainExport</a> <a class="code" href="classOgre_1_1Terrain.html" title="The main containing class for a chunk of terrain.">Terrain</a> : <span class="keyword">public</span> <a class="code" href="classOgre_1_1SceneManager.html" title="Manages the organisation and rendering of a &amp;#39;scene&amp;#39; i.e.">SceneManager</a>::Listener,
  68. <a name="l00262"></a>00262 <span class="keyword">public</span> <a class="code" href="classOgre_1_1WorkQueue.html" title="Interface to a general purpose request / response style background work queue.">WorkQueue</a>::RequestHandler, <span class="keyword">public</span> <a class="code" href="classOgre_1_1WorkQueue.html" title="Interface to a general purpose request / response style background work queue.">WorkQueue</a>::ResponseHandler, <span class="keyword">public</span> <a class="code" href="classOgre_1_1AllocatedObject.html" title="Superclass for all objects that wish to use custom memory allocators when their new...">TerrainAlloc</a>
  69. <a name="l00263"></a>00263 {
  70. <a name="l00264"></a>00264 <span class="keyword">public</span>:
  71. <a name="l00268"></a>00268 <a class="code" href="classOgre_1_1Terrain.html" title="The main containing class for a chunk of terrain.">Terrain</a>(<a class="code" href="classOgre_1_1SceneManager.html" title="Manages the organisation and rendering of a &amp;#39;scene&amp;#39; i.e.">SceneManager</a>* sm);
  72. <a name="l00269"></a>00269 <span class="keyword">virtual</span> ~<a class="code" href="classOgre_1_1Terrain.html" title="The main containing class for a chunk of terrain.">Terrain</a>();
  73. <a name="l00270"></a>00270
  74. <a name="l00271"></a><a class="code" href="classOgre_1_1Terrain.html#d1b6d65618e1ebc55155214f3b10b337">00271</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#df2a0cf2e77143b5ee1d38a75e289545">uint32</a> TERRAIN_CHUNK_ID;
  75. <a name="l00272"></a><a class="code" href="classOgre_1_1Terrain.html#fd3641ddf000f3e2ca771408f558131b">00272</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> TERRAIN_CHUNK_VERSION;
  76. <a name="l00273"></a><a class="code" href="classOgre_1_1Terrain.html#5c204799a40adae8b01411ec05dbc841">00273</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> TERRAIN_MAX_BATCH_SIZE;
  77. <a name="l00274"></a>00274
  78. <a name="l00275"></a><a class="code" href="classOgre_1_1Terrain.html#c83d9fa6c4ba65db9c7ad66bbd01b0de">00275</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#df2a0cf2e77143b5ee1d38a75e289545">uint32</a> TERRAINLAYERDECLARATION_CHUNK_ID;
  79. <a name="l00276"></a><a class="code" href="classOgre_1_1Terrain.html#14ce718231ed706aec11489fc6843d76">00276</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> TERRAINLAYERDECLARATION_CHUNK_VERSION;
  80. <a name="l00277"></a><a class="code" href="classOgre_1_1Terrain.html#53d1561777a42b20c5aa5a42dd96bf9b">00277</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#df2a0cf2e77143b5ee1d38a75e289545">uint32</a> TERRAINLAYERSAMPLER_CHUNK_ID;
  81. <a name="l00278"></a><a class="code" href="classOgre_1_1Terrain.html#369a6d0c5e30874dd103c7089406be6c">00278</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> TERRAINLAYERSAMPLER_CHUNK_VERSION;
  82. <a name="l00279"></a><a class="code" href="classOgre_1_1Terrain.html#df20ab502696a7e4acf28dec2ebdd0c7">00279</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#df2a0cf2e77143b5ee1d38a75e289545">uint32</a> TERRAINLAYERSAMPLERELEMENT_CHUNK_ID;
  83. <a name="l00280"></a><a class="code" href="classOgre_1_1Terrain.html#6b4dc148f017fbd6441bc81f79fe743d">00280</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> TERRAINLAYERSAMPLERELEMENT_CHUNK_VERSION;
  84. <a name="l00281"></a><a class="code" href="classOgre_1_1Terrain.html#cb18d059e425a9e6f7677d4dfb2d43ee">00281</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#df2a0cf2e77143b5ee1d38a75e289545">uint32</a> TERRAINLAYERINSTANCE_CHUNK_ID;
  85. <a name="l00282"></a><a class="code" href="classOgre_1_1Terrain.html#c7837f27d59df9244743172d331e2fb3">00282</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> TERRAINLAYERINSTANCE_CHUNK_VERSION;
  86. <a name="l00283"></a><a class="code" href="classOgre_1_1Terrain.html#50efd0b73343b76d8cfae1366cfd1cd0">00283</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#df2a0cf2e77143b5ee1d38a75e289545">uint32</a> TERRAINDERIVEDDATA_CHUNK_ID;
  87. <a name="l00284"></a><a class="code" href="classOgre_1_1Terrain.html#935d5fea06bddac979ae56c7fa13d9da">00284</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> TERRAINDERIVEDDATA_CHUNK_VERSION;
  88. <a name="l00285"></a>00285
  89. <a name="l00286"></a><a class="code" href="classOgre_1_1Terrain.html#efb36415178b8e15aac901f87b61d3da">00286</a> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">size_t</span> LOD_MORPH_CUSTOM_PARAM;
  90. <a name="l00287"></a>00287
  91. <a name="l00288"></a><a class="code" href="classOgre_1_1Terrain.html#a2b09fef0fe773201df2e55cc995d312">00288</a> <span class="keyword">typedef</span> <a class="code" href="structOgre_1_1vector.html">vector&lt;Real&gt;::type</a> RealVector;
  92. <a name="l00289"></a>00289
  93. <a name="l00292"></a><a class="code" href="structOgre_1_1Terrain_1_1LayerInstance.html">00292</a> <span class="keyword">struct </span><a class="code" href="OgreTerrainPrerequisites_8h.html#2fbe49b54cb4b3c3e2757cd3ac167068">_OgreTerrainExport</a> <a class="code" href="structOgre_1_1Terrain_1_1LayerInstance.html" title="An instance of a layer, with specific texture names.">LayerInstance</a>
  94. <a name="l00293"></a>00293 {
  95. <a name="l00295"></a><a class="code" href="structOgre_1_1Terrain_1_1LayerInstance.html#54f726e8a0c17ec1579a16afa1a9398c">00295</a> <a class="code" href="namespaceOgre.html#a3a7b6dfb905e6572d62f0dfa3d4274d" title="Software floating point type.">Real</a> worldSize;
  96. <a name="l00297"></a><a class="code" href="structOgre_1_1Terrain_1_1LayerInstance.html#14363e8e526e90ea47ea93cac3764fc1">00297</a> <a class="code" href="group__General.html#g0899c03496d3c25c6555889aa76a78db">StringVector</a> textureNames;
  97. <a name="l00298"></a>00298
  98. <a name="l00299"></a><a class="code" href="structOgre_1_1Terrain_1_1LayerInstance.html#a554bc0d00ec43b9fb48cf9a436112c2">00299</a> <a class="code" href="structOgre_1_1Terrain_1_1LayerInstance.html" title="An instance of a layer, with specific texture names.">LayerInstance</a>()
  99. <a name="l00300"></a>00300 : worldSize(100) {}
  100. <a name="l00301"></a>00301 };
  101. <a name="l00302"></a><a class="code" href="classOgre_1_1Terrain.html#7f4f256f962849538b8e46eebd6da94c">00302</a> <span class="keyword">typedef</span> <a class="code" href="structOgre_1_1vector.html">vector&lt;LayerInstance&gt;::type</a> LayerInstanceList;
  102. <a name="l00303"></a>00303
  103. <a name="l00305"></a><a class="code" href="classOgre_1_1Terrain.html#ca4fcebfb7ed4684682347d325477e91">00305</a> <span class="keyword">enum</span> <a class="code" href="classOgre_1_1Terrain.html#ca4fcebfb7ed4684682347d325477e91" title="The alignment of the terrain.">Alignment</a>
  104. <a name="l00306"></a>00306 {
  105. <a name="l00308"></a><a class="code" href="classOgre_1_1Terrain.html#ca4fcebfb7ed4684682347d325477e91c4699c4f99bea344a309d5544b33c140">00308</a> ALIGN_X_Z = 0,
  106. <a name="l00310"></a><a class="code" href="classOgre_1_1Terrain.html#ca4fcebfb7ed4684682347d325477e91dfc96b5a388b3e48709d56b899098508">00310</a> ALIGN_X_Y = 1,
  107. <a name="l00312"></a><a class="code" href="classOgre_1_1Terrain.html#ca4fcebfb7ed4684682347d325477e91dd646ddae48fd0c7cc9c0a74458feb42">00312</a> ALIGN_Y_Z = 2
  108. <a name="l00313"></a>00313 };
  109. <a name="l00314"></a>00314
  110. <a name="l00318"></a><a class="code" href="structOgre_1_1Terrain_1_1ImportData.html">00318</a> <span class="keyword">struct </span><a class="code" href="structOgre_1_1Terrain_1_1ImportData.html" title="Structure encapsulating import data that you may use to bootstrap the terrain without...">ImportData</a>
  111. <a name="l00319"></a>00319 {
  112. <a name="l00321"></a><a class="code" href="structOgre_1_1Terrain_1_1ImportData.html#9cc48b1e14f6974f46bf9da947f8fc76">00321</a> <a class="code" href="classOgre_1_1Terrain.html#ca4fcebfb7ed4684682347d325477e91" title="The alignment of the terrain.">Alignment</a> terrainAlign;
  113. <a name="l00323"></a><a class="code" href="structOgre_1_1Terrain_1_1ImportData.html#0b5bc1f24bcc9003e5ed0ccb850711f8">00323</a> <a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> terrainSize;
  114. <a name="l00329"></a><a class="code" href="structOgre_1_1Terrain_1_1ImportData.html#cebf6cfa7dcb63b4725ed1dc2e63a9f2">00329</a> <a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> maxBatchSize;
  115. <a name="l00340"></a><a class="code" href="structOgre_1_1Terrain_1_1ImportData.html#60b1682048188053cc885097eb2383c6">00340</a> <a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> minBatchSize;
  116. <a name="l00341"></a>00341
  117. <a name="l00346"></a><a class="code" href="structOgre_1_1Terrain_1_1ImportData.html#de0d3e9baacc9408bc08ce2531f177b4">00346</a> <a class="code" href="classOgre_1_1Vector3.html" title="Standard 3-dimensional vector.">Vector3</a> pos;
  118. <a name="l00347"></a>00347
  119. <a name="l00349"></a><a class="code" href="structOgre_1_1Terrain_1_1ImportData.html#43509d8a986b1b733d010300487425a5">00349</a> <a class="code" href="namespaceOgre.html#a3a7b6dfb905e6572d62f0dfa3d4274d" title="Software floating point type.">Real</a> worldSize;
  120. <a name="l00350"></a>00350
  121. <a name="l00356"></a><a class="code" href="structOgre_1_1Terrain_1_1ImportData.html#61b189d3b9768810d747f35f7d141e79">00356</a> <a class="code" href="classOgre_1_1Image.html" title="Class representing an image file.">Image</a>* inputImage;
  122. <a name="l00357"></a>00357
  123. <a name="l00362"></a><a class="code" href="structOgre_1_1Terrain_1_1ImportData.html#aab91a388f7bab0e1d00a858bbeb5902">00362</a> <span class="keywordtype">float</span>* inputFloat;
  124. <a name="l00363"></a>00363
  125. <a name="l00367"></a><a class="code" href="structOgre_1_1Terrain_1_1ImportData.html#210633812bf4ae671e19736a934079b3">00367</a> <span class="keywordtype">float</span> constantHeight;
  126. <a name="l00368"></a>00368
  127. <a name="l00376"></a><a class="code" href="structOgre_1_1Terrain_1_1ImportData.html#b5bbdf7852ee1d2192c421c17df237e7">00376</a> <span class="keywordtype">bool</span> deleteInputData;
  128. <a name="l00377"></a>00377
  129. <a name="l00379"></a><a class="code" href="structOgre_1_1Terrain_1_1ImportData.html#e97c725c89e0c789e5099fd387953020">00379</a> <a class="code" href="namespaceOgre.html#a3a7b6dfb905e6572d62f0dfa3d4274d" title="Software floating point type.">Real</a> inputScale;
  130. <a name="l00381"></a><a class="code" href="structOgre_1_1Terrain_1_1ImportData.html#a92240ffea408a3ff250e8e8233789bb">00381</a> <a class="code" href="namespaceOgre.html#a3a7b6dfb905e6572d62f0dfa3d4274d" title="Software floating point type.">Real</a> inputBias;
  131. <a name="l00382"></a>00382
  132. <a name="l00387"></a><a class="code" href="structOgre_1_1Terrain_1_1ImportData.html#e3203cf7a78bd3ed0cd75ffe3c107a2e">00387</a> <a class="code" href="structOgre_1_1TerrainLayerDeclaration.html" title="The definition of the information each layer will contain in this terrain.">TerrainLayerDeclaration</a> layerDeclaration;
  133. <a name="l00392"></a><a class="code" href="structOgre_1_1Terrain_1_1ImportData.html#3d892ce610f8e6aec873528d042fe72b">00392</a> LayerInstanceList layerList;
  134. <a name="l00393"></a>00393
  135. <a name="l00394"></a><a class="code" href="structOgre_1_1Terrain_1_1ImportData.html#4051612dde80d254c9761343a66bf47e">00394</a> <a class="code" href="structOgre_1_1Terrain_1_1ImportData.html" title="Structure encapsulating import data that you may use to bootstrap the terrain without...">ImportData</a>()
  136. <a name="l00395"></a>00395 : terrainAlign(ALIGN_X_Z)
  137. <a name="l00396"></a>00396 , terrainSize(1025)
  138. <a name="l00397"></a>00397 , maxBatchSize(65)
  139. <a name="l00398"></a>00398 , minBatchSize(17)
  140. <a name="l00399"></a>00399 , pos(<a class="code" href="classOgre_1_1Vector3.html" title="Standard 3-dimensional vector.">Vector3</a>::ZERO)
  141. <a name="l00400"></a>00400 , worldSize(1000)
  142. <a name="l00401"></a>00401 , inputImage(0)
  143. <a name="l00402"></a>00402 , inputFloat(0)
  144. <a name="l00403"></a>00403 , constantHeight(0)
  145. <a name="l00404"></a>00404 , deleteInputData(false)
  146. <a name="l00405"></a>00405 , inputScale(1.0)
  147. <a name="l00406"></a>00406 , inputBias(0.0)
  148. <a name="l00407"></a>00407 {
  149. <a name="l00408"></a>00408
  150. <a name="l00409"></a>00409 }
  151. <a name="l00410"></a>00410
  152. <a name="l00411"></a><a class="code" href="structOgre_1_1Terrain_1_1ImportData.html#94c34664786d5059f7a9ef36e061890e">00411</a> <a class="code" href="structOgre_1_1Terrain_1_1ImportData.html" title="Structure encapsulating import data that you may use to bootstrap the terrain without...">ImportData</a>(<span class="keyword">const</span> <a class="code" href="structOgre_1_1Terrain_1_1ImportData.html" title="Structure encapsulating import data that you may use to bootstrap the terrain without...">ImportData</a>&amp; rhs)
  153. <a name="l00412"></a>00412 : terrainAlign(ALIGN_X_Z)
  154. <a name="l00413"></a>00413 , terrainSize(1025)
  155. <a name="l00414"></a>00414 , maxBatchSize(65)
  156. <a name="l00415"></a>00415 , minBatchSize(17)
  157. <a name="l00416"></a>00416 , pos(<a class="code" href="classOgre_1_1Vector3.html" title="Standard 3-dimensional vector.">Vector3</a>::ZERO)
  158. <a name="l00417"></a>00417 , worldSize(1000)
  159. <a name="l00418"></a>00418 , inputImage(0)
  160. <a name="l00419"></a>00419 , inputFloat(0)
  161. <a name="l00420"></a>00420 , constantHeight(0)
  162. <a name="l00421"></a>00421 , deleteInputData(false)
  163. <a name="l00422"></a>00422 , inputScale(1.0)
  164. <a name="l00423"></a>00423 , inputBias(0.0)
  165. <a name="l00424"></a>00424 {
  166. <a name="l00425"></a>00425 *<span class="keyword">this</span> = rhs;
  167. <a name="l00426"></a>00426 }
  168. <a name="l00427"></a>00427
  169. <a name="l00428"></a><a class="code" href="structOgre_1_1Terrain_1_1ImportData.html#abbbf63a35790a9b414acaa1e20baf93">00428</a> <a class="code" href="structOgre_1_1Terrain_1_1ImportData.html" title="Structure encapsulating import data that you may use to bootstrap the terrain without...">ImportData</a>&amp; operator=(<span class="keyword">const</span> <a class="code" href="structOgre_1_1Terrain_1_1ImportData.html" title="Structure encapsulating import data that you may use to bootstrap the terrain without...">ImportData</a>&amp; rhs)
  170. <a name="l00429"></a>00429 {
  171. <a name="l00430"></a>00430 <span class="comment">// basic copy</span>
  172. <a name="l00431"></a>00431 terrainAlign = rhs.<a class="code" href="structOgre_1_1Terrain_1_1ImportData.html#9cc48b1e14f6974f46bf9da947f8fc76" title="The alignment of the terrain.">terrainAlign</a>;
  173. <a name="l00432"></a>00432 terrainSize = rhs.<a class="code" href="structOgre_1_1Terrain_1_1ImportData.html#0b5bc1f24bcc9003e5ed0ccb850711f8" title="Terrain size (along one edge) in vertices; must be 2^n+1.">terrainSize</a>;
  174. <a name="l00433"></a>00433 maxBatchSize = rhs.<a class="code" href="structOgre_1_1Terrain_1_1ImportData.html#cebf6cfa7dcb63b4725ed1dc2e63a9f2" title="Maximum batch size (along one edge) in vertices; must be 2^n+1 and &amp;lt;= 65.">maxBatchSize</a>;
  175. <a name="l00434"></a>00434 minBatchSize = rhs.<a class="code" href="structOgre_1_1Terrain_1_1ImportData.html#60b1682048188053cc885097eb2383c6" title="Minimum batch size (along one edge) in vertices; must be 2^n+1.">minBatchSize</a>;
  176. <a name="l00435"></a>00435 pos = rhs.<a class="code" href="structOgre_1_1Terrain_1_1ImportData.html#de0d3e9baacc9408bc08ce2531f177b4" title="Position of the terrain.">pos</a>;
  177. <a name="l00436"></a>00436 worldSize = rhs.<a class="code" href="structOgre_1_1Terrain_1_1ImportData.html#43509d8a986b1b733d010300487425a5" title="The world size of the terrain.">worldSize</a>;
  178. <a name="l00437"></a>00437 constantHeight = rhs.<a class="code" href="structOgre_1_1Terrain_1_1ImportData.html#210633812bf4ae671e19736a934079b3" title="If neither inputImage or inputFloat are supplied, the constant height at which the...">constantHeight</a>;
  179. <a name="l00438"></a>00438 deleteInputData = rhs.<a class="code" href="structOgre_1_1Terrain_1_1ImportData.html#b5bbdf7852ee1d2192c421c17df237e7" title="Whether this structure should &amp;#39;own&amp;#39; the input data (inputImage and inputFloat)...">deleteInputData</a>;
  180. <a name="l00439"></a>00439 inputScale = rhs.<a class="code" href="structOgre_1_1Terrain_1_1ImportData.html#e97c725c89e0c789e5099fd387953020" title="How to scale the input values provided (if any).">inputScale</a>;
  181. <a name="l00440"></a>00440 inputBias = rhs.<a class="code" href="structOgre_1_1Terrain_1_1ImportData.html#a92240ffea408a3ff250e8e8233789bb" title="How to bias the input values provided (if any).">inputBias</a>;
  182. <a name="l00441"></a>00441 layerDeclaration = rhs.<a class="code" href="structOgre_1_1Terrain_1_1ImportData.html#e3203cf7a78bd3ed0cd75ffe3c107a2e" title="Definition of the contents of each layer (required).">layerDeclaration</a>;
  183. <a name="l00442"></a>00442 layerList = rhs.<a class="code" href="structOgre_1_1Terrain_1_1ImportData.html#3d892ce610f8e6aec873528d042fe72b" title="List of layer structures, one for each layer required.">layerList</a>;
  184. <a name="l00443"></a>00443
  185. <a name="l00444"></a>00444 <span class="comment">// By-value copies in ownership cases</span>
  186. <a name="l00445"></a>00445 <span class="keywordflow">if</span> (rhs.<a class="code" href="structOgre_1_1Terrain_1_1ImportData.html#b5bbdf7852ee1d2192c421c17df237e7" title="Whether this structure should &amp;#39;own&amp;#39; the input data (inputImage and inputFloat)...">deleteInputData</a>)
  187. <a name="l00446"></a>00446 {
  188. <a name="l00447"></a>00447 <span class="keywordflow">if</span> (rhs.<a class="code" href="structOgre_1_1Terrain_1_1ImportData.html#61b189d3b9768810d747f35f7d141e79" title="Optional heightmap providing the initial heights for the terrain.">inputImage</a>)
  189. <a name="l00448"></a>00448 inputImage = <a class="code" href="group__Memory.html#gb5fc1358fd5a889de0a06d07e45df1ff">OGRE_NEW</a> <a class="code" href="classOgre_1_1Image.html" title="Class representing an image file.">Image</a>(*rhs.<a class="code" href="structOgre_1_1Terrain_1_1ImportData.html#61b189d3b9768810d747f35f7d141e79" title="Optional heightmap providing the initial heights for the terrain.">inputImage</a>);
  190. <a name="l00449"></a>00449 <span class="keywordflow">else</span>
  191. <a name="l00450"></a>00450 inputImage = 0;
  192. <a name="l00451"></a>00451
  193. <a name="l00452"></a>00452 <span class="keywordflow">if</span> (rhs.<a class="code" href="structOgre_1_1Terrain_1_1ImportData.html#aab91a388f7bab0e1d00a858bbeb5902" title="Optional list of terrainSize * terrainSize floats defining the terrain.">inputFloat</a>)
  194. <a name="l00453"></a>00453 {
  195. <a name="l00454"></a>00454 inputFloat = <a class="code" href="group__Memory.html#g3211e4a6a806aa789b38dce2432ef472" title="Allocate a block of memory for a primitive type, and indicate the category of usage...">OGRE_ALLOC_T</a>(<span class="keywordtype">float</span>, terrainSize*terrainSize, <a class="code" href="group__Memory.html#gg830fab51be174d6f2849857cb1abb36af9e04ff475de4493bc942a9c73da4c2e" title="Geometry held in main memory.">MEMCATEGORY_GEOMETRY</a>);
  196. <a name="l00455"></a>00455 memcpy(inputFloat, rhs.<a class="code" href="structOgre_1_1Terrain_1_1ImportData.html#aab91a388f7bab0e1d00a858bbeb5902" title="Optional list of terrainSize * terrainSize floats defining the terrain.">inputFloat</a>, <span class="keyword">sizeof</span>(<span class="keywordtype">float</span>) * terrainSize*terrainSize);
  197. <a name="l00456"></a>00456 }
  198. <a name="l00457"></a>00457 <span class="keywordflow">else</span>
  199. <a name="l00458"></a>00458 inputFloat = 0;
  200. <a name="l00459"></a>00459 }
  201. <a name="l00460"></a>00460 <span class="keywordflow">else</span>
  202. <a name="l00461"></a>00461 {
  203. <a name="l00462"></a>00462 <span class="comment">// re-use pointers</span>
  204. <a name="l00463"></a>00463 inputImage = rhs.<a class="code" href="structOgre_1_1Terrain_1_1ImportData.html#61b189d3b9768810d747f35f7d141e79" title="Optional heightmap providing the initial heights for the terrain.">inputImage</a>;
  205. <a name="l00464"></a>00464 inputFloat = rhs.<a class="code" href="structOgre_1_1Terrain_1_1ImportData.html#aab91a388f7bab0e1d00a858bbeb5902" title="Optional list of terrainSize * terrainSize floats defining the terrain.">inputFloat</a>;
  206. <a name="l00465"></a>00465 }
  207. <a name="l00466"></a>00466 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
  208. <a name="l00467"></a>00467 }
  209. <a name="l00468"></a>00468
  210. <a name="l00470"></a><a class="code" href="structOgre_1_1Terrain_1_1ImportData.html#7a5f66953eabbc5221f36ee476f98d47">00470</a> <span class="keywordtype">void</span> destroy()
  211. <a name="l00471"></a>00471 {
  212. <a name="l00472"></a>00472 <span class="keywordflow">if</span> (deleteInputData)
  213. <a name="l00473"></a>00473 {
  214. <a name="l00474"></a>00474 <a class="code" href="group__Memory.html#gd18eff671a00617b21c8e35a7f545690">OGRE_DELETE</a> inputImage;
  215. <a name="l00475"></a>00475 <a class="code" href="group__Memory.html#gcfd8dc937cf390c7bff05495f0dc10cf" title="Free the memory allocated with OGRE_MALLOC or OGRE_ALLOC_T. Category is required...">OGRE_FREE</a>(inputFloat, <a class="code" href="group__Memory.html#gg830fab51be174d6f2849857cb1abb36af9e04ff475de4493bc942a9c73da4c2e" title="Geometry held in main memory.">MEMCATEGORY_GEOMETRY</a>);
  216. <a name="l00476"></a>00476 inputImage = 0;
  217. <a name="l00477"></a>00477 inputFloat = 0;
  218. <a name="l00478"></a>00478 }
  219. <a name="l00479"></a>00479
  220. <a name="l00480"></a>00480 }
  221. <a name="l00481"></a>00481
  222. <a name="l00482"></a><a class="code" href="structOgre_1_1Terrain_1_1ImportData.html#b44221d85f1c10b8c2be75b476d89440">00482</a> ~<a class="code" href="structOgre_1_1Terrain_1_1ImportData.html" title="Structure encapsulating import data that you may use to bootstrap the terrain without...">ImportData</a>()
  223. <a name="l00483"></a>00483 {
  224. <a name="l00484"></a>00484 destroy();
  225. <a name="l00485"></a>00485 }
  226. <a name="l00486"></a>00486
  227. <a name="l00487"></a>00487 };
  228. <a name="l00488"></a>00488
  229. <a name="l00490"></a><a class="code" href="classOgre_1_1Terrain.html#2d0c6e14298e6a196148388ca2ffa9e2">00490</a> <span class="keyword">enum</span> <a class="code" href="classOgre_1_1Terrain.html#2d0c6e14298e6a196148388ca2ffa9e2" title="Neighbour index enumeration - indexed anticlockwise from East like angles.">NeighbourIndex</a>
  230. <a name="l00491"></a>00491 {
  231. <a name="l00492"></a><a class="code" href="classOgre_1_1Terrain.html#2d0c6e14298e6a196148388ca2ffa9e288c6e2c93031bba254272861a1664cc3">00492</a> NEIGHBOUR_EAST = 0,
  232. <a name="l00493"></a><a class="code" href="classOgre_1_1Terrain.html#2d0c6e14298e6a196148388ca2ffa9e2ed82e8f7f45fcb5faeef6158c9d1ff3a">00493</a> NEIGHBOUR_NORTHEAST = 1,
  233. <a name="l00494"></a><a class="code" href="classOgre_1_1Terrain.html#2d0c6e14298e6a196148388ca2ffa9e207b3c537d34f5c7e1e3e79634dfcac1d">00494</a> NEIGHBOUR_NORTH = 2,
  234. <a name="l00495"></a><a class="code" href="classOgre_1_1Terrain.html#2d0c6e14298e6a196148388ca2ffa9e28795dff5bfc2240747ee0a843a900c71">00495</a> NEIGHBOUR_NORTHWEST = 3,
  235. <a name="l00496"></a><a class="code" href="classOgre_1_1Terrain.html#2d0c6e14298e6a196148388ca2ffa9e23a45b8d00d2ba435e61cdc99c94b0a91">00496</a> NEIGHBOUR_WEST = 4,
  236. <a name="l00497"></a><a class="code" href="classOgre_1_1Terrain.html#2d0c6e14298e6a196148388ca2ffa9e2ec43a04404ef9873e7d43c094e097e40">00497</a> NEIGHBOUR_SOUTHWEST = 5,
  237. <a name="l00498"></a><a class="code" href="classOgre_1_1Terrain.html#2d0c6e14298e6a196148388ca2ffa9e28c91ce1d5f82d7525102bc91fde0df2d">00498</a> NEIGHBOUR_SOUTH = 6,
  238. <a name="l00499"></a><a class="code" href="classOgre_1_1Terrain.html#2d0c6e14298e6a196148388ca2ffa9e24183a4a8b0f78832395fa0aa981f07bf">00499</a> NEIGHBOUR_SOUTHEAST = 7,
  239. <a name="l00500"></a>00500
  240. <a name="l00501"></a><a class="code" href="classOgre_1_1Terrain.html#2d0c6e14298e6a196148388ca2ffa9e25ba448a51833e6c8eea28884a706834c">00501</a> NEIGHBOUR_COUNT = 8
  241. <a name="l00502"></a>00502 };
  242. <a name="l00503"></a>00503
  243. <a name="l00504"></a><a class="code" href="classOgre_1_1Terrain.html#7c381de393a45f50b946a0deb82d3e94">00504</a> <a class="code" href="classOgre_1_1SceneManager.html" title="Manages the organisation and rendering of a &amp;#39;scene&amp;#39; i.e.">SceneManager</a>* getSceneManager()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mSceneMgr; }
  244. <a name="l00505"></a>00505
  245. <a name="l00507"></a><a class="code" href="classOgre_1_1Terrain.html#ebf8a7aadb5de3a0669d41acfd58d781">00507</a> <span class="keyword">enum</span> <a class="code" href="classOgre_1_1Terrain.html#ebf8a7aadb5de3a0669d41acfd58d781" title="Enumeration of relative spaces that you might want to use to address the terrain...">Space</a>
  246. <a name="l00508"></a>00508 {
  247. <a name="l00510"></a><a class="code" href="classOgre_1_1Terrain.html#ebf8a7aadb5de3a0669d41acfd58d7810a7049246e4a77e37dcea36fd35c4daf">00510</a> WORLD_SPACE = 0,
  248. <a name="l00512"></a><a class="code" href="classOgre_1_1Terrain.html#ebf8a7aadb5de3a0669d41acfd58d781e3eabb53019f0d4ecfbff1d9a417d907">00512</a> LOCAL_SPACE = 1,
  249. <a name="l00516"></a><a class="code" href="classOgre_1_1Terrain.html#ebf8a7aadb5de3a0669d41acfd58d7810ad91edc61b2fb7ebe1966fc167ffe6d">00516</a> TERRAIN_SPACE = 2,
  250. <a name="l00520"></a><a class="code" href="classOgre_1_1Terrain.html#ebf8a7aadb5de3a0669d41acfd58d781748f0b5f2b54c63be96965de53931de6">00520</a> POINT_SPACE = 3
  251. <a name="l00521"></a>00521 };
  252. <a name="l00522"></a>00522
  253. <a name="l00527"></a><a class="code" href="classOgre_1_1Terrain_1_1GpuBufferAllocator.html">00527</a> <span class="keyword">class </span><a class="code" href="OgreTerrainPrerequisites_8h.html#2fbe49b54cb4b3c3e2757cd3ac167068">_OgreTerrainExport</a> <a class="code" href="classOgre_1_1Terrain_1_1GpuBufferAllocator.html" title="Interface used to by the Terrain instance to allocate GPU buffers.">GpuBufferAllocator</a> : <span class="keyword">public</span> <a class="code" href="classOgre_1_1AllocatedObject.html" title="Superclass for all objects that wish to use custom memory allocators when their new...">TerrainAlloc</a>
  254. <a name="l00528"></a>00528 {
  255. <a name="l00529"></a>00529 <span class="keyword">public</span>:
  256. <a name="l00530"></a><a class="code" href="classOgre_1_1Terrain_1_1GpuBufferAllocator.html#dafa196fd89b566090806bde188bbf33">00530</a> <a class="code" href="classOgre_1_1Terrain_1_1GpuBufferAllocator.html" title="Interface used to by the Terrain instance to allocate GPU buffers.">GpuBufferAllocator</a>() {}
  257. <a name="l00531"></a><a class="code" href="classOgre_1_1Terrain_1_1GpuBufferAllocator.html#b50e9928256ddbd09462938a7e13e3c8">00531</a> <span class="keyword">virtual</span> ~<a class="code" href="classOgre_1_1Terrain_1_1GpuBufferAllocator.html" title="Interface used to by the Terrain instance to allocate GPU buffers.">GpuBufferAllocator</a>() {}
  258. <a name="l00532"></a>00532
  259. <a name="l00538"></a>00538 <span class="keyword">virtual</span> <span class="keywordtype">void</span> allocateVertexBuffers(<a class="code" href="classOgre_1_1Terrain.html" title="The main containing class for a chunk of terrain.">Terrain</a>* forTerrain, <span class="keywordtype">size_t</span> numVertices, <a class="code" href="classOgre_1_1HardwareVertexBufferSharedPtr.html" title="Shared pointer implementation used to share index buffers.">HardwareVertexBufferSharedPtr</a>&amp; destPos, <a class="code" href="classOgre_1_1HardwareVertexBufferSharedPtr.html" title="Shared pointer implementation used to share index buffers.">HardwareVertexBufferSharedPtr</a>&amp; destDelta) = 0;
  260. <a name="l00541"></a>00541 <span class="keyword">virtual</span> <span class="keywordtype">void</span> freeVertexBuffers(<span class="keyword">const</span> <a class="code" href="classOgre_1_1HardwareVertexBufferSharedPtr.html" title="Shared pointer implementation used to share index buffers.">HardwareVertexBufferSharedPtr</a>&amp; posbuf, <span class="keyword">const</span> <a class="code" href="classOgre_1_1HardwareVertexBufferSharedPtr.html" title="Shared pointer implementation used to share index buffers.">HardwareVertexBufferSharedPtr</a>&amp; deltabuf) = 0;
  261. <a name="l00542"></a>00542
  262. <a name="l00557"></a>00557 <span class="keyword">virtual</span> <a class="code" href="classOgre_1_1HardwareIndexBufferSharedPtr.html" title="Shared pointer implementation used to share index buffers.">HardwareIndexBufferSharedPtr</a> getSharedIndexBuffer(<a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> batchSize,
  263. <a name="l00558"></a>00558 <a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> vdatasize, <span class="keywordtype">size_t</span> vertexIncrement, <a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> xoffset, <a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> yoffset, <a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> numSkirtRowsCols,
  264. <a name="l00559"></a>00559 <a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> skirtRowColSkip) = 0;
  265. <a name="l00560"></a>00560
  266. <a name="l00562"></a>00562 <span class="keyword">virtual</span> <span class="keywordtype">void</span> freeAllBuffers() = 0;
  267. <a name="l00563"></a>00563
  268. <a name="l00564"></a>00564 };
  269. <a name="l00566"></a><a class="code" href="classOgre_1_1Terrain_1_1DefaultGpuBufferAllocator.html">00566</a> <span class="keyword">class </span><a class="code" href="OgreTerrainPrerequisites_8h.html#2fbe49b54cb4b3c3e2757cd3ac167068">_OgreTerrainExport</a> <a class="code" href="classOgre_1_1Terrain_1_1DefaultGpuBufferAllocator.html" title="Standard implementation of a buffer allocator which re-uses buffers.">DefaultGpuBufferAllocator</a> : <span class="keyword">public</span> <a class="code" href="classOgre_1_1Terrain_1_1GpuBufferAllocator.html" title="Interface used to by the Terrain instance to allocate GPU buffers.">GpuBufferAllocator</a>
  270. <a name="l00567"></a>00567 {
  271. <a name="l00568"></a>00568 <span class="keyword">public</span>:
  272. <a name="l00569"></a>00569 <a class="code" href="classOgre_1_1Terrain_1_1DefaultGpuBufferAllocator.html" title="Standard implementation of a buffer allocator which re-uses buffers.">DefaultGpuBufferAllocator</a>();
  273. <a name="l00570"></a>00570 ~<a class="code" href="classOgre_1_1Terrain_1_1DefaultGpuBufferAllocator.html" title="Standard implementation of a buffer allocator which re-uses buffers.">DefaultGpuBufferAllocator</a>();
  274. <a name="l00571"></a>00571 <span class="keywordtype">void</span> allocateVertexBuffers(<a class="code" href="classOgre_1_1Terrain.html" title="The main containing class for a chunk of terrain.">Terrain</a>* forTerrain, <span class="keywordtype">size_t</span> numVertices, <a class="code" href="classOgre_1_1HardwareVertexBufferSharedPtr.html" title="Shared pointer implementation used to share index buffers.">HardwareVertexBufferSharedPtr</a>&amp; destPos, <a class="code" href="classOgre_1_1HardwareVertexBufferSharedPtr.html" title="Shared pointer implementation used to share index buffers.">HardwareVertexBufferSharedPtr</a>&amp; destDelta);
  275. <a name="l00572"></a>00572 <span class="keywordtype">void</span> freeVertexBuffers(<span class="keyword">const</span> <a class="code" href="classOgre_1_1HardwareVertexBufferSharedPtr.html" title="Shared pointer implementation used to share index buffers.">HardwareVertexBufferSharedPtr</a>&amp; posbuf, <span class="keyword">const</span> <a class="code" href="classOgre_1_1HardwareVertexBufferSharedPtr.html" title="Shared pointer implementation used to share index buffers.">HardwareVertexBufferSharedPtr</a>&amp; deltabuf);
  276. <a name="l00573"></a>00573 <a class="code" href="classOgre_1_1HardwareIndexBufferSharedPtr.html" title="Shared pointer implementation used to share index buffers.">HardwareIndexBufferSharedPtr</a> getSharedIndexBuffer(<a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> batchSize,
  277. <a name="l00574"></a>00574 <a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> vdatasize, <span class="keywordtype">size_t</span> vertexIncrement, <a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> xoffset, <a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> yoffset, <a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> numSkirtRowsCols,
  278. <a name="l00575"></a>00575 <a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> skirtRowColSkip);
  279. <a name="l00576"></a>00576 <span class="keywordtype">void</span> freeAllBuffers();
  280. <a name="l00577"></a>00577
  281. <a name="l00581"></a>00581 <span class="keywordtype">void</span> warmStart(<span class="keywordtype">size_t</span> numInstances, <a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> terrainSize, <a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> maxBatchSize,
  282. <a name="l00582"></a>00582 <a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> minBatchSize);
  283. <a name="l00583"></a>00583
  284. <a name="l00584"></a>00584 <span class="keyword">protected</span>:
  285. <a name="l00585"></a><a class="code" href="classOgre_1_1Terrain_1_1DefaultGpuBufferAllocator.html#55379cc5331736568c8a73ad2cc5c5ed">00585</a> <span class="keyword">typedef</span> <a class="code" href="structOgre_1_1list.html">list&lt;HardwareVertexBufferSharedPtr&gt;::type</a> VBufList;
  286. <a name="l00586"></a><a class="code" href="classOgre_1_1Terrain_1_1DefaultGpuBufferAllocator.html#8820ed742f93ba0b13da637d71b934a9">00586</a> VBufList mFreePosBufList;
  287. <a name="l00587"></a><a class="code" href="classOgre_1_1Terrain_1_1DefaultGpuBufferAllocator.html#1f0cda9f231eb97e7fd0367ddc8055c9">00587</a> VBufList mFreeDeltaBufList;
  288. <a name="l00588"></a><a class="code" href="classOgre_1_1Terrain_1_1DefaultGpuBufferAllocator.html#aa440fddd2249c96890533c6d20e21a6">00588</a> <span class="keyword">typedef</span> <a class="code" href="structOgre_1_1map.html">map&lt;uint32, HardwareIndexBufferSharedPtr&gt;::type</a> IBufMap;
  289. <a name="l00589"></a><a class="code" href="classOgre_1_1Terrain_1_1DefaultGpuBufferAllocator.html#80d57bd40f5fa54dc002dc208fc096bb">00589</a> IBufMap mSharedIBufMap;
  290. <a name="l00590"></a>00590
  291. <a name="l00591"></a>00591 <a class="code" href="namespaceOgre.html#df2a0cf2e77143b5ee1d38a75e289545">uint32</a> hashIndexBuffer(<a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> batchSize,
  292. <a name="l00592"></a>00592 <a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> vdatasize, <span class="keywordtype">size_t</span> vertexIncrement, <a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> xoffset, <a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> yoffset, <a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> numSkirtRowsCols,
  293. <a name="l00593"></a>00593 <a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> skirtRowColSkip);
  294. <a name="l00594"></a>00594 <a class="code" href="classOgre_1_1HardwareVertexBufferSharedPtr.html" title="Shared pointer implementation used to share index buffers.">HardwareVertexBufferSharedPtr</a> getVertexBuffer(VBufList&amp; <a class="code" href="structOgre_1_1list.html">list</a>, <span class="keywordtype">size_t</span> vertexSize, <span class="keywordtype">size_t</span> numVertices);
  295. <a name="l00595"></a>00595
  296. <a name="l00596"></a>00596 };
  297. <a name="l00597"></a>00597
  298. <a name="l00602"></a>00602 <span class="keywordtype">void</span> setGpuBufferAllocator(<a class="code" href="classOgre_1_1Terrain_1_1GpuBufferAllocator.html" title="Interface used to by the Terrain instance to allocate GPU buffers.">GpuBufferAllocator</a>* alloc);
  299. <a name="l00603"></a>00603
  300. <a name="l00605"></a>00605 <a class="code" href="classOgre_1_1Terrain_1_1GpuBufferAllocator.html" title="Interface used to by the Terrain instance to allocate GPU buffers.">GpuBufferAllocator</a>* getGpuBufferAllocator();
  301. <a name="l00606"></a>00606
  302. <a name="l00608"></a>00608 <span class="keyword">static</span> <span class="keywordtype">size_t</span> _getNumIndexesForBatchSize(<a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> batchSize);
  303. <a name="l00620"></a>00620 <span class="keyword">static</span> <span class="keywordtype">void</span> _populateIndexBuffer(<a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a>* pIndexes, <a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> batchSize,
  304. <a name="l00621"></a>00621 <a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> vdatasize, <span class="keywordtype">size_t</span> vertexIncrement, <a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> xoffset, <a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> yoffset, <a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> numSkirtRowsCols,
  305. <a name="l00622"></a>00622 <a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> skirtRowColSkip);
  306. <a name="l00623"></a>00623
  307. <a name="l00625"></a>00625 <span class="keyword">static</span> <a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> _calcSkirtVertexIndex(<a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> mainIndex, <a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> vdatasize, <span class="keywordtype">bool</span> isCol,
  308. <a name="l00626"></a>00626 <a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> numSkirtRowsCols, <a class="code" href="namespaceOgre.html#a8263b218e7d187ad5ef03a73a6ad7fd">uint16</a> skirtRowColSkip);
  309. <a name="l00627"></a>00627
  310. <a name="l00634"></a>00634 <span class="keywordtype">void</span> convertPosition(<a class="code" href="classOgre_1_1Terrain.html#ebf8a7aadb5de3a0669d41acfd58d781" title="Enumeration of relative spaces that you might want to use to address the terrain...">Space</a> inSpace, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html" title="Standard 3-dimensional vector.">Vector3</a>&amp; inPos, <a class="code" href="classOgre_1_1Terrain.html#ebf8a7aadb5de3a0669d41acfd58d781" title="Enumeration of relative spaces that you might want to use to address the terrain...">Space</a> outSpace, <a class="code" href="classOgre_1_1Vector3.html" title="Standard 3-dimensional vector.">Vector3</a>&amp; outPos) <span class="keyword">const</span>;
  311. <a name="l00641"></a>00641 <a class="code" href="classOgre_1_1Vector3.html" title="Standard 3-dimensional vector.">Vector3</a> convertPosition(<a class="code" href="classOgre_1_1Terrain.html#ebf8a7aadb5de3a0669d41acfd58d781" title="Enumeration of relative spaces that you might want to use to address the terrain...">Space</a> inSpace, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html" title="Standard 3-dimensional vector.">Vector3</a>&amp; inPos, <a class="code" href="classOgre_1_1Terrain.html#ebf8a7aadb5de3a0669d41acfd58d781" title="Enumeration of relative spaces that you might want to use to address the terrain...">Space</a> outSpace) <span class="keyword">const</span>;
  312. <a name="l00648"></a>00648 <span class="keywordtype">void</span> convertDirection(<a class="code" href="classOgre_1_1Terrain.html#ebf8a7aadb5de3a0669d41acfd58d781" title="Enumeration of relative spaces that you might want to use to address the terrain...">Space</a> inSpace, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html" title="Standard 3-dimensional vector.">Vector3</a>&amp; inDir, <a class="code" href="classOgre_1_1Terrain.html#ebf8a7aadb5de3a0669d41acfd58d781" title="Enumeration of relative spaces that you might want to use to address the terrain...">Space</a> outSpace, <a class="code" href="classOgre_1_1Vector3.html" title="Standard 3-dimensional vector.">Vector3</a>&amp; outDir) <span class="keyword">const</span>;
  313. <a name="l00655"></a>00655 <a class="code" href="classOgre_1_1Vector3.html" title="Standard 3-dimensional vector.">Vec

Large files files are truncated, but you can click here to view the full file