OgreTerrain.h
Go to the documentation of this file.
1 /*
2 -----------------------------------------------------------------------------
3 This source file is part of OGRE
4 (Object-oriented Graphics Rendering Engine)
5 For the latest info, see http://www.ogre3d.org/
6 
7 Copyright (c) 2000-2013 Torus Knot Software Ltd
8 
9 Permission is hereby granted, free of charge, to any person obtaining a copy
10 of this software and associated documentation files (the "Software"), to deal
11 in the Software without restriction, including without limitation the rights
12 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 copies of the Software, and to permit persons to whom the Software is
14 furnished to do so, subject to the following conditions:
15 
16 The above copyright notice and this permission notice shall be included in
17 all copies or substantial portions of the Software.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 THE SOFTWARE.
26 -----------------------------------------------------------------------------
27 */
28 
29 #ifndef __Ogre_Terrain_H__
30 #define __Ogre_Terrain_H__
31 
33 #include "OgreCommon.h"
34 #include "OgreVector3.h"
35 #include "OgreAxisAlignedBox.h"
36 #include "OgreSceneManager.h"
39 #include "OgreWorkQueue.h"
40 #include "OgreTerrainLodManager.h"
41 
42 namespace Ogre
43 {
264  {
265  public:
266  friend class TerrainLodManager;
267 
272  virtual ~Terrain();
273 
274  static const uint32 TERRAIN_CHUNK_ID;
278 
291 
292  static const size_t LOD_MORPH_CUSTOM_PARAM;
293 
295 
299  {
304 
306  : worldSize(100) {}
307  };
309 
312  {
314  ALIGN_X_Z = 0,
316  ALIGN_X_Y = 1,
318  ALIGN_Y_Z = 2
319  };
320 
324  struct ImportData
325  {
347 
353 
356 
363 
368  float* inputFloat;
369 
374 
383 
388 
399 
401  : terrainAlign(ALIGN_X_Z)
402  , terrainSize(1025)
403  , maxBatchSize(65)
404  , minBatchSize(17)
405  , pos(Vector3::ZERO)
406  , worldSize(1000)
407  , inputImage(0)
408  , inputFloat(0)
409  , constantHeight(0)
410  , deleteInputData(false)
411  , inputScale(1.0)
412  , inputBias(0.0)
413  {
414 
415  }
416 
417  ImportData(const ImportData& rhs)
418  : terrainAlign(ALIGN_X_Z)
419  , terrainSize(1025)
420  , maxBatchSize(65)
421  , minBatchSize(17)
422  , pos(Vector3::ZERO)
423  , worldSize(1000)
424  , inputImage(0)
425  , inputFloat(0)
426  , constantHeight(0)
427  , deleteInputData(false)
428  , inputScale(1.0)
429  , inputBias(0.0)
430  {
431  *this = rhs;
432  }
433 
435  {
436  // basic copy
437  terrainAlign = rhs.terrainAlign;
438  terrainSize = rhs.terrainSize;
439  maxBatchSize = rhs.maxBatchSize;
440  minBatchSize = rhs.minBatchSize;
441  pos = rhs.pos;
442  worldSize = rhs.worldSize;
443  constantHeight = rhs.constantHeight;
444  deleteInputData = rhs.deleteInputData;
445  inputScale = rhs.inputScale;
446  inputBias = rhs.inputBias;
447  layerDeclaration = rhs.layerDeclaration;
448  layerList = rhs.layerList;
449 
450  // By-value copies in ownership cases
451  if (rhs.deleteInputData)
452  {
453  if (rhs.inputImage)
454  inputImage = OGRE_NEW Image(*rhs.inputImage);
455  else
456  inputImage = 0;
457 
458  if (rhs.inputFloat)
459  {
460  inputFloat = OGRE_ALLOC_T(float, terrainSize*terrainSize, MEMCATEGORY_GEOMETRY);
461  memcpy(inputFloat, rhs.inputFloat, sizeof(float) * terrainSize*terrainSize);
462  }
463  else
464  inputFloat = 0;
465  }
466  else
467  {
468  // re-use pointers
469  inputImage = rhs.inputImage;
470  inputFloat = rhs.inputFloat;
471  }
472  return *this;
473  }
474 
476  void destroy()
477  {
478  if (deleteInputData)
479  {
480  OGRE_DELETE inputImage;
481  OGRE_FREE(inputFloat, MEMCATEGORY_GEOMETRY);
482  inputImage = 0;
483  inputFloat = 0;
484  }
485 
486  }
487 
489  {
490  destroy();
491  }
492 
493  };
494 
497  {
498  NEIGHBOUR_EAST = 0,
499  NEIGHBOUR_NORTHEAST = 1,
500  NEIGHBOUR_NORTH = 2,
501  NEIGHBOUR_NORTHWEST = 3,
502  NEIGHBOUR_WEST = 4,
503  NEIGHBOUR_SOUTHWEST = 5,
504  NEIGHBOUR_SOUTH = 6,
505  NEIGHBOUR_SOUTHEAST = 7,
506 
507  NEIGHBOUR_COUNT = 8
508  };
509 
510  SceneManager* getSceneManager() const { return mSceneMgr; }
511 
513  enum Space
514  {
516  WORLD_SPACE = 0,
518  LOCAL_SPACE = 1,
522  TERRAIN_SPACE = 2,
526  POINT_SPACE = 3
527  };
528 
534  {
535  public:
537  virtual ~GpuBufferAllocator() {}
538 
544  virtual void allocateVertexBuffers(Terrain* forTerrain, size_t numVertices, HardwareVertexBufferSharedPtr& destPos, HardwareVertexBufferSharedPtr& destDelta) = 0;
547  virtual void freeVertexBuffers(const HardwareVertexBufferSharedPtr& posbuf, const HardwareVertexBufferSharedPtr& deltabuf) = 0;
548 
564  uint16 vdatasize, size_t vertexIncrement, uint16 xoffset, uint16 yoffset, uint16 numSkirtRowsCols,
565  uint16 skirtRowColSkip) = 0;
566 
568  virtual void freeAllBuffers() = 0;
569 
570  };
573  {
574  public:
577  void allocateVertexBuffers(Terrain* forTerrain, size_t numVertices, HardwareVertexBufferSharedPtr& destPos, HardwareVertexBufferSharedPtr& destDelta);
580  uint16 vdatasize, size_t vertexIncrement, uint16 xoffset, uint16 yoffset, uint16 numSkirtRowsCols,
581  uint16 skirtRowColSkip);
583 
587  void warmStart(size_t numInstances, uint16 terrainSize, uint16 maxBatchSize,
588  uint16 minBatchSize);
589 
590  protected:
596 
598  uint16 vdatasize, size_t vertexIncrement, uint16 xoffset, uint16 yoffset, uint16 numSkirtRowsCols,
599  uint16 skirtRowColSkip);
600  HardwareVertexBufferSharedPtr getVertexBuffer(VBufList& list, size_t vertexSize, size_t numVertices);
601 
602  };
603 
609 
612 
614  static size_t _getNumIndexesForBatchSize(uint16 batchSize);
626  static void _populateIndexBuffer(uint16* pIndexes, uint16 batchSize,
627  uint16 vdatasize, size_t vertexIncrement, uint16 xoffset, uint16 yoffset, uint16 numSkirtRowsCols,
628  uint16 skirtRowColSkip);
629 
631  static uint16 _calcSkirtVertexIndex(uint16 mainIndex, uint16 vdatasize, bool isCol,
632  uint16 numSkirtRowsCols, uint16 skirtRowColSkip);
633 
640  void convertPosition(Space inSpace, const Vector3& inPos, Space outSpace, Vector3& outPos) const;
647  Vector3 convertPosition(Space inSpace, const Vector3& inPos, Space outSpace) const;
654  void convertDirection(Space inSpace, const Vector3& inDir, Space outSpace, Vector3& outDir) const;
661  Vector3 convertDirection(Space inSpace, const Vector3& inDir, Space outSpace) const;
662 
667  void setResourceGroup(const String& resGroup) { mResourceGroup = resGroup; }
668 
672  const String& getResourceGroup() const { return mResourceGroup; }
673 
677 
686  void save(const String& filename);
692  void save(StreamSerialiser& stream);
693 
700  bool prepare(const String& filename);
707  bool prepare(DataStreamPtr& stream);
714  bool prepare(StreamSerialiser& stream);
715 
721  bool prepare(const ImportData& importData);
722 
728  void load(const String& filename);
729 
735  void load(StreamSerialiser& stream);
736 
743  void load(int lodLevel = 0, bool synchronous = true);
744 
750  bool isLoaded() const { return mIsLoaded; }
751 
756  bool isModified() const { return mModified; }
757 
758 
763  bool isHeightDataModified() const { return mHeightDataModified; }
764 
765 
770  void unload();
771 
776  void unprepare();
777 
778 
788  float* getHeightData() const;
789 
792  float* getHeightData(long x, long y) const;
793 
798  float getHeightAtPoint(long x, long y) const;
799 
806  void setHeightAtPoint(long x, long y, float h);
807 
812 
818  float getHeightAtWorldPosition(Real x, Real y, Real z) const;
819 
825  float getHeightAtWorldPosition(const Vector3& pos) const;
826 
833  const float* getDeltaData() const;
834 
837  const float* getDeltaData(long x, long y) const;
838 
843  void getPoint(long x, long y, Vector3* outpos) const;
844 
850  void getPointFromSelfOrNeighbour(long x, long y, Vector3* outpos) const;
851 
856  void getPoint(long x, long y, float height, Vector3* outpos) const;
860  void getPointTransform(Matrix4* outXform) const;
865  void getTerrainVector(const Vector3& inVec, Vector3* outVec) const;
870  void getTerrainVectorAlign(const Vector3& inVec, Alignment align, Vector3* outVec) const;
871 
876  void getTerrainVector(Real x, Real y, Real z, Vector3* outVec) const;
881  void getTerrainVectorAlign(Real x, Real y, Real z, Alignment align, Vector3* outVec) const;
882 
887  void getVector(const Vector3& inVec, Vector3* outVec) const;
892  void getVectorAlign(const Vector3& inVec, Alignment align, Vector3* outVec) const;
893 
898  void getVector(Real x, Real y, Real z, Vector3* outVec) const;
903  void getVectorAlign(Real x, Real y, Real z, Alignment align, Vector3* outVec) const;
904 
905 
913  void getPosition(const Vector3& TSpos, Vector3* outWSpos) const;
921  void getPosition(Real x, Real y, Real z, Vector3* outWSpos) const;
922 
929  void getTerrainPosition(const Vector3& WSpos, Vector3* outTSpos) const;
936  void getTerrainPosition(Real x, Real y, Real z, Vector3* outTSpos) const;
943  void getPositionAlign(const Vector3& TSpos, Alignment align, Vector3* outWSpos) const;
950  void getPositionAlign(Real x, Real y, Real z, Alignment align, Vector3* outWSpos) const;
951 
958  void getTerrainPositionAlign(const Vector3& WSpos, Alignment align, Vector3* outTSpos) const;
965  void getTerrainPositionAlign(Real x, Real y, Real z, Alignment align, Vector3* outTSpos) const;
966 
967 
971  uint16 getSize() const;
976  void setSize(uint16 newSize);
986  void setWorldSize(Real newWorldSize);
987 
989  uint8 getLayerCount() const { return static_cast<uint8>(mLayers.size()); }
990 
992  const TerrainLayerDeclaration& getLayerDeclaration() const { return mLayerDecl; }
993 
1000  void addLayer(Real worldSize = 0, const StringVector* textureNames = 0);
1001 
1009  void addLayer(uint8 index, Real worldSize = 0, const StringVector* textureNames = 0);
1010 
1013  void removeLayer(uint8 index);
1014 
1024  void replaceLayer(uint8 index, bool keepBlends, Real worldSize = 0, const StringVector* textureNames = 0);
1025 
1030 
1041  void setLayerWorldSize(uint8 index, Real size);
1042 
1052 
1058  const String& getLayerTextureName(uint8 layerIndex, uint8 samplerIndex) const;
1065  void setLayerTextureName(uint8 layerIndex, uint8 samplerIndex, const String& textureName);
1066 
1073  uint16 getLayerBlendMapSize() const { return mLayerBlendMapSize; }
1074 
1080  uint16 getLightmapSize() const { return mLightmapSize; }
1081 
1083  const TexturePtr& getLightmap() const { return mLightmap; }
1084 
1090  uint16 getCompositeMapSize() const { return mCompositeMapSize; }
1091 
1093  const TexturePtr& getCompositeMap() const { return mCompositeMap; }
1094 
1096  const Vector3& getPosition() const { return mPos; }
1098  void setPosition(const Vector3& pos);
1107  void dirty();
1108 
1117  void dirtyRect(const Rect& rect);
1118 
1124  void _dirtyCompositeMapRect(const Rect& rect);
1125 
1136  void dirtyLightmapRect(const Rect& rect);
1137 
1149 
1172  void update(bool synchronous = false);
1173 
1185 
1186  // Used as a type mask for updateDerivedData
1190  static const uint8 DERIVED_DATA_ALL;
1191 
1203  void updateDerivedData(bool synchronous = false, uint8 typeMask = 0xFF);
1204 
1214 
1229 
1230 
1234  Real getSkirtSize() const { return mSkirtSize; }
1235 
1237  uint16 getNumLodLevels() const { return mNumLodLevels; }
1238 
1240  uint16 getNumLodLevelsPerLeaf() const { return mNumLodLevelsPerLeafNode; }
1241 
1250 
1258  void finaliseHeightDeltas(const Rect& rect, bool cpuData);
1259 
1265  PixelBox* calculateNormals(const Rect& rect, Rect& outFinalRect);
1266 
1274  void finaliseNormals(const Rect& rect, PixelBox* normalsBox);
1275 
1283  PixelBox* calculateLightmap(const Rect& rect, const Rect& extraTargetRect, Rect& outFinalRect);
1284 
1292  void finaliseLightmap(const Rect& rect, PixelBox* lightmapBox);
1293 
1298 
1310  std::pair<bool, Vector3> rayIntersects(const Ray& ray,
1311  bool cascadeToNeighbours = false, Real distanceLimit = 0); //const;
1312 
1314  const AxisAlignedBox& getAABB() const;
1323 
1325  const MaterialPtr& getMaterial() const;
1327  const MaterialPtr& _getMaterial() const { return mMaterial; }
1331  const MaterialPtr& _getCompositeMapMaterial() const { return mCompositeMapMaterial; }
1332 
1334  const String& getMaterialName() const { return mMaterialName; }
1335 
1341 
1343  uint8 getRenderQueueGroup(void) const { return mRenderQueueGroup; }
1347  void setRenderQueueGroup(uint8 grp) { mRenderQueueGroup = grp; }
1348 
1350  uint32 getVisibilityFlags(void) const { return mVisibilityFlags; }
1354  void setVisibilityFlags(uint32 flags) { mVisibilityFlags = flags; }
1355 
1357  uint32 getQueryFlags(void) const { return mQueryFlags; }
1361  void setQueryFlags(uint32 flags) { mQueryFlags = flags; }
1362 
1364  void addQueryFlags(uint32 flags) { mQueryFlags |= flags; }
1365 
1366  /* As setQueryFlags, except the flags passed as parameters are removed from the existing flags on this object. */
1367  void removeQueryFlags(uint32 flags) { mQueryFlags &= ~flags; }
1368 
1369 
1383 
1389  uint8 getBlendTextureIndex(uint8 layerIndex) const;
1390 
1395 
1396 
1401  const String& getBlendTextureName(uint8 textureIndex) const;
1402 
1415  void setGlobalColourMapEnabled(bool enabled, uint16 size = 0);
1417  bool getGlobalColourMapEnabled() const { return mGlobalColourMapEnabled; }
1419  uint16 getGlobalColourMapSize() const { return mGlobalColourMapSize; }
1421  const TexturePtr& getGlobalColourMap() const { return mColourMap; }
1422 
1428  void widenRectByVector(const Vector3& vec, const Rect& inRect, Rect& outRect);
1429 
1437  void widenRectByVector(const Vector3& vec, const Rect& inRect,
1438  Real minHeight, Real maxHeight, Rect& outRect);
1439 
1450 
1456 
1463  std::pair<uint8,uint8> getLayerBlendTextureIndex(uint8 layerIndex) const;
1464 
1475  void _setMorphRequired(bool morph) { mLodMorphRequired = morph; }
1477  bool _getMorphRequired() const { return mLodMorphRequired; }
1478 
1490  void _setNormalMapRequired(bool normalMap);
1491 
1505  void _setLightMapRequired(bool lightMap, bool shadowsOnly = false);
1506 
1525  void _setCompositeMapRequired(bool compositeMap);
1526 
1529 
1531  bool canHandleRequest(const WorkQueue::Request* req, const WorkQueue* srcQ);
1535  bool canHandleResponse(const WorkQueue::Response* res, const WorkQueue* srcQ);
1537  void handleResponse(const WorkQueue::Response* res, const WorkQueue* srcQ);
1540 
1543 
1547  uint16 getLODLevelWhenVertexEliminated(long rowOrColulmn) const;
1548 
1549 
1551  TerrainQuadTreeNode* getQuadTree() { return mQuadTree; }
1552 
1554  TexturePtr getTerrainNormalMap() const { return mTerrainNormalMap; }
1555 
1564 
1582  void setNeighbour(NeighbourIndex index, Terrain* neighbour, bool recalculate = false, bool notifyOther = true);
1583 
1589 
1592  static NeighbourIndex getNeighbourIndex(long offsetx, long offsety);
1593 
1602 
1610  void neighbourModified(NeighbourIndex index, const Rect& edgerect, const Rect& shadowrect);
1611 
1617  Terrain* raySelectNeighbour(const Ray& ray, Real distanceLimit = 0);
1618 
1623  void _dumpTextures(const String& prefix, const String& suffix);
1624 
1626  bool isDerivedDataUpdateInProgress() const { return mDerivedDataUpdateInProgress; }
1627 
1628 
1630  static void convertWorldToTerrainAxes(Alignment align, const Vector3& worldVec, Vector3* terrainVec);
1632  static void convertTerrainToWorldAxes(Alignment align, const Vector3& terrainVec, Vector3* worldVec);
1633 
1641  static bool readLayerInstanceList(StreamSerialiser& ser, size_t numSamplers, Terrain::LayerInstanceList& targetlst);
1642 
1643  // This mutex is write-locked by neighbours if they are in the process of deleting themselves.
1644  // It should be read-locked whenever using neighbours in calculations which are possibly running in a
1645  // background thread.
1646  OGRE_RW_MUTEX(mNeighbourMutex);
1647 
1648  protected:
1657  inline int getPositiveLodLevel( int lodLevel ) const
1658  {
1659  return (lodLevel>=0) ? lodLevel : mNumLodLevels+lodLevel;
1660  }
1661  void freeLodData();
1662 
1675  void convertSpace(Space inSpace, const Vector3& inVec, Space outSpace, Vector3& outVec, bool translation) const;
1681  void getPointAlign(long x, long y, Alignment align, Vector3* outpos) const;
1686  void getPointAlign(long x, long y, float height, Alignment align, Vector3* outpos) const;
1689  std::pair<bool, Vector3> checkQuadIntersection(int x, int y, const Ray& ray); //const;
1690 
1692  void deleteBlendMaps(uint8 lowIndex);
1698  void copyBlendTextureChannel(uint8 srcIndex, uint8 srcChannel, uint8 destIndex, uint8 destChannel );
1700  void clearGPUBlendChannel(uint8 index, uint channel);
1701 
1703  void checkLayers(bool includeGPUResources);
1706  PixelFormat getBlendTextureFormat(uint8 textureIndex, uint8 numLayers) const;
1707 
1708  void updateDerivedDataImpl(const Rect& rect, const Rect& lightmapExtraRect, bool synchronous, uint8 typeMask);
1709 
1710  void getEdgeRect(NeighbourIndex index, long range, Rect* outRect) const;
1711  // get the equivalent of the passed in edge rectangle in neighbour
1712  void getNeighbourEdgeRect(NeighbourIndex index, const Rect& inRect, Rect* outRect) const;
1713  // get the equivalent of the passed in edge point in neighbour
1714  void getNeighbourPoint(NeighbourIndex index, long x, long y, long *outx, long *outy) const;
1715  // overflow a point into a neighbour index and point
1716  void getNeighbourPointOverflow(long x, long y, NeighbourIndex *outindex, long *outx, long *outy) const;
1717 
1720 
1728 
1730  float* mHeightData;
1732  float* mDeltaData;
1750 
1755 
1763 
1766  mutable bool mPrepareInProgress;
1769  {
1771  // types requested
1775  _OgreTerrainExport friend std::ostream& operator<<(std::ostream& o, const DerivedDataRequest& r)
1776  { return o; }
1777  };
1778 
1781  {
1794  _OgreTerrainExport friend std::ostream& operator<<(std::ostream& o, const DerivedDataResponse& r)
1795  { return o; }
1796  };
1797 
1800  GEN_COMPOSITE_MAP_MATERIAL
1801  };
1804  {
1806  unsigned long startTime;
1809  _OgreTerrainExport friend std::ostream& operator<<(std::ostream& o, const GenerateMaterialRequest& r)
1810  { return o; }
1811  };
1812 
1816  mutable unsigned long long int mMaterialGenerationCount;
1817  mutable bool mMaterialDirty;
1818  mutable bool mMaterialParamsDirty;
1819 
1828 
1833 
1838 
1845  unsigned long mLastMillis;
1849 
1850 
1855 
1863 
1866 
1868  unsigned long mLastLODFrame;
1870 
1871  Terrain* mNeighbours[NEIGHBOUR_COUNT];
1872 
1875 
1877  size_t getDeltaBufVertexSize() const;
1878 
1880 
1881  public:
1885  void increaseLodLevel(bool synchronous = false);
1890 
1891  int getHighestLodPrepared() const { return (mLodManager) ? mLodManager->getHighestLodPrepared() : -1; };
1892  int getHighestLodLoaded() const { return (mLodManager) ? mLodManager->getHighestLodLoaded() : -1; };
1893  int getTargetLodLevel() const { return (mLodManager) ? mLodManager->getTargetLodLevel() : -1; };
1894  };
1895 
1896 
1906  class _OgreTerrainExport TerrainGlobalOptions : public TerrainAlloc, public Singleton<TerrainGlobalOptions>
1907  {
1908  protected:
1909 
1929 
1930  public:
1933 
1934 
1938  Real getSkirtSize() const { return mSkirtSize; }
1944  void setSkirtSize(Real skirtSz) { mSkirtSize = skirtSz; }
1946  const Vector3& getLightMapDirection() const { return mLightMapDir; }
1948  void setLightMapDirection(const Vector3& v) { mLightMapDir = v; }
1950  const ColourValue& getCompositeMapAmbient() const { return mCompositeMapAmbient; }
1952  void setCompositeMapAmbient(const ColourValue& c) { mCompositeMapAmbient = c; }
1954  const ColourValue& getCompositeMapDiffuse() const { return mCompositeMapDiffuse; }
1956  void setCompositeMapDiffuse(const ColourValue& c) { mCompositeMapDiffuse = c; }
1958  Real getCompositeMapDistance() const { return mCompositeMapDistance; }
1960  void setCompositeMapDistance(Real c) { mCompositeMapDistance = c; }
1961 
1962 
1966  bool getCastsDynamicShadows() const { return mCastsShadows; }
1967 
1973  void setCastsDynamicShadows(bool s) { mCastsShadows = s; }
1974 
1976  Real getMaxPixelError() const { return mMaxPixelError; }
1977 
1983  void setMaxPixelError(Real pixerr) { mMaxPixelError = pixerr; }
1984 
1986  uint8 getRenderQueueGroup(void) const { return mRenderQueueGroup; }
1991  void setRenderQueueGroup(uint8 grp) { mRenderQueueGroup = grp; }
1992 
1994  uint32 getVisibilityFlags(void) const { return mVisibilityFlags; }
1999  void setVisibilityFlags(uint32 flags) { mVisibilityFlags = flags; }
2000 
2005  void setQueryFlags(uint32 flags) { mQueryFlags = flags; }
2008  uint32 getQueryFlags(void) const { return mQueryFlags; }
2009 
2011  void addQueryFlags(uint32 flags) { mQueryFlags |= flags; }
2012 
2013  /* As setQueryFlags, except the flags passed as parameters are removed from the existing flags on this object. */
2014  void removeQueryFlags(uint32 flags) { mQueryFlags &= ~flags; }
2015 
2020  bool getUseRayBoxDistanceCalculation() const { return mUseRayBoxDistanceCalculation; }
2021 
2033  void setUseRayBoxDistanceCalculation(bool rb) { mUseRayBoxDistanceCalculation = rb; }
2034 
2038 
2042 
2045  uint16 getLayerBlendMapSize() const { return mLayerBlendMapSize; }
2046 
2051  void setLayerBlendMapSize(uint16 sz) { mLayerBlendMapSize = sz;}
2052 
2055  Real getDefaultLayerTextureWorldSize() const { return mDefaultLayerTextureWorldSize; }
2056 
2059  void setDefaultLayerTextureWorldSize(Real sz) { mDefaultLayerTextureWorldSize = sz; }
2060 
2063  uint16 getDefaultGlobalColourMapSize() const { return mDefaultGlobalColourMapSize; }
2064 
2068  void setDefaultGlobalColourMapSize(uint16 sz) { mDefaultGlobalColourMapSize = sz;}
2069 
2070 
2073  uint16 getLightMapSize() const { return mLightmapSize; }
2074 
2077  void setLightMapSize(uint16 sz) { mLightmapSize = sz;}
2078 
2081  uint16 getCompositeMapSize() const { return mCompositeMapSize; }
2082 
2085  void setCompositeMapSize(uint16 sz) { mCompositeMapSize = sz;}
2086 
2089  void setDefaultResourceGroup(const String& grp) { mResourceGroup = grp; }
2090 
2093  const String& getDefaultResourceGroup() const { return mResourceGroup; }
2094 
2098  bool getUseVertexCompressionWhenAvailable() const { return mUseVertexCompressionWhenAvailable; }
2099 
2107  void setUseVertexCompressionWhenAvailable(bool enable) { mUseVertexCompressionWhenAvailable = enable; }
2108 
2141 
2142 
2143  };
2144 
2145 
2148 }
2149 
2150 
2151 
2152 
2153 #endif
Ogre::Terrain::ImportData::~ImportData
~ImportData()
Definition: OgreTerrain.h:488
Ogre::Terrain::getBoundingRadius
Real getBoundingRadius() const
Get the bounding radius of the entire terrain.
Ogre::Terrain::DERIVED_DATA_LIGHTMAP
static const uint8 DERIVED_DATA_LIGHTMAP
Definition: OgreTerrain.h:1189
Ogre::TerrainGlobalOptions::setVisibilityFlags
void setVisibilityFlags(uint32 flags)
Set the visbility flags that terrains will be rendered with.
Definition: OgreTerrain.h:1999
Ogre::Terrain::getDeltaBufVertexSize
size_t getDeltaBufVertexSize() const
Ogre::Terrain::createOrDestroyGPULightmap
void createOrDestroyGPULightmap()
Ogre::Terrain::getMinBatchSize
uint16 getMinBatchSize() const
Get the minimum size in vertices along one side of a batch.
Ogre::TerrainGlobalOptions::mRenderQueueGroup
uint8 mRenderQueueGroup
Definition: OgreTerrain.h:1914
Ogre::Terrain::finaliseNormals
void finaliseNormals(const Rect &rect, PixelBox *normalsBox)
Finalise the normals.
Ogre::TerrainGlobalOptions::getCompositeMapAmbient
const ColourValue & getCompositeMapAmbient() const
Get the composite map ambient light to use.
Definition: OgreTerrain.h:1950
Ogre::Terrain::DerivedDataResponse::normalMapBox
PixelBox * normalMapBox
All CPU-side data, independent of textures; to be blitted in main thread.
Definition: OgreTerrain.h:1792
Ogre::uint64
unsigned long long uint64
Definition: OgrePlatform.h:370
Ogre::Terrain::DerivedDataResponse::terrain
Terrain * terrain
Definition: OgreTerrain.h:1782
Ogre::Terrain::mQueryFlags
uint32 mQueryFlags
Definition: OgreTerrain.h:1754
Ogre::Terrain::_setNormalMapRequired
void _setNormalMapRequired(bool normalMap)
Request internal implementation options for the terrain material to use, in this case a terrain-wide ...
Ogre::Terrain::getSize
uint16 getSize() const
Get the size of the terrain in vertices along one side.
Ogre::Terrain::GpuBufferAllocator::allocateVertexBuffers
virtual void allocateVertexBuffers(Terrain *forTerrain, size_t numVertices, HardwareVertexBufferSharedPtr &destPos, HardwareVertexBufferSharedPtr &destDelta)=0
Allocate (or reuse) vertex buffers for a terrain LOD.
Ogre::Terrain::mLodMorphRequired
bool mLodMorphRequired
Definition: OgreTerrain.h:1856
Ogre::TerrainGlobalOptions::addQueryFlags
void addQueryFlags(uint32 flags)
As setQueryFlags, except the flags passed as parameters are appended to the existing flags on this ob...
Definition: OgreTerrain.h:2011
Ogre::TerrainGlobalOptions::setCompositeMapAmbient
void setCompositeMapAmbient(const ColourValue &c)
Set the composite map ambient light to use.
Definition: OgreTerrain.h:1952
Ogre::Terrain::mSkirtSize
Real mSkirtSize
Definition: OgreTerrain.h:1751
Ogre::Terrain::Terrain
Terrain(SceneManager *sm)
Constructor.
Ogre::TerrainGlobalOptions::setLayerBlendMapSize
void setLayerBlendMapSize(uint16 sz)
Sets the default size of blend maps for a new terrain.
Definition: OgreTerrain.h:2051
Ogre::Terrain::TERRAINLAYERSAMPLER_CHUNK_VERSION
static const uint16 TERRAINLAYERSAMPLER_CHUNK_VERSION
Definition: OgreTerrain.h:282
Ogre::Terrain::getPoint
void getPoint(long x, long y, float height, Vector3 *outpos) const
Get a Vector3 of the world-space point on the terrain, supplying the height data manually (can be mor...
Ogre::Terrain::msBlendTextureGenerator
static NameGenerator msBlendTextureGenerator
Definition: OgreTerrain.h:1851
Ogre::Terrain::getSceneManager
SceneManager * getSceneManager() const
Definition: OgreTerrain.h:510
Ogre::MEMCATEGORY_GEOMETRY
@ MEMCATEGORY_GEOMETRY
Geometry held in main memory.
Definition: OgreMemoryAllocatorConfig.h:164
Ogre::Terrain::mCpuColourMapStorage
uint8 * mCpuColourMapStorage
Definition: OgreTerrain.h:1832
Ogre::Terrain::getPointFromSelfOrNeighbour
void getPointFromSelfOrNeighbour(long x, long y, Vector3 *outpos) const
Get a Vector3 of the world-space point on the terrain, aligned as per options.
Ogre::Terrain::getLayerDeclaration
const TerrainLayerDeclaration & getLayerDeclaration() const
Get the declaration which describes the layers in this terrain.
Definition: OgreTerrain.h:992
Ogre::Terrain::Alignment
Alignment
The alignment of the terrain.
Definition: OgreTerrain.h:312
Ogre::WorkQueue
Interface to a general purpose request / response style background work queue.
Definition: OgreWorkQueue.h:71
Ogre::Terrain::getHeightAtWorldPosition
float getHeightAtWorldPosition(const Vector3 &pos) const
Get the height data for a given world position (projecting the point down on to the terrain).
Ogre::Terrain::TERRAIN_CHUNK_VERSION
static const uint16 TERRAIN_CHUNK_VERSION
Definition: OgreTerrain.h:275
Ogre::Terrain::getCompositeMapMaterial
const MaterialPtr & getCompositeMapMaterial() const
Get the material being used for the terrain composite map.
Ogre::Terrain::mIsLoaded
bool mIsLoaded
Definition: OgreTerrain.h:1725
Ogre::AllocatedObject
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
Definition: OgreMemoryAllocatedObject.h:59
Ogre::WorkQueue::Request
General purpose request structure.
Definition: OgreWorkQueue.h:84
Ogre::SceneManager::IlluminationRenderStage
IlluminationRenderStage
Describes the stage of rendering when performing complex illumination.
Definition: OgreSceneManager.h:174
Ogre
Definition: OgreAndroidLogListener.h:35
Ogre::Terrain::Space
Space
Enumeration of relative spaces that you might want to use to address the terrain.
Definition: OgreTerrain.h:514
Ogre::Terrain::isModified
bool isModified() const
Returns whether this terrain has been modified since it was first loaded / defined.
Definition: OgreTerrain.h:756
Ogre::Terrain::getTerrainPosition
void getTerrainPosition(Real x, Real y, Real z, Vector3 *outTSpos) const
Convert a position from world space to terrain basis space.
Ogre::Terrain::RealVector
vector< Real >::type RealVector
Definition: OgreTerrain.h:294
Ogre::Terrain::createOrDestroyGPUColourMap
void createOrDestroyGPUColourMap()
Ogre::Terrain::mDefaultGpuBufferAllocator
DefaultGpuBufferAllocator mDefaultGpuBufferAllocator
Definition: OgreTerrain.h:1874
Ogre::Terrain::mLightMapShadowsOnly
bool mLightMapShadowsOnly
Definition: OgreTerrain.h:1859
Ogre::Terrain::DerivedDataResponse::lightmapUpdateRect
Rect lightmapUpdateRect
The area of lightmap that was updated.
Definition: OgreTerrain.h:1790
Ogre::Terrain::getLayerTextureName
const String & getLayerTextureName(uint8 layerIndex, uint8 samplerIndex) const
Get the name of the texture bound to a given index within a given layer.
Ogre::SceneManager::Listener
Class that allows listening in on the various stages of SceneManager processing, so that custom behav...
Definition: OgreSceneManager.h:223
Ogre::Terrain::GpuBufferAllocator::freeVertexBuffers
virtual void freeVertexBuffers(const HardwareVertexBufferSharedPtr &posbuf, const HardwareVertexBufferSharedPtr &deltabuf)=0
Free (or return to the pool) vertex buffers for terrain.
Ogre::Terrain::DerivedDataResponse::remainingTypeMask
uint8 remainingTypeMask
Remaining types not yet processed.
Definition: OgreTerrain.h:1784
Ogre::Terrain::getLightmap
const TexturePtr & getLightmap() const
Get access to the lightmap, if enabled (as requested by the material generator)
Definition: OgreTerrain.h:1083
Ogre::Terrain::widenRectByVector
void widenRectByVector(const Vector3 &vec, const Rect &inRect, Rect &outRect)
Widen a rectangular area of terrain to take into account an extrusion vector.
Ogre::map
Definition: OgrePrerequisites.h:534
Ogre::TerrainGlobalOptions::mDefaultGlobalColourMapSize
uint16 mDefaultGlobalColourMapSize
Definition: OgreTerrain.h:1921
Ogre::Terrain::DerivedDataRequest::dirtyRect
Rect dirtyRect
Definition: OgreTerrain.h:1773
Ogre::Camera
A viewpoint from which the scene will be rendered.
Definition: OgreCamera.h:87
Ogre::Terrain::TERRAINLAYERINSTANCE_CHUNK_VERSION
static const uint16 TERRAINLAYERINSTANCE_CHUNK_VERSION
Definition: OgreTerrain.h:286
Ogre::Terrain::getTerrainPosition
void getTerrainPosition(const Vector3 &WSpos, Vector3 *outTSpos) const
Convert a position from world space to terrain basis space.
Ogre::TerrainGlobalOptions
Options class which just stores default options for the terrain.
Definition: OgreTerrain.h:1907
Ogre::Terrain::_setCompositeMapRequired
void _setCompositeMapRequired(bool compositeMap)
Request internal implementation options for the terrain material to use, in this case a terrain-wide ...
OgreSceneManager.h
Ogre::Terrain::getOppositeNeighbour
static NeighbourIndex getOppositeNeighbour(NeighbourIndex index)
Get the opposite neighbour relationship (useful for finding the neighbour index from the perspective ...
Ogre::Terrain::TERRAINGENERALINFO_CHUNK_VERSION
static const uint16 TERRAINGENERALINFO_CHUNK_VERSION
Definition: OgreTerrain.h:290
Ogre::TerrainLodManager::getHighestLodPrepared
int getHighestLodPrepared()
Definition: OgreTerrainLodManager.h:116
Ogre::TerrainGlobalOptions::setCompositeMapDistance
void setCompositeMapDistance(Real c)
Set the distance at which to start using a composite map if present.
Definition: OgreTerrain.h:1960
Ogre::Terrain::addLayer
void addLayer(uint8 index, Real worldSize=0, const StringVector *textureNames=0)
Add a new layer to this terrain at a specific index.
Ogre::Terrain::increaseLodLevel
void increaseLodLevel(bool synchronous=false)
Increase Terrain's LOD level by 1.
Ogre::Terrain::addLayer
void addLayer(Real worldSize=0, const StringVector *textureNames=0)
Add a new layer to this terrain.
Ogre::Terrain::TexturePtrList
vector< TexturePtr >::type TexturePtrList
Definition: OgreTerrain.h:1825
Ogre::Terrain::updateGeometryWithoutNotifyNeighbours
void updateGeometryWithoutNotifyNeighbours()
Performs an update on the terrain geometry based on the dirty region.
Ogre::Terrain::setGpuBufferAllocator
void setGpuBufferAllocator(GpuBufferAllocator *alloc)
Tell this instance to use the given GpuBufferAllocator.
Ogre::Terrain::checkDeclaration
void checkDeclaration()
Ogre::Terrain::checkQuadIntersection
std::pair< bool, Vector3 > checkQuadIntersection(int x, int y, const Ray &ray)
Test a single quad of the terrain for ray intersection.
Ogre::StringVector
vector< String >::type StringVector
Definition: OgreStringVector.h:45
Ogre::Terrain::convertWorldToTerrainAxes
Vector3 convertWorldToTerrainAxes(const Vector3 &inVec) const
Ogre::Terrain::mBase
Real mBase
Base position in world space, relative to mPos.
Definition: OgreTerrain.h:1744
Ogre::Terrain::readLayerInstanceList
static bool readLayerInstanceList(StreamSerialiser &ser, size_t numSamplers, Terrain::LayerInstanceList &targetlst)
Utility method to read a layer instance list from a stream.
Ogre::Terrain::mMaterialName
String mMaterialName
Definition: OgreTerrain.h:1813
Ogre::Terrain::ImportData::inputFloat
float * inputFloat
Optional list of terrainSize * terrainSize floats defining the terrain.
Definition: OgreTerrain.h:368
Ogre::Terrain::getGlobalColourMapEnabled
bool getGlobalColourMapEnabled() const
Get whether a global colour map is enabled on this terrain.
Definition: OgreTerrain.h:1417
Ogre::Terrain::getLayerUVMultiplier
Real getLayerUVMultiplier(uint8 index) const
Get the layer UV multiplier.
Ogre::Terrain::LayerInstance::textureNames
StringVector textureNames
List of texture names to import; must match with TerrainLayerDeclaration.
Definition: OgreTerrain.h:303
Ogre::Terrain::DerivedDataRequest::lightmapExtraDirtyRect
Rect lightmapExtraDirtyRect
Definition: OgreTerrain.h:1774
Ogre::Terrain::getNeighbourIndex
static NeighbourIndex getNeighbourIndex(long offsetx, long offsety)
Get the neighbour enum for a given offset in a grid (signed).
Ogre::Image
Class representing an image file.
Definition: OgreImage.h:62
Ogre::Terrain::createGPUBlendTextures
void createGPUBlendTextures()
Ogre::TerrainLayerBlendMap
Class exposing an interface to a blend map for a given layer.
Definition: OgreTerrainLayerBlendMap.h:62
_OgreTerrainExport
#define _OgreTerrainExport
Definition: OgreTerrainPrerequisites.h:58
OGRE_FREE
#define OGRE_FREE(ptr, category)
Free the memory allocated with OGRE_MALLOC or OGRE_ALLOC_T. Category is required to be restated to en...
Definition: OgreMemoryAllocatorConfig.h:430
Ogre::Terrain::getMaxLayers
uint8 getMaxLayers() const
Get the maximum number of layers supported with the current options.
Ogre::Terrain::GenerateMaterialRequest::stage
GenerateMaterialStage stage
Definition: OgreTerrain.h:1807
Ogre::Terrain::getTerrainNormalMap
TexturePtr getTerrainNormalMap() const
Get the (global) normal map texture.
Definition: OgreTerrain.h:1554
Ogre::Terrain::mDirtyDerivedDataRect
Rect mDirtyDerivedDataRect
Definition: OgreTerrain.h:1757
Ogre::Terrain::mMaterialParamsDirty
bool mMaterialParamsDirty
Definition: OgreTerrain.h:1818
Ogre::Terrain::getPoint
void getPoint(long x, long y, Vector3 *outpos) const
Get a Vector3 of the world-space point on the terrain, aligned as per options.
OGRE_DELETE
#define OGRE_DELETE
Definition: OgreMemoryAllocatorConfig.h:474
Ogre::TRect< long >
Ogre::Terrain::waitForDerivedProcesses
void waitForDerivedProcesses()
Ogre::Terrain::getGeoDataSizeAtLod
uint getGeoDataSizeAtLod(uint16 lodLevel) const
Gets the data size at a given LOD level.
Ogre::Terrain::ImportData::constantHeight
float constantHeight
If neither inputImage or inputFloat are supplied, the constant height at which the initial terrain sh...
Definition: OgreTerrain.h:373
Ogre::Terrain::freeGPUResources
void freeGPUResources()
Ogre::Terrain::getNeighbourPoint
void getNeighbourPoint(NeighbourIndex index, long x, long y, long *outx, long *outy) const
Ogre::Terrain::getBlendTextureCount
uint8 getBlendTextureCount() const
Get the number of blend textures in use.
Ogre::Terrain::updateDerivedDataImpl
void updateDerivedDataImpl(const Rect &rect, const Rect &lightmapExtraRect, bool synchronous, uint8 typeMask)
Ogre::Terrain::mVisibilityFlags
uint32 mVisibilityFlags
Definition: OgreTerrain.h:1753
Ogre::Terrain::DefaultGpuBufferAllocator::DefaultGpuBufferAllocator
DefaultGpuBufferAllocator()
Ogre::Terrain::mWorkQueueChannel
uint16 mWorkQueueChannel
Definition: OgreTerrain.h:1721
Ogre::TerrainGlobalOptions::mSkirtSize
Real mSkirtSize
Definition: OgreTerrain.h:1910
Ogre::Terrain::GenerateMaterialRequest::terrain
Terrain * terrain
Definition: OgreTerrain.h:1805
Ogre::Terrain::_dirtyCompositeMapRect
void _dirtyCompositeMapRect(const Rect &rect)
Mark a region of the terrain composite map as dirty.
Ogre::Terrain::ImportData::deleteInputData
bool deleteInputData
Whether this structure should 'own' the input data (inputImage and inputFloat), and therefore delete ...
Definition: OgreTerrain.h:382
Ogre::Terrain::GenerateMaterialStage
GenerateMaterialStage
Definition: OgreTerrain.h:1798
Ogre::Terrain::getLayerBlendMapSize
uint16 getLayerBlendMapSize() const
Get the requested size of the blend maps used to blend between layers for this terrain.
Definition: OgreTerrain.h:1073
Ogre::TerrainGlobalOptions::getCastsDynamicShadows
bool getCastsDynamicShadows() const
Whether the terrain will be able to cast shadows (texture shadows only are supported,...
Definition: OgreTerrain.h:1966
Ogre::Terrain
The main containing class for a chunk of terrain.
Definition: OgreTerrain.h:264
Ogre::TerrainLodManager
Terrain LOD data manager.
Definition: OgreTerrainLodManager.h:53
Ogre::Terrain::canHandleRequest
bool canHandleRequest(const WorkQueue::Request *req, const WorkQueue *srcQ)
WorkQueue::RequestHandler override.
Ogre::uint16
unsigned short uint16
Definition: OgrePlatform.h:360
Ogre::TerrainGlobalOptions::removeQueryFlags
void removeQueryFlags(uint32 flags)
Definition: OgreTerrain.h:2014
Ogre::Terrain::_getNumIndexesForBatchSize
static size_t _getNumIndexesForBatchSize(uint16 batchSize)
Utility method to get the number of indexes required to render a given batch.
Ogre::Terrain::getLODLevelWhenVertexEliminated
uint16 getLODLevelWhenVertexEliminated(long rowOrColulmn) const
Utility method, get the first LOD Level at which this vertex is no longer included.
Ogre::Terrain::mLayerUVMultiplier
RealVector mLayerUVMultiplier
Definition: OgreTerrain.h:1749
Ogre::TerrainGlobalOptions::mLightmapSize
uint16 mLightmapSize
Definition: OgreTerrain.h:1922
Ogre::Terrain::DerivedDataRequest::operator<<
_OgreTerrainExport friend std::ostream & operator<<(std::ostream &o, const DerivedDataRequest &r)
Definition: OgreTerrain.h:1775
Ogre::Terrain::DERIVED_DATA_NORMALS
static const uint8 DERIVED_DATA_NORMALS
Definition: OgreTerrain.h:1188
Ogre::WorkQueue::Response
General purpose response structure.
Definition: OgreWorkQueue.h:123
Ogre::TerrainGlobalOptions::mCompositeMapDistance
Real mCompositeMapDistance
Definition: OgreTerrain.h:1926
Ogre::Terrain::removeFromNeighbours
void removeFromNeighbours()
Removes this terrain instance from neighbouring terrain's list of neighbours.
Ogre::HardwareIndexBufferSharedPtr
Shared pointer implementation used to share index buffers.
Definition: OgreHardwareIndexBuffer.h:80
Ogre::Terrain::rayIntersects
std::pair< bool, Vector3 > rayIntersects(const Ray &ray, bool cascadeToNeighbours=false, Real distanceLimit=0)
Test for intersection of a given ray with the terrain.
Ogre::TerrainGlobalOptions::setDefaultResourceGroup
void setDefaultResourceGroup(const String &grp)
Set the default resource group to use to load / save terrains.
Definition: OgreTerrain.h:2089
Ogre::Terrain::unload
void unload()
Unload the terrain and free GPU resources.
Ogre::TerrainGlobalOptions::mCompositeMapDiffuse
ColourValue mCompositeMapDiffuse
Definition: OgreTerrain.h:1925
Ogre::Terrain::save
void save(const String &filename)
Save terrain data in native form to a standalone file.
Ogre::Terrain::_calcSkirtVertexIndex
static uint16 _calcSkirtVertexIndex(uint16 mainIndex, uint16 vdatasize, bool isCol, uint16 numSkirtRowsCols, uint16 skirtRowColSkip)
Utility method to calculate the skirt index for a given original vertex index.
Ogre::TerrainLayerDeclaration
The definition of the information each layer will contain in this terrain.
Definition: OgreTerrainMaterialGenerator.h:132
Ogre::uint32
unsigned int uint32
Definition: OgrePlatform.h:359
Ogre::Terrain::mTreeDepth
uint16 mTreeDepth
Definition: OgreTerrain.h:1742
Ogre::Terrain::ImportData::inputScale
Real inputScale
How to scale the input values provided (if any)
Definition: OgreTerrain.h:385
Ogre::Terrain::mMaxBatchSize
uint16 mMaxBatchSize
Definition: OgreTerrain.h:1736
Ogre::Terrain::_getUseVertexCompression
bool _getUseVertexCompression() const
Whether we're using vertex compression or not.
Ogre::Terrain::copyGlobalOptions
void copyGlobalOptions()
Ogre::Terrain::mTerrainNormalMap
TexturePtr mTerrainNormalMap
Texture storing normals for the whole terrrain.
Definition: OgreTerrain.h:1862
Ogre::TerrainGlobalOptions::setRenderQueueGroup
void setRenderQueueGroup(uint8 grp)
Set the render queue group that terrains will be rendered into.
Definition: OgreTerrain.h:1991
Ogre::TerrainGlobalOptions::getSingleton
static TerrainGlobalOptions & getSingleton(void)
Override standard Singleton retrieval.
Ogre::TerrainGlobalOptions::~TerrainGlobalOptions
virtual ~TerrainGlobalOptions()
Definition: OgreTerrain.h:1932
OGRE_ALLOC_T
#define OGRE_ALLOC_T(T, count, category)
Allocate a block of memory for a primitive type, and indicate the category of usage.
Definition: OgreMemoryAllocatorConfig.h:428
Ogre::Terrain::DefaultGpuBufferAllocator::VBufList
list< HardwareVertexBufferSharedPtr >::type VBufList
Definition: OgreTerrain.h:591
Ogre::String
_StringBase String
Definition: OgrePrerequisites.h:439
Ogre::TerrainGlobalOptions::setDefaultMaterialGenerator
void setDefaultMaterialGenerator(TerrainMaterialGeneratorPtr gen)
Set the default material generator.
Ogre::Terrain::TERRAINLAYERDECLARATION_CHUNK_ID
static const uint32 TERRAINLAYERDECLARATION_CHUNK_ID
Definition: OgreTerrain.h:279
Ogre::Terrain::isHeightDataModified
bool isHeightDataModified() const
Returns whether terrain heights have been modified since the terrain was first loaded / defined.
Definition: OgreTerrain.h:763
Ogre::Terrain::DerivedDataResponse::lightMapBox
PixelBox * lightMapBox
Definition: OgreTerrain.h:1793
Ogre::Terrain::DERIVED_DATA_ALL
static const uint8 DERIVED_DATA_ALL
Definition: OgreTerrain.h:1190
Ogre::Terrain::TERRAINLAYERSAMPLERELEMENT_CHUNK_ID
static const uint32 TERRAINLAYERSAMPLERELEMENT_CHUNK_ID
Definition: OgreTerrain.h:283
Ogre::Terrain::_getMaterial
const MaterialPtr & _getMaterial() const
Internal getting of material.
Definition: OgreTerrain.h:1327
Ogre::TerrainGlobalOptions::mUseVertexCompressionWhenAvailable
bool mUseVertexCompressionWhenAvailable
Definition: OgreTerrain.h:1928
Ogre::Terrain::mDerivedDataUpdateInProgress
bool mDerivedDataUpdateInProgress
Definition: OgreTerrain.h:1760
Ogre::Terrain::getNeighbour
Terrain * getNeighbour(NeighbourIndex index) const
Retrieve the terrain's neighbour, or null if not present.
Ogre::Terrain::setWorldSize
void setWorldSize(Real newWorldSize)
Set the world size of terrain.
Ogre::TerrainLodManager::getTargetLodLevel
int getTargetLodLevel()
Definition: OgreTerrainLodManager.h:118
Ogre::Terrain::writeLayerInstanceList
static void writeLayerInstanceList(const Terrain::LayerInstanceList &lst, StreamSerialiser &ser)
Utility method to write a layer instance list to a stream.
Ogre::Terrain::dirtyRect
void dirtyRect(const Rect &rect)
Mark a region of the terrain as dirty.
Ogre::Terrain::distributeVertexData
void distributeVertexData()
Ogre::Terrain::mDirtyLightmapFromNeighboursRect
Rect mDirtyLightmapFromNeighboursRect
Definition: OgreTerrain.h:1759
Ogre::Terrain::ImportData::operator=
ImportData & operator=(const ImportData &rhs)
Definition: OgreTerrain.h:434
Ogre::Terrain::decreaseLodLevel
void decreaseLodLevel()
Removes highest LOD level loaded.
Ogre::TerrainGlobalOptions::getCompositeMapDistance
Real getCompositeMapDistance() const
Get the distance at which to start using a composite map if present.
Definition: OgreTerrain.h:1958
Ogre::Terrain::mBlendTextureList
TexturePtrList mBlendTextureList
Definition: OgreTerrain.h:1826
Ogre::Terrain::GpuBufferAllocator::~GpuBufferAllocator
virtual ~GpuBufferAllocator()
Definition: OgreTerrain.h:537
Ogre::Terrain::checkLayers
void checkLayers(bool includeGPUResources)
Ogre::Terrain::createOrDestroyGPUNormalMap
void createOrDestroyGPUNormalMap()
Ogre::Terrain::finaliseHeightDeltas
void finaliseHeightDeltas(const Rect &rect, bool cpuData)
Finalise the height deltas.
OgreTerrainPrerequisites.h
Ogre::Terrain::mCustomGpuBufferAllocator
GpuBufferAllocator * mCustomGpuBufferAllocator
Definition: OgreTerrain.h:1873
Ogre::Terrain::getVector
void getVector(const Vector3 &inVec, Vector3 *outVec) const
Translate a vector into world space based on the alignment options.
Ogre::Terrain::DerivedDataResponse::operator<<
_OgreTerrainExport friend std::ostream & operator<<(std::ostream &o, const DerivedDataResponse &r)
Definition: OgreTerrain.h:1794
Ogre::SceneNode
Class representing a node in the scene graph.
Definition: OgreSceneNode.h:59
Ogre::Terrain::mScale
Real mScale
Relationship between one point on the terrain and world size.
Definition: OgreTerrain.h:1746
Ogre::Terrain::shiftUpGPUBlendChannels
void shiftUpGPUBlendChannels(uint8 index)
Shift/slide all GPU blend texture channels > index up one slot. Blend data may shift into the next te...
Ogre::Terrain::mCompositeMapSize
uint16 mCompositeMapSize
Definition: OgreTerrain.h:1839
Ogre::Terrain::mLayerDecl
TerrainLayerDeclaration mLayerDecl
Definition: OgreTerrain.h:1747
Ogre::Terrain::getHeightData
float * getHeightData(long x, long y) const
Get a pointer to the height data for a given point.
Ogre::Terrain::GpuBufferAllocator::freeAllBuffers
virtual void freeAllBuffers()=0
Free any buffers we're holding.
Ogre::Terrain::ImportData::terrainAlign
Alignment terrainAlign
The alignment of the terrain.
Definition: OgreTerrain.h:327
Ogre::Terrain::getHeightAtWorldPosition
float getHeightAtWorldPosition(Real x, Real y, Real z) const
Get the height data for a given world position (projecting the point down on to the terrain).
Ogre::Terrain::mResourceGroup
String mResourceGroup
Definition: OgreTerrain.h:1724
Ogre::TerrainLayerBlendMapList
vector< TerrainLayerBlendMap * >::type TerrainLayerBlendMapList
Definition: OgreTerrainLayerBlendMap.h:189
Ogre::Terrain::getTerrainVectorAlign
void getTerrainVectorAlign(Real x, Real y, Real z, Alignment align, Vector3 *outVec) const
Translate a vector from world space to local terrain space based on a specified alignment.
Ogre::Terrain::getLayerBlendMap
TerrainLayerBlendMap * getLayerBlendMap(uint8 layerIndex)
Retrieve the layer blending map for a given layer, which may be used to edit the blending information...
Ogre::Terrain::ImportData::terrainSize
uint16 terrainSize
Terrain size (along one edge) in vertices; must be 2^n+1.
Definition: OgreTerrain.h:329
Ogre::Terrain::getTerrainVectorAlign
void getTerrainVectorAlign(const Vector3 &inVec, Alignment align, Vector3 *outVec) const
Translate a vector from world space to local terrain space based on a specified alignment.
Ogre::Terrain::updateCompositeMapWithDelay
void updateCompositeMapWithDelay(Real delay=2)
Performs an update on the terrain composite map based on its dirty region, but only at a maximum freq...
Ogre::Terrain::getPositionBufVertexSize
size_t getPositionBufVertexSize() const
Ogre::Terrain::_setLightMapRequired
void _setLightMapRequired(bool lightMap, bool shadowsOnly=false)
Request internal implementation options for the terrain material to use, in this case a terrain-wide ...
Ogre::TerrainQuadTreeNode
A node in a quad tree used to store a patch of terrain.
Definition: OgreTerrainQuadTreeNode.h:86
Ogre::Terrain::setQueryFlags
void setQueryFlags(uint32 flags)
Set the query flags for this terrain.
Definition: OgreTerrain.h:1361
Ogre::Terrain::mLayers
LayerInstanceList mLayers
Definition: OgreTerrain.h:1748
Ogre::Terrain::getSkirtSize
Real getSkirtSize() const
The default size of 'skirts' used to hide terrain cracks (default 10, set for new Terrain using Terra...
Definition: OgreTerrain.h:1234
Ogre::Terrain::getDeltaData
const float * getDeltaData(long x, long y) const
Get a pointer to the delta data for a given point.
Ogre::Terrain::calculateLightmap
PixelBox * calculateLightmap(const Rect &rect, const Rect &extraTargetRect, Rect &outFinalRect)
Calculate (or recalculate) the terrain lightmap.
Ogre::TerrainGlobalOptions::getCompositeMapDiffuse
const ColourValue & getCompositeMapDiffuse() const
Get the composite map iffuse light to use.
Definition: OgreTerrain.h:1954
Ogre::Terrain::readLayerDeclaration
static bool readLayerDeclaration(StreamSerialiser &ser, TerrainLayerDeclaration &targetdecl)
Utility method to read a layer declaration from a stream.
Ogre::Terrain::ImportData::ImportData
ImportData()
Definition: OgreTerrain.h:400
Ogre::Terrain::DefaultGpuBufferAllocator::hashIndexBuffer
uint32 hashIndexBuffer(uint16 batchSize, uint16 vdatasize, size_t vertexIncrement, uint16 xoffset, uint16 yoffset, uint16 numSkirtRowsCols, uint16 skirtRowColSkip)
Ogre::Terrain::getPosition
void getPosition(Real x, Real y, Real z, Vector3 *outWSpos) const
Convert a position from terrain basis space to world space.
Ogre::Terrain::mLightMapRequired
bool mLightMapRequired
Definition: OgreTerrain.h:1858
Ogre::Terrain::BytePointerList
vector< uint8 * >::type BytePointerList
Definition: OgreTerrain.h:1822
Ogre::Terrain::DefaultGpuBufferAllocator::warmStart
void warmStart(size_t numInstances, uint16 terrainSize, uint16 maxBatchSize, uint16 minBatchSize)
'Warm start' the allocator based on needing x instances of terrain with the given configuration.
Ogre::Terrain::OGRE_RW_MUTEX
OGRE_RW_MUTEX(mNeighbourMutex)
Ogre::Terrain::getNumLodLevels
uint16 getNumLodLevels() const
Get the total number of LOD levels in the terrain.
Definition: OgreTerrain.h:1237
Ogre::TerrainGlobalOptions::mVisibilityFlags
uint32 mVisibilityFlags
Definition: OgreTerrain.h:1915
Ogre::Terrain::mLayerBlendMapSizeActual
uint16 mLayerBlendMapSizeActual
Definition: OgreTerrain.h:1821
Ogre::Terrain::mCompositeMap
TexturePtr mCompositeMap
Definition: OgreTerrain.h:1841
Ogre::Terrain::LOD_MORPH_CUSTOM_PARAM
static const size_t LOD_MORPH_CUSTOM_PARAM
Definition: OgreTerrain.h:292
Ogre::Terrain::mLastMillis
unsigned long mLastMillis
Definition: OgreTerrain.h:1845
Ogre::Matrix4
Class encapsulating a standard 4x4 homogeneous matrix.
Definition: OgreMatrix4.h:79
Ogre::Terrain::getPositionAlign
void getPositionAlign(const Vector3 &TSpos, Alignment align, Vector3 *outWSpos) const
Convert a position from terrain basis space to world space based on a specified alignment.
Ogre::list
Definition: OgrePrerequisites.h:506
Ogre::Terrain::updateBaseScale
void updateBaseScale()
Ogre::NameGenerator
Utility class to generate a sequentially numbered series of names.
Definition: OgreNameGenerator.h:57
Ogre::PixelFormat
PixelFormat
The pixel format used for images, textures, and render surfaces.
Definition: OgrePixelFormat.h:44
Ogre::Terrain::getHighestLodLoaded
int getHighestLodLoaded() const
Definition: OgreTerrain.h:1892
Ogre::Terrain::setVisibilityFlags
void setVisibilityFlags(uint32 flags)
Set the visibility flags for this terrain.
Definition: OgreTerrain.h:1354
Ogre::Terrain::convertDirection
void convertDirection(Space inSpace, const Vector3 &inDir, Space outSpace, Vector3 &outDir) const
Convert a direction from one space to another with respect to this terrain.
Ogre::SceneManager
Manages the organisation and rendering of a 'scene' i.e.
Definition: OgreSceneManager.h:144
Ogre::Terrain::DefaultGpuBufferAllocator::mSharedIBufMap
IBufMap mSharedIBufMap
Definition: OgreTerrain.h:595
Ogre::Terrain::getQueryFlags
uint32 getQueryFlags(void) const
Get the query flags for this terrain.
Definition: OgreTerrain.h:1357
Ogre::Terrain::deriveUVMultipliers
void deriveUVMultipliers()
Ogre::TerrainGlobalOptions::mResourceGroup
String mResourceGroup
Definition: OgreTerrain.h:1927
Ogre::Terrain::createLayerBlendMaps
void createLayerBlendMaps()
Ogre::Viewport
An abstraction of a viewport, i.e.
Definition: OgreViewport.h:58
Ogre::Terrain::LayerInstance::LayerInstance
LayerInstance()
Definition: OgreTerrain.h:305
Ogre::WorkQueue::ResponseHandler
Interface definition for a handler of responses.
Definition: OgreWorkQueue.h:197
Ogre::Terrain::TERRAIN_GENERATE_MATERIAL_INTERVAL_MS
static const uint64 TERRAIN_GENERATE_MATERIAL_INTERVAL_MS
Definition: OgreTerrain.h:277
Ogre::HardwareVertexBufferSharedPtr
Shared pointer implementation used to share vertex buffers.
Definition: OgreHardwareVertexBuffer.h:87
Ogre::Terrain::freeTemporaryResources
void freeTemporaryResources()
Free as many resources as possible for optimal run-time memory use.
Ogre::Terrain::DefaultGpuBufferAllocator::getSharedIndexBuffer
HardwareIndexBufferSharedPtr getSharedIndexBuffer(uint16 batchSize, uint16 vdatasize, size_t vertexIncrement, uint16 xoffset, uint16 yoffset, uint16 numSkirtRowsCols, uint16 skirtRowColSkip)
Get a shared index buffer for a given number of settings.
Ogre::Terrain::GpuBufferAllocator
Interface used to by the Terrain instance to allocate GPU buffers.
Definition: OgreTerrain.h:534
Ogre::Terrain::getCompositeMap
const TexturePtr & getCompositeMap() const
Get access to the composite map, if enabled (as requested by the material generator)
Definition: OgreTerrain.h:1093
Ogre::Terrain::getHeightAtPoint
float getHeightAtPoint(long x, long y) const
Get the height data for a given terrain point.
Ogre::Terrain::GenerateMaterialRequest::operator<<
_OgreTerrainExport friend std::ostream & operator<<(std::ostream &o, const GenerateMaterialRequest &r)
Definition: OgreTerrain.h:1809
Ogre::Terrain::setSize
void setSize(uint16 newSize)
Set the size of terrain in vertices along one side.
Ogre::Terrain::writeLayerDeclaration
static void writeLayerDeclaration(const TerrainLayerDeclaration &decl, StreamSerialiser &ser)
Utility method to write a layer declaration to a stream.
Ogre::Terrain::_setMorphRequired
void _setMorphRequired(bool morph)
Request internal implementation options for the terrain material to use, in this case vertex morphing...
Definition: OgreTerrain.h:1475
Ogre::Terrain::getLayerCount
uint8 getLayerCount() const
Get the number of layers in this terrain.
Definition: OgreTerrain.h:989
Ogre::Terrain::GenerateMaterialRequest::synchronous
bool synchronous
Definition: OgreTerrain.h:1808
Ogre::Terrain::DERIVED_DATA_DELTAS
static const uint8 DERIVED_DATA_DELTAS
Definition: OgreTerrain.h:1187
Ogre::Terrain::getTerrainPositionAlign
void getTerrainPositionAlign(const Vector3 &WSpos, Alignment align, Vector3 *outTSpos) const
Convert a position from world space to terrain basis space based on a specified alignment.
Ogre::Terrain::mLastLODCamera
const Camera * mLastLODCamera
Definition: OgreTerrain.h:1867
Ogre::Terrain::DefaultGpuBufferAllocator::IBufMap
map< uint32, HardwareIndexBufferSharedPtr >::type IBufMap
Definition: OgreTerrain.h:594
Ogre::Terrain::TERRAINLAYERINSTANCE_CHUNK_ID
static const uint32 TERRAINLAYERINSTANCE_CHUNK_ID
Definition: OgreTerrain.h:285
Ogre::Terrain::TERRAINLAYERDECLARATION_CHUNK_VERSION
static const uint16 TERRAINLAYERDECLARATION_CHUNK_VERSION
Definition: OgreTerrain.h:280
Ogre::Terrain::getPositiveLodLevel
int getPositiveLodLevel(int lodLevel) const
Get the real lod level.
Definition: OgreTerrain.h:1657
Ogre::Terrain::mSceneMgr
SceneManager * mSceneMgr
Definition: OgreTerrain.h:1722
Ogre::Terrain::mPos
Vector3 mPos
Definition: OgreTerrain.h:1738
Ogre::Terrain::getVisibilityFlags
uint32 getVisibilityFlags(void) const
Get the visibility flags for this terrain.
Definition: OgreTerrain.h:1350
Ogre::Terrain::preFindVisibleObjects
void preFindVisibleObjects(SceneManager *source, SceneManager::IlluminationRenderStage irs, Viewport *v)
Overridden from SceneManager::Listener.
OgreTerrainLodManager.h
Ogre::Terrain::getNeighbourEdgeRect
void getNeighbourEdgeRect(NeighbourIndex index, const Rect &inRect, Rect *outRect) const
Ogre::TerrainGlobalOptions::getDefaultGlobalColourMapSize
uint16 getDefaultGlobalColourMapSize() const
Get the default size of the terrain global colour map for a new terrain.
Definition: OgreTerrain.h:2063
Ogre::Singleton
Template class for creating single-instance global classes.
Definition: OgreSingleton.h:65
Ogre::Terrain::updateGeometry
void updateGeometry()
Performs an update on the terrain geometry based on the dirty region.
Ogre::Terrain::DefaultGpuBufferAllocator::~DefaultGpuBufferAllocator
virtual ~DefaultGpuBufferAllocator()
Ogre::TerrainGlobalOptions::getMaxPixelError
Real getMaxPixelError() const
Get the maximum screen pixel error that should be allowed when rendering.
Definition: OgreTerrain.h:1976
Ogre::TerrainGlobalOptions::setDefaultGlobalColourMapSize
void setDefaultGlobalColourMapSize(uint16 sz)
Set the default size of the terrain global colour map for a new terrain.
Definition: OgreTerrain.h:2068
Ogre::Terrain::prepare
bool prepare(StreamSerialiser &stream)
Prepare terrain data from saved data.
Ogre::Terrain::ImportData::worldSize
Real worldSize
The world size of the terrain.
Definition: OgreTerrain.h:355
Ogre::Terrain::load
void load(const String &filename)
Prepare and load the terrain in one simple call from a standalone file.
Ogre::Terrain::TERRAINGENERALINFO_CHUNK_ID
static const uint32 TERRAINGENERALINFO_CHUNK_ID
Definition: OgreTerrain.h:289
Ogre::Terrain::mCpuLightmapStorage
uint8 * mCpuLightmapStorage
Definition: OgreTerrain.h:1837
Ogre::TerrainGlobalOptions::setUseVertexCompressionWhenAvailable
void setUseVertexCompressionWhenAvailable(bool enable)
Set whether to allow vertex compression to be used when the material generator states that it support...
Definition: OgreTerrain.h:2107
Ogre::Terrain::mCompositeMapDirtyRectLightmapUpdate
bool mCompositeMapDirtyRectLightmapUpdate
True if the updates included lightmap changes (widen)
Definition: OgreTerrain.h:1847
Ogre::TerrainGlobalOptions::mLightMapDir
Vector3 mLightMapDir
Definition: OgreTerrain.h:1911
Ogre::Terrain::mLayerBlendMapList
TerrainLayerBlendMapList mLayerBlendMapList
Definition: OgreTerrain.h:1827
Ogre::Terrain::DefaultGpuBufferAllocator
Standard implementation of a buffer allocator which re-uses buffers.
Definition: OgreTerrain.h:573
Ogre::TerrainGlobalOptions::setCastsDynamicShadows
void setCastsDynamicShadows(bool s)
Whether the terrain will be able to cast shadows (texture shadows only are supported,...
Definition: OgreTerrain.h:1973
Ogre::Terrain::TERRAINLAYERSAMPLERELEMENT_CHUNK_VERSION
static const uint16 TERRAINLAYERSAMPLERELEMENT_CHUNK_VERSION
Definition: OgreTerrain.h:284
Ogre::Terrain::setRenderQueueGroup
void setRenderQueueGroup(uint8 grp)
Set the render queue group that this terrain will be rendered into.
Definition: OgreTerrain.h:1347
Ogre::Terrain::ImportData::pos
Vector3 pos
Position of the terrain.
Definition: OgreTerrain.h:352
Ogre::Terrain::getPointAlign
void getPointAlign(long x, long y, Alignment align, Vector3 *outpos) const
Get a Vector3 of the world-space point on the terrain, aligned Y-up always.
Ogre::Terrain::mCpuTerrainNormalMap
PixelBox * mCpuTerrainNormalMap
Pending data.
Definition: OgreTerrain.h:1865
Ogre::Terrain::getTerrainVector
void getTerrainVector(Real x, Real y, Real z, Vector3 *outVec) const
Translate a vector from world space to local terrain space based on the alignment options.
Ogre::TerrainGlobalOptions::getUseVertexCompressionWhenAvailable
bool getUseVertexCompressionWhenAvailable() const
Get whether to allow vertex compression to be used when the material generator states that it support...
Definition: OgreTerrain.h:2098
Ogre::Terrain::mGlobalColourMapSize
uint16 mGlobalColourMapSize
Definition: OgreTerrain.h:1829
Ogre::Terrain::convertDirection
Vector3 convertDirection(Space inSpace, const Vector3 &inDir, Space outSpace) const
Convert a direction from one space to another with respect to this terrain.
Ogre::Terrain::unprepare
void unprepare()
Free CPU resources created during prepare methods.
Ogre::Terrain::mCpuBlendMapStorage
BytePointerList mCpuBlendMapStorage
Staging post for blend map data.
Definition: OgreTerrain.h:1824
Ogre::AxisAlignedBox
A 3D box aligned with the x/y/z axes.
Definition: OgreAxisAlignedBox.h:55
Ogre::Terrain::mNumLodLevelsPerLeafNode
uint16 mNumLodLevelsPerLeafNode
Definition: OgreTerrain.h:1741
Ogre::TerrainGlobalOptions::getLightMapDirection
const Vector3 & getLightMapDirection() const
Get the shadow map light direction to use (world space)
Definition: OgreTerrain.h:1946
OgreCommon.h
Ogre::Terrain::save
void save(StreamSerialiser &stream)
Save terrain data in native form to a serializing stream.
Ogre::Terrain::mSize
uint16 mSize
Definition: OgreTerrain.h:1735
OgreTerrainMaterialGenerator.h
Ogre::TerrainGlobalOptions::getVisibilityFlags
uint32 getVisibilityFlags(void) const
Get the visbility flags that terrains will be rendered with.
Definition: OgreTerrain.h:1994
Ogre::Terrain::GpuBufferAllocator::getSharedIndexBuffer
virtual HardwareIndexBufferSharedPtr getSharedIndexBuffer(uint16 batchSize, uint16 vdatasize, size_t vertexIncrement, uint16 xoffset, uint16 yoffset, uint16 numSkirtRowsCols, uint16 skirtRowColSkip)=0
Get a shared index buffer for a given number of settings.
Ogre::Terrain::mMaterial
MaterialPtr mMaterial
Definition: OgreTerrain.h:1814
Ogre::Terrain::TERRAINDERIVEDDATA_CHUNK_VERSION
static const uint16 TERRAINDERIVEDDATA_CHUNK_VERSION
Definition: OgreTerrain.h:288
Ogre::Terrain::calculateHeightDeltas
Rect calculateHeightDeltas(const Rect &rect)
Calculate (or recalculate) the delta values of heights between a vertex in its recorded position,...
Ogre::Terrain::mDirtyGeometryRectForNeighbours
Rect mDirtyGeometryRectForNeighbours
Definition: OgreTerrain.h:1758
Ogre::Terrain::mLodManager
TerrainLodManager * mLodManager
Definition: OgreTerrain.h:1879
Ogre::Terrain::TERRAIN_MAX_BATCH_SIZE
static const uint16 TERRAIN_MAX_BATCH_SIZE
Definition: OgreTerrain.h:276
Ogre::Terrain::getEdgeRect
void getEdgeRect(NeighbourIndex index, long range, Rect *outRect) const
Ogre::Terrain::prepare
bool prepare(const String &filename)
Prepare the terrain from a standalone file.
Ogre::Terrain::handleResponse
void handleResponse(const WorkQueue::Response *res, const WorkQueue *srcQ)
WorkQueue::ResponseHandler override.
Ogre::Terrain::isDerivedDataUpdateInProgress
bool isDerivedDataUpdateInProgress() const
Query whether a derived data update is in progress or not.
Definition: OgreTerrain.h:1626
Ogre::Terrain::dirtyLightmapRect
void dirtyLightmapRect(const Rect &rect)
Mark a region of the lightmap as dirty.
Ogre::Terrain::ImportData::inputBias
Real inputBias
How to bias the input values provided (if any)
Definition: OgreTerrain.h:387
Ogre::TerrainGlobalOptions::getLightMapSize
uint16 getLightMapSize() const
Get the default size of the lightmaps for a new terrain.
Definition: OgreTerrain.h:2073
Ogre::Terrain::widenRectByVector
void widenRectByVector(const Vector3 &vec, const Rect &inRect, Real minHeight, Real maxHeight, Rect &outRect)
Widen a rectangular area of terrain to take into account an extrusion vector, but specify the min / m...
Ogre::Terrain::setHeightAtPoint
void setHeightAtPoint(long x, long y, float h)
Set the height data for a given terrain point.
Ogre::Terrain::createOrDestroyGPUCompositeMap
void createOrDestroyGPUCompositeMap()
Ogre::Terrain::mPrepareInProgress
bool mPrepareInProgress
Don't release Height/DeltaData when preparing.
Definition: OgreTerrain.h:1766
Ogre::Terrain::mLightmap
TexturePtr mLightmap
Definition: OgreTerrain.h:1836
Ogre::Terrain::mCompositeMapUpdateCountdown
unsigned long mCompositeMapUpdateCountdown
Definition: OgreTerrain.h:1844
Ogre::Terrain::mDeltaData
float * mDeltaData
The delta information defining how a vertex moves before it is removed at a lower LOD.
Definition: OgreTerrain.h:1732
Ogre::Terrain::notifyNeighbours
void notifyNeighbours()
Tell this instance to notify all neighbours that will be affected by a height change that has taken p...
Ogre::Terrain::getMaxHeight
Real getMaxHeight() const
Get the maximum height of the terrain.
Ogre::Terrain::WORKQUEUE_DERIVED_DATA_REQUEST
static const uint16 WORKQUEUE_DERIVED_DATA_REQUEST
Definition: OgreTerrain.h:1541
Ogre::SharedPtr< DataStream >
Ogre::TerrainGlobalOptions::setMaxPixelError
void setMaxPixelError(Real pixerr)
Set the maximum screen pixel error that should be allowed when rendering.
Definition: OgreTerrain.h:1983
Ogre::TerrainGlobalOptions::mCastsShadows
bool mCastsShadows
Definition: OgreTerrain.h:1912
Ogre::Terrain::DefaultGpuBufferAllocator::freeAllBuffers
void freeAllBuffers()
Free any buffers we're holding.
Ogre::Terrain::getBlendTextureName
const String & getBlendTextureName(uint8 textureIndex) const
Get the name of the packed blend texture at a specific index.
Ogre::Terrain::getVector
void getVector(Real x, Real y, Real z, Vector3 *outVec) const
Translate a vector into world space based on the alignment options.
Ogre::uint8
unsigned char uint8
Definition: OgrePlatform.h:361
Ogre::Terrain::freeCPUResources
void freeCPUResources()
Ogre::Terrain::mCompositeMapRequired
bool mCompositeMapRequired
Definition: OgreTerrain.h:1860
Ogre::TerrainGlobalOptions::getDefaultResourceGroup
const String & getDefaultResourceGroup() const
Get the default resource group to use to load / save terrains.
Definition: OgreTerrain.h:2093
Ogre::Terrain::sceneManagerDestroyed
void sceneManagerDestroyed(SceneManager *source)
Overridden from SceneManager::Listener.
Ogre::Terrain::mLastViewportHeight
int mLastViewportHeight
Definition: OgreTerrain.h:1869
Ogre::TerrainLodManager::getHighestLodLoaded
int getHighestLodLoaded()
Definition: OgreTerrainLodManager.h:117
Ogre::Terrain::GpuBufferAllocator::GpuBufferAllocator
GpuBufferAllocator()
Definition: OgreTerrain.h:536
Ogre::TerrainGlobalOptions::getSkirtSize
Real getSkirtSize() const
The default size of 'skirts' used to hide terrain cracks (default 10)
Definition: OgreTerrain.h:1938
Ogre::Terrain::getMaterialName
const String & getMaterialName() const
Get the name of the material being used for the terrain.
Definition: OgreTerrain.h:1334
Ogre::Terrain::DefaultGpuBufferAllocator::allocateVertexBuffers
void allocateVertexBuffers(Terrain *forTerrain, size_t numVertices, HardwareVertexBufferSharedPtr &destPos, HardwareVertexBufferSharedPtr &destDelta)
Allocate (or reuse) vertex buffers for a terrain LOD.
Ogre::Terrain::getGlobalColourMap
const TexturePtr & getGlobalColourMap() const
Get access to the global colour map, if enabled.
Definition: OgreTerrain.h:1421
Ogre::StreamSerialiser
Utility class providing helper methods for reading / writing structured data held in a DataStream.
Definition: OgreStreamSerialiser.h:67
Ogre::Terrain::getVectorAlign
void getVectorAlign(const Vector3 &inVec, Alignment align, Vector3 *outVec) const
Translate a vector into world space based on a specified alignment.
OgreWorkQueue.h
Ogre::Terrain::DerivedDataRequest::typeMask
uint8 typeMask
Definition: OgreTerrain.h:1772
Ogre::Terrain::getAlignment
Alignment getAlignment() const
Get the alignment of the terrain.
Ogre::Terrain::convertTerrainToWorldAxes
Vector3 convertTerrainToWorldAxes(const Vector3 &inVec) const
Ogre::Terrain::replaceLayer
void replaceLayer(uint8 index, bool keepBlends, Real worldSize=0, const StringVector *textureNames=0)
Replace an existing terrain layer, optionally preserving all other layer blend maps.
Ogre::Terrain::ImportData::layerList
LayerInstanceList layerList
List of layer structures, one for each layer required.
Definition: OgreTerrain.h:398
Ogre::Terrain::setLayerTextureName
void setLayerTextureName(uint8 layerIndex, uint8 samplerIndex, const String &textureName)
Set the name of the texture bound to a given index within a given layer.
Ogre::Terrain::LayerInstance::worldSize
Real worldSize
The world size of the texture to be applied in this layer.
Definition: OgreTerrain.h:301
Ogre::Terrain::getAABB
const AxisAlignedBox & getAABB() const
Get the AABB (local coords) of the entire terrain.
Ogre::Terrain::prepare
bool prepare(const ImportData &importData)
Prepare the terrain from some import data rather than loading from native data.
Ogre::Terrain::ImportData::ImportData
ImportData(const ImportData &rhs)
Definition: OgreTerrain.h:417
Ogre::Terrain::updateCompositeMap
void updateCompositeMap()
Performs an update on the terrain composite map based on its dirty region.
Ogre::Terrain::getWorldAABB
AxisAlignedBox getWorldAABB() const
Get the AABB (world coords) of the entire terrain.
Ogre::TerrainGlobalOptions::setUseRayBoxDistanceCalculation
void setUseRayBoxDistanceCalculation(bool rb)
Sets whether to use an accurate ray / box intersection to determine distance from a terrain tile,...
Definition: OgreTerrain.h:2033
Ogre::Terrain::getTerrainPositionAlign
void getTerrainPositionAlign(Real x, Real y, Real z, Alignment align, Vector3 *outTSpos) const
Convert a position from world space to terrain basis space based on a specified alignment.
Ogre::Terrain::_getRootSceneNode
SceneNode * _getRootSceneNode() const
Get the root scene node for the terrain (internal use only)
Ogre::Terrain::_getMorphRequired
bool _getMorphRequired() const
Get whether LOD morphing is needed.
Definition: OgreTerrain.h:1477
Ogre::Terrain::WORKQUEUE_GENERATE_MATERIAL_REQUEST
static const uint16 WORKQUEUE_GENERATE_MATERIAL_REQUEST
Definition: OgreTerrain.h:1542
Ogre::Terrain::mGlobalColourMapEnabled
bool mGlobalColourMapEnabled
Definition: OgreTerrain.h:1830
Ogre::Terrain::load
void load(StreamSerialiser &stream)
Prepare and load the terrain in one simple call from a stream.
Ogre::Terrain::getLODLevelWhenVertexEliminated
uint16 getLODLevelWhenVertexEliminated(long x, long y) const
Utility method, get the first LOD Level at which this vertex is no longer included.
Ogre::Terrain::getHeightData
float * getHeightData() const
Get a pointer to all the height data for this terrain.
Ogre::Terrain::NeighbourIndex
NeighbourIndex
Neighbour index enumeration - indexed anticlockwise from East like angles.
Definition: OgreTerrain.h:497
Ogre::ColourValue
Class representing colour.
Definition: OgreColourValue.h:58
Ogre::uint
unsigned int uint
Definition: OgrePrerequisites.h:114
Ogre::Terrain::clearGPUBlendChannel
void clearGPUBlendChannel(uint8 index, uint channel)
Reset a blend channel back to full black.
Ogre::Terrain::copyBlendTextureChannel
void copyBlendTextureChannel(uint8 srcIndex, uint8 srcChannel, uint8 destIndex, uint8 destChannel)
Copy a GPU blend channel from one source to another. Source and Dest are not required to be in the sa...
Ogre::Terrain::DerivedDataRequest
A data holder for communicating with the background derived data update.
Definition: OgreTerrain.h:1769
Ogre::Terrain::dirty
void dirty()
Mark the entire terrain as dirty.
Ogre::Terrain::getPosition
void getPosition(const Vector3 &TSpos, Vector3 *outWSpos) const
Convert a position from terrain basis space to world space.
Ogre::Terrain::finaliseLightmap
void finaliseLightmap(const Rect &rect, PixelBox *lightmapBox)
Finalise the lightmap.
Ogre::Terrain::mNormalMapRequired
bool mNormalMapRequired
Definition: OgreTerrain.h:1857
Ogre::Terrain::mAlign
Alignment mAlign
Definition: OgreTerrain.h:1733
Ogre::PixelBox
A primitive describing a volume (3D), image (2D) or line (1D) of pixels in memory.
Definition: OgrePixelFormat.h:304
Ogre::Terrain::getDeltaData
const float * getDeltaData() const
Get a pointer to all the delta data for this terrain.
Ogre::Terrain::handleRequest
WorkQueue::Response * handleRequest(const WorkQueue::Request *req, const WorkQueue *srcQ)
WorkQueue::RequestHandler override.
Ogre::Terrain::~Terrain
virtual ~Terrain()
Ogre::Terrain::load
void load(int lodLevel=0, bool synchronous=true)
Load the terrain based on the data already populated via prepare methods.
Ogre::Terrain::determineLodLevels
void determineLodLevels()
Ogre::Terrain::calculateCurrentLod
void calculateCurrentLod(Viewport *vp)
Ogre::Terrain::getRenderQueueGroup
uint8 getRenderQueueGroup(void) const
Get the render queue group that this terrain will be rendered into.
Definition: OgreTerrain.h:1343
Ogre::Terrain::shiftDownGPUBlendChannels
void shiftDownGPUBlendChannels(uint8 index)
Shift/slide all GPU blend texture channels > index down one slot. Blend data may shift into the previ...
Ogre::Terrain::mRenderQueueGroup
uint8 mRenderQueueGroup
Definition: OgreTerrain.h:1752
Ogre::TerrainGlobalOptions::mDefaultMaterialGenerator
TerrainMaterialGeneratorPtr mDefaultMaterialGenerator
Definition: OgreTerrain.h:1918
Ogre::Terrain::getPointTransform
void getPointTransform(Matrix4 *outXform) const
Get a transform which converts Vector4(xindex, yindex, height, 1) into an object-space position inclu...
Ogre::Terrain::ImportData::maxBatchSize
uint16 maxBatchSize
Maximum batch size (along one edge) in vertices; must be 2^n+1 and <= 65.
Definition: OgreTerrain.h:335
Ogre::Terrain::mCompositeMapSizeActual
uint16 mCompositeMapSizeActual
Definition: OgreTerrain.h:1840
Ogre::Terrain::DefaultGpuBufferAllocator::getVertexBuffer
HardwareVertexBufferSharedPtr getVertexBuffer(VBufList &list, size_t vertexSize, size_t numVertices)
Ogre::Terrain::getLayerBlendTexture
const TexturePtr & getLayerBlendTexture(uint8 index) const
Get a blend texture with a given index.
Ogre::Terrain::getGpuBufferAllocator
GpuBufferAllocator * getGpuBufferAllocator()
Get the current buffer allocator.
Ogre::Terrain::LayerInstanceList
vector< LayerInstance >::type LayerInstanceList
Definition: OgreTerrain.h:308
Ogre::Terrain::mMaterialGenerationCount
unsigned long long int mMaterialGenerationCount
Definition: OgreTerrain.h:1816
Ogre::TerrainGlobalOptions::setLightMapDirection
void setLightMapDirection(const Vector3 &v)
Set the shadow map light direction to use (world space).
Definition: OgreTerrain.h:1948
Ogre::Terrain::getPosition
const Vector3 & getPosition() const
Get the world position of the terrain centre.
Definition: OgreTerrain.h:1096
Ogre::TerrainGlobalOptions::getQueryFlags
uint32 getQueryFlags(void) const
Get the default query flags for terrains.
Definition: OgreTerrain.h:2008
Ogre::Terrain::getWorldSize
Real getWorldSize() const
Get the size of the terrain in world units.
Ogre::Terrain::getHeightAtTerrainPosition
float getHeightAtTerrainPosition(Real x, Real y) const
Get the height data for a given terrain position.
Ogre::TerrainGlobalOptions::setCompositeMapDiffuse
void setCompositeMapDiffuse(const ColourValue &c)
Set the composite map diffuse light to use.
Definition: OgreTerrain.h:1956
Ogre::Terrain::mQuadTree
TerrainQuadTreeNode * mQuadTree
Definition: OgreTerrain.h:1739
Ogre::Terrain::getNeighbourPointOverflow
void getNeighbourPointOverflow(long x, long y, NeighbourIndex *outindex, long *outx, long *outy) const
Ogre::TerrainGlobalOptions::getDefaultLayerTextureWorldSize
Real getDefaultLayerTextureWorldSize() const
Get the default world size for a layer 'splat' texture to cover.
Definition: OgreTerrain.h:2055
Ogre::Terrain::convertPosition
Vector3 convertPosition(Space inSpace, const Vector3 &inPos, Space outSpace) const
Convert a position from one space to another with respect to this terrain.
Ogre::Terrain::updateDerivedData
void updateDerivedData(bool synchronous=false, uint8 typeMask=0xFF)
Updates derived data for the terrain (LOD, lighting) to reflect changed height data,...
Ogre::Terrain::addQueryFlags
void addQueryFlags(uint32 flags)
As setQueryFlags, except the flags passed as parameters are appended to the existing flags on this ob...
Definition: OgreTerrain.h:1364
Ogre::Terrain::mLastLODFrame
unsigned long mLastLODFrame
Definition: OgreTerrain.h:1868
Ogre::Terrain::mMaterialDirty
bool mMaterialDirty
Definition: OgreTerrain.h:1817
Ogre::Terrain::mModified
bool mModified
Definition: OgreTerrain.h:1726
OGRE_NEW
#define OGRE_NEW
Definition: OgreMemoryAllocatorConfig.h:473
Ogre::Terrain::setNeighbour
void setNeighbour(NeighbourIndex index, Terrain *neighbour, bool recalculate=false, bool notifyOther=true)
Set a terrain's neighbour, or null to detach one.
Ogre::Terrain::getLightmapSize
uint16 getLightmapSize() const
Get the requested size of lightmap for this terrain.
Definition: OgreTerrain.h:1080
OgreTerrainLayerBlendMap.h
Ogre::Terrain::getPointAlign
void getPointAlign(long x, long y, float height, Alignment align, Vector3 *outpos) const
Get a Vector3 of the world-space point on the terrain, supplying the height data manually (can be mor...
Ogre::Terrain::ImportData::inputImage
Image * inputImage
Optional heightmap providing the initial heights for the terrain.
Definition: OgreTerrain.h:362
Ogre::TerrainGlobalOptions::mMaxPixelError
Real mMaxPixelError
Definition: OgreTerrain.h:1913
Ogre::Terrain::raySelectNeighbour
Terrain * raySelectNeighbour(const Ray &ray, Real distanceLimit=0)
Utility method to pick a neighbour based on a ray.
Ogre::WorkQueue::RequestHandler
Interface definition for a handler of requests.
Definition: OgreWorkQueue.h:162
Ogre::TerrainGlobalOptions::getLayerBlendMapSize
uint16 getLayerBlendMapSize() const
Get the default size of the blend maps for a new terrain.
Definition: OgreTerrain.h:2045
Ogre::Terrain::mCpuCompositeMapStorage
uint8 * mCpuCompositeMapStorage
Definition: OgreTerrain.h:1842
Ogre::TerrainGlobalOptions::getCompositeMapSize
uint16 getCompositeMapSize() const
Get the default size of the composite maps for a new terrain.
Definition: OgreTerrain.h:2081
Ogre::Real
float Real
Software floating point type.
Definition: OgrePrerequisites.h:70
Ogre::Terrain::DerivedDataRequest::terrain
Terrain * terrain
Definition: OgreTerrain.h:1770
Ogre::Terrain::getTargetLodLevel
int getTargetLodLevel() const
Definition: OgreTerrain.h:1893
Ogre::Terrain::getTerrainVector
void getTerrainVector(const Vector3 &inVec, Vector3 *outVec) const
Translate a vector from world space to local terrain space based on the alignment options.
Ogre::Terrain::mColourMap
TexturePtr mColourMap
Definition: OgreTerrain.h:1831
Ogre::Terrain::setGlobalColourMapEnabled
void setGlobalColourMapEnabled(bool enabled, uint16 size=0)
Set whether a global colour map is enabled.
Ogre::Terrain::mRootNode
SceneNode * mRootNode
Definition: OgreTerrain.h:1723
Ogre::Terrain::getNumLodLevelsPerLeaf
uint16 getNumLodLevelsPerLeaf() const
Get the number of LOD levels in a leaf of the terrain quadtree.
Definition: OgreTerrain.h:1240
Ogre::Terrain::isLoaded
bool isLoaded() const
Return whether the terrain is loaded.
Definition: OgreTerrain.h:750
Ogre::Terrain::ImportData::destroy
void destroy()
Delete any input data if this struct is set to do so.
Definition: OgreTerrain.h:476
Ogre::Terrain::getBlendTextureFormat
PixelFormat getBlendTextureFormat(uint8 textureIndex, uint8 numLayers) const
Ogre::Terrain::GEN_MATERIAL
@ GEN_MATERIAL
Definition: OgreTerrain.h:1799
Ogre::Terrain::mWorldSize
Real mWorldSize
Definition: OgreTerrain.h:1734
Ogre::Terrain::getMinHeight
Real getMinHeight() const
Get the minimum height of the terrain.
Ogre::Terrain::getVectorAlign
void getVectorAlign(Real x, Real y, Real z, Alignment align, Vector3 *outVec) const
Translate a vector into world space based on a specified alignment.
Ogre::Terrain::mCompositeMapMaterial
MaterialPtr mCompositeMapMaterial
Definition: OgreTerrain.h:1848
Ogre::Terrain::mCompositeMapDirtyRect
Rect mCompositeMapDirtyRect
Definition: OgreTerrain.h:1843
Ogre::Terrain::mMaterialGenerator
TerrainMaterialGeneratorPtr mMaterialGenerator
Definition: OgreTerrain.h:1815
Ogre::Terrain::getHighestLodPrepared
int getHighestLodPrepared() const
Definition: OgreTerrain.h:1891
Ogre::TerrainGlobalOptions::mQueryFlags
uint32 mQueryFlags
Definition: OgreTerrain.h:1916
Ogre::Terrain::ImportData::layerDeclaration
TerrainLayerDeclaration layerDeclaration
Definition of the contents of each layer (required).
Definition: OgreTerrain.h:393
OgreAxisAlignedBox.h
Ogre::TerrainGlobalOptions::setCompositeMapSize
void setCompositeMapSize(uint16 sz)
Sets the default size of composite maps for a new terrain.
Definition: OgreTerrain.h:2085
Ogre::TerrainGlobalOptions::mCompositeMapSize
uint16 mCompositeMapSize
Definition: OgreTerrain.h:1923
Ogre::Terrain::setPosition
void setPosition(const Vector3 &pos)
Set the position of the terrain centre in world coordinates.
Ogre::Terrain::getQuadTree
TerrainQuadTreeNode * getQuadTree()
Get the top level of the quad tree which is used to divide up the terrain.
Definition: OgreTerrain.h:1551
Ogre::Terrain::DefaultGpuBufferAllocator::freeVertexBuffers
void freeVertexBuffers(const HardwareVertexBufferSharedPtr &posbuf, const HardwareVertexBufferSharedPtr &deltabuf)
Free (or return to the pool) vertex buffers for terrain.
Ogre::Terrain::getBlendTextureCount
uint8 getBlendTextureCount(uint8 numLayers) const
Get the number of blend textures needed for a given number of layers.
Ogre::TerrainGlobalOptions::getUseRayBoxDistanceCalculation
bool getUseRayBoxDistanceCalculation() const
Returns whether or not to use an accurate calculation of camera distance from a terrain tile (ray / A...
Definition: OgreTerrain.h:2020
Ogre::Terrain::getMaterial
const MaterialPtr & getMaterial() const
Get the material being used for the terrain.
Ogre::Terrain::mLayerBlendMapSize
uint16 mLayerBlendMapSize
Definition: OgreTerrain.h:1820
Ogre::Terrain::convertWorldToTerrainAxes
static void convertWorldToTerrainAxes(Alignment align, const Vector3 &worldVec, Vector3 *terrainVec)
Utility method to convert axes from world space to terrain space (xy terrain, z up)
Ogre::Terrain::mGenerateMaterialInProgress
bool mGenerateMaterialInProgress
Definition: OgreTerrain.h:1764
Ogre::Terrain::_getCompositeMapMaterial
const MaterialPtr & _getCompositeMapMaterial() const
Internal getting of material for the terrain composite map.
Definition: OgreTerrain.h:1331
Ogre::Terrain::LayerInstance
An instance of a layer, with specific texture names.
Definition: OgreTerrain.h:299
Ogre::vector
Definition: OgrePrerequisites.h:492
Ogre::Terrain::neighbourModified
void neighbourModified(NeighbourIndex index, const Rect &edgerect, const Rect &shadowrect)
Notify that a neighbour has just finished updating and that this change affects this tile.
Ogre::Terrain::mNumLodLevels
uint16 mNumLodLevels
Definition: OgreTerrain.h:1740
Ogre::Ray
Representation of a ray in space, i.e.
Definition: OgreRay.h:47
Ogre::TerrainGlobalOptions::setDefaultLayerTextureWorldSize
void setDefaultLayerTextureWorldSize(Real sz)
Set the default world size for a layer 'splat' texture to cover.
Definition: OgreTerrain.h:2059
Ogre::Terrain::removeQueryFlags
void removeQueryFlags(uint32 flags)
Definition: OgreTerrain.h:1367
Ogre::Terrain::prepare
bool prepare(DataStreamPtr &stream)
Prepare terrain data from saved data.
Ogre::Terrain::DefaultGpuBufferAllocator::mFreePosBufList
VBufList mFreePosBufList
Definition: OgreTerrain.h:592
Ogre::Terrain::getLayerBlendTextureIndex
std::pair< uint8, uint8 > getLayerBlendTextureIndex(uint8 layerIndex) const
Get the texture index and colour channel of the blend information for a given layer.
Ogre::TerrainGlobalOptions::setLightMapSize
void setLightMapSize(uint16 sz)
Sets the default size of lightmaps for a new terrain.
Definition: OgreTerrain.h:2077
Ogre::TerrainGlobalOptions::getDefaultMaterialGenerator
TerrainMaterialGeneratorPtr getDefaultMaterialGenerator()
Get the default material generator.
Ogre::TerrainGlobalOptions::getSingletonPtr
static TerrainGlobalOptions * getSingletonPtr(void)
Override standard Singleton retrieval.
Ogre::Terrain::setResourceGroup
void setResourceGroup(const String &resGroup)
Set the resource group to use when loading / saving.
Definition: OgreTerrain.h:667
Ogre::TerrainGlobalOptions::mDefaultLayerTextureWorldSize
Real mDefaultLayerTextureWorldSize
Definition: OgreTerrain.h:1920
Ogre::Terrain::_populateIndexBuffer
static void _populateIndexBuffer(uint16 *pIndexes, uint16 batchSize, uint16 vdatasize, size_t vertexIncrement, uint16 xoffset, uint16 yoffset, uint16 numSkirtRowsCols, uint16 skirtRowColSkip)
Utility method to populate a (locked) index buffer.
OgreVector3.h
Ogre::Terrain::getBlendTextureIndex
uint8 getBlendTextureIndex(uint8 layerIndex) const
Get the index of the blend texture that a given layer uses.
Ogre::Terrain::GenerateMaterialRequest::startTime
unsigned long startTime
Definition: OgreTerrain.h:1806
Ogre::Terrain::mDerivedUpdatePendingMask
uint8 mDerivedUpdatePendingMask
If another update is requested while one is already running.
Definition: OgreTerrain.h:1762
Ogre::Terrain::TERRAINLAYERSAMPLER_CHUNK_ID
static const uint32 TERRAINLAYERSAMPLER_CHUNK_ID
Definition: OgreTerrain.h:281
Ogre::Terrain::calculateNormals
PixelBox * calculateNormals(const Rect &rect, Rect &outFinalRect)
Calculate (or recalculate) the normals on the terrain.
Ogre::Terrain::convertPosition
void convertPosition(Space inSpace, const Vector3 &inPos, Space outSpace, Vector3 &outPos) const
Convert a position from one space to another with respect to this terrain.
Ogre::Vector3
Standard 3-dimensional vector.
Definition: OgreVector3.h:52
Ogre::Terrain::mHeightDataModified
bool mHeightDataModified
Definition: OgreTerrain.h:1727
Ogre::Terrain::getPositionAlign
void getPositionAlign(Real x, Real y, Real z, Alignment align, Vector3 *outWSpos) const
Convert a position from terrain basis space to world space based on a specified alignment.
Ogre::Terrain::ImportData::minBatchSize
uint16 minBatchSize
Minimum batch size (along one edge) in vertices; must be 2^n+1.
Definition: OgreTerrain.h:346
Ogre::Terrain::mLightmapSize
uint16 mLightmapSize
Definition: OgreTerrain.h:1834
Ogre::Terrain::_dumpTextures
void _dumpTextures(const String &prefix, const String &suffix)
Dump textures to files.
Ogre::Terrain::setLayerWorldSize
void setLayerWorldSize(uint8 index, Real size)
How large an area in world space the texture in a terrain layer covers before repeating.
Ogre::Terrain::TERRAIN_CHUNK_ID
static const uint32 TERRAIN_CHUNK_ID
Definition: OgreTerrain.h:274
Ogre::Terrain::getCompositeMapSize
uint16 getCompositeMapSize() const
Get the requested size of composite map for this terrain.
Definition: OgreTerrain.h:1090
Ogre::Terrain::_getDerivedResourceGroup
const String & _getDerivedResourceGroup() const
Get the final resource group to use when loading / saving.
Ogre::Terrain::getResolutionAtLod
uint16 getResolutionAtLod(uint16 lodLevel) const
Gets the resolution of the entire terrain (down one edge) at a given LOD level.
Ogre::Terrain::getGlobalColourMapSize
uint16 getGlobalColourMapSize() const
Get the size of the global colour map (if used)
Definition: OgreTerrain.h:1419
Ogre::Terrain::mMinBatchSize
uint16 mMinBatchSize
Definition: OgreTerrain.h:1737
Ogre::TerrainGlobalOptions::mLayerBlendMapSize
uint16 mLayerBlendMapSize
Definition: OgreTerrain.h:1919
Ogre::TerrainGlobalOptions::TerrainGlobalOptions
TerrainGlobalOptions()
Ogre::Terrain::handleGenerateMaterialResponse
void handleGenerateMaterialResponse(const WorkQueue::Response *res, const WorkQueue *srcQ)
Handler for GenerateMaterial.
Ogre::Terrain::DerivedDataResponse::normalUpdateRect
Rect normalUpdateRect
The area of normals that was updated.
Definition: OgreTerrain.h:1788
Ogre::TerrainGlobalOptions::mUseRayBoxDistanceCalculation
bool mUseRayBoxDistanceCalculation
Definition: OgreTerrain.h:1917
Ogre::TerrainGlobalOptions::mCompositeMapAmbient
ColourValue mCompositeMapAmbient
Definition: OgreTerrain.h:1924
Ogre::Terrain::DerivedDataResponse
A data holder for communicating with the background derived data update.
Definition: OgreTerrain.h:1781
Ogre::TerrainGlobalOptions::setQueryFlags
void setQueryFlags(uint32 flags)
Set the default query flags for terrains.
Definition: OgreTerrain.h:2005
Ogre::Terrain::mHeightData
float * mHeightData
The height data (world coords relative to mPos)
Definition: OgreTerrain.h:1730
Ogre::Terrain::msCompositeMapNameGenerator
static NameGenerator msCompositeMapNameGenerator
Definition: OgreTerrain.h:1854
Ogre::Terrain::DerivedDataResponse::deltaUpdateRect
Rect deltaUpdateRect
The area of deltas that was updated.
Definition: OgreTerrain.h:1786
Ogre::Terrain::msLightmapNameGenerator
static NameGenerator msLightmapNameGenerator
Definition: OgreTerrain.h:1853
Ogre::Terrain::dirtyLightmap
void dirtyLightmap()
Mark a the entire lightmap as dirty.
Ogre::TerrainGlobalOptions::setSkirtSize
void setSkirtSize(Real skirtSz)
method - the default size of 'skirts' used to hide terrain cracks (default 10)
Definition: OgreTerrain.h:1944
Ogre::Terrain::convertSpace
void convertSpace(Space inSpace, const Vector3 &inVec, Space outSpace, Vector3 &outVec, bool translation) const
Ogre::Terrain::ImportData
Structure encapsulating import data that you may use to bootstrap the terrain without loading from a ...
Definition: OgreTerrain.h:325
Ogre::Terrain::convertTerrainToWorldAxes
static void convertTerrainToWorldAxes(Alignment align, const Vector3 &terrainVec, Vector3 *worldVec)
Utility method to convert axes from terrain space (xy terrain, z up) tp world space.
Ogre::Terrain::TERRAINDERIVEDDATA_CHUNK_ID
static const uint32 TERRAINDERIVEDDATA_CHUNK_ID
Definition: OgreTerrain.h:287
Ogre::Terrain::msNormalMapNameGenerator
static NameGenerator msNormalMapNameGenerator
Definition: OgreTerrain.h:1852
Ogre::Terrain::mDirtyGeometryRect
Rect mDirtyGeometryRect
Definition: OgreTerrain.h:1756
Ogre::Terrain::removeLayer
void removeLayer(uint8 index)
Remove a layer from the terrain.
Ogre::Terrain::DefaultGpuBufferAllocator::mFreeDeltaBufList
VBufList mFreeDeltaBufList
Definition: OgreTerrain.h:593
Ogre::Terrain::canHandleResponse
bool canHandleResponse(const WorkQueue::Response *res, const WorkQueue *srcQ)
WorkQueue::ResponseHandler override.
Ogre::Terrain::update
void update(bool synchronous=false)
Trigger the update process for the terrain.
Ogre::TerrainGlobalOptions::getRenderQueueGroup
uint8 getRenderQueueGroup(void) const
Get the render queue group that this terrain will be rendered into.
Definition: OgreTerrain.h:1986
Ogre::Terrain::getLayerWorldSize
Real getLayerWorldSize(uint8 index) const
How large an area in world space the texture in a terrain layer covers before repeating.
Ogre::Terrain::deleteBlendMaps
void deleteBlendMaps(uint8 lowIndex)
Delete blend maps for all layers >= lowIndex.
Ogre::Terrain::GenerateMaterialRequest
A data holder for communicating with the background GetMaterial.
Definition: OgreTerrain.h:1804
Ogre::Terrain::getResourceGroup
const String & getResourceGroup() const
Get the resource group to use when loading / saving.
Definition: OgreTerrain.h:672
Ogre::Terrain::mLightmapSizeActual
uint16 mLightmapSizeActual
Definition: OgreTerrain.h:1835
Ogre::Terrain::freeLodData
void freeLodData()
Ogre::Terrain::getMaxBatchSize
uint16 getMaxBatchSize() const
Get the maximum size in vertices along one side of a batch.

Copyright © 2012 Torus Knot Software Ltd
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.