29 #ifndef __Ogre_Terrain_H__
30 #define __Ogre_Terrain_H__
401 : terrainAlign(ALIGN_X_Z)
410 , deleteInputData(false)
418 : terrainAlign(ALIGN_X_Z)
427 , deleteInputData(false)
461 memcpy(inputFloat, rhs.
inputFloat,
sizeof(
float) * terrainSize*terrainSize);
499 NEIGHBOUR_NORTHEAST = 1,
501 NEIGHBOUR_NORTHWEST = 3,
503 NEIGHBOUR_SOUTHWEST = 5,
505 NEIGHBOUR_SOUTHEAST = 7,
565 uint16 skirtRowColSkip) = 0;
568 virtual void freeAllBuffers() = 0;
582 void freeAllBuffers();
587 void warmStart(
size_t numInstances,
uint16 terrainSize,
uint16 maxBatchSize,
614 static size_t _getNumIndexesForBatchSize(
uint16 batchSize);
626 static void _populateIndexBuffer(
uint16* pIndexes,
uint16 batchSize,
676 const String& _getDerivedResourceGroup()
const;
686 void save(
const String& filename);
700 bool prepare(
const String& filename);
721 bool prepare(
const ImportData& importData);
728 void load(
const String& filename);
743 void load(
int lodLevel = 0,
bool synchronous =
true);
788 float* getHeightData()
const;
792 float* getHeightData(
long x,
long y)
const;
798 float getHeightAtPoint(
long x,
long y)
const;
806 void setHeightAtPoint(
long x,
long y,
float h);
811 float getHeightAtTerrainPosition(
Real x,
Real y)
const;
818 float getHeightAtWorldPosition(
Real x,
Real y,
Real z)
const;
825 float getHeightAtWorldPosition(
const Vector3& pos)
const;
833 const float* getDeltaData()
const;
837 const float* getDeltaData(
long x,
long y)
const;
843 void getPoint(
long x,
long y,
Vector3* outpos)
const;
850 void getPointFromSelfOrNeighbour(
long x,
long y,
Vector3* outpos)
const;
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;
881 void getTerrainVectorAlign(
Real x,
Real y,
Real z, Alignment align,
Vector3* outVec)
const;
892 void getVectorAlign(
const Vector3& inVec, Alignment align,
Vector3* outVec)
const;
929 void getTerrainPosition(
const Vector3& WSpos,
Vector3* outTSpos)
const;
943 void getPositionAlign(
const Vector3& TSpos, Alignment align,
Vector3* outWSpos)
const;
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;
969 Alignment getAlignment()
const;
976 void setSize(
uint16 newSize);
978 uint16 getMaxBatchSize()
const;
980 uint16 getMinBatchSize()
const;
982 Real getWorldSize()
const;
986 void setWorldSize(
Real newWorldSize);
1013 void removeLayer(
uint8 index);
1024 void replaceLayer(
uint8 index,
bool keepBlends,
Real worldSize = 0,
const StringVector* textureNames = 0);
1029 uint8 getMaxLayers()
const;
1035 Real getLayerWorldSize(
uint8 index)
const;
1041 void setLayerWorldSize(
uint8 index,
Real size);
1051 Real getLayerUVMultiplier(
uint8 index)
const;
1058 const String& getLayerTextureName(
uint8 layerIndex,
uint8 samplerIndex)
const;
1065 void setLayerTextureName(
uint8 layerIndex,
uint8 samplerIndex,
const String& textureName);
1098 void setPosition(
const Vector3& pos);
1117 void dirtyRect(
const Rect& rect);
1124 void _dirtyCompositeMapRect(
const Rect& rect);
1136 void dirtyLightmapRect(
const Rect& rect);
1148 void dirtyLightmap();
1172 void update(
bool synchronous =
false);
1178 void updateGeometry();
1184 void updateGeometryWithoutNotifyNeighbours();
1203 void updateDerivedData(
bool synchronous =
false,
uint8 typeMask = 0xFF);
1213 void updateCompositeMap();
1228 void updateCompositeMapWithDelay(
Real delay = 2);
1249 Rect calculateHeightDeltas(
const Rect& rect);
1258 void finaliseHeightDeltas(
const Rect& rect,
bool cpuData);
1274 void finaliseNormals(
const Rect& rect,
PixelBox* normalsBox);
1283 PixelBox* calculateLightmap(
const Rect& rect,
const Rect& extraTargetRect,
Rect& outFinalRect);
1292 void finaliseLightmap(
const Rect& rect,
PixelBox* lightmapBox);
1310 std::pair<bool, Vector3> rayIntersects(
const Ray& ray,
1311 bool cascadeToNeighbours =
false,
Real distanceLimit = 0);
1318 Real getMinHeight()
const;
1320 Real getMaxHeight()
const;
1322 Real getBoundingRadius()
const;
1329 const MaterialPtr& getCompositeMapMaterial()
const;
1389 uint8 getBlendTextureIndex(
uint8 layerIndex)
const;
1392 uint8 getBlendTextureCount()
const;
1394 uint8 getBlendTextureCount(
uint8 numLayers)
const;
1401 const String& getBlendTextureName(
uint8 textureIndex)
const;
1415 void setGlobalColourMapEnabled(
bool enabled,
uint16 size = 0);
1428 void widenRectByVector(
const Vector3& vec,
const Rect& inRect,
Rect& outRect);
1437 void widenRectByVector(
const Vector3& vec,
const Rect& inRect,
1449 void freeTemporaryResources();
1463 std::pair<uint8,uint8> getLayerBlendTextureIndex(
uint8 layerIndex)
const;
1490 void _setNormalMapRequired(
bool normalMap);
1505 void _setLightMapRequired(
bool lightMap,
bool shadowsOnly =
false);
1525 void _setCompositeMapRequired(
bool compositeMap);
1528 bool _getUseVertexCompression()
const;
1545 uint16 getLODLevelWhenVertexEliminated(
long x,
long y)
const;
1547 uint16 getLODLevelWhenVertexEliminated(
long rowOrColulmn)
const;
1563 Terrain* getNeighbour(NeighbourIndex index)
const;
1582 void setNeighbour(NeighbourIndex index,
Terrain* neighbour,
bool recalculate =
false,
bool notifyOther =
true);
1588 static NeighbourIndex getOppositeNeighbour(NeighbourIndex index);
1592 static NeighbourIndex getNeighbourIndex(
long offsetx,
long offsety);
1601 void notifyNeighbours();
1610 void neighbourModified(NeighbourIndex index,
const Rect& edgerect,
const Rect& shadowrect);
1617 Terrain* raySelectNeighbour(
const Ray& ray,
Real distanceLimit = 0);
1623 void _dumpTextures(
const String& prefix,
const String& suffix);
1630 static void convertWorldToTerrainAxes(Alignment align,
const Vector3& worldVec,
Vector3* terrainVec);
1632 static void convertTerrainToWorldAxes(Alignment align,
const Vector3& terrainVec,
Vector3* worldVec);
1651 uint getGeoDataSizeAtLod(
uint16 lodLevel)
const;
1659 return (lodLevel>=0) ? lodLevel : mNumLodLevels+lodLevel;
1663 void freeCPUResources();
1664 void freeGPUResources();
1665 void determineLodLevels();
1666 void distributeVertexData();
1667 void updateBaseScale();
1668 void createGPUBlendTextures();
1669 void createLayerBlendMaps();
1670 void createOrDestroyGPUNormalMap();
1671 void createOrDestroyGPUColourMap();
1672 void createOrDestroyGPULightmap();
1673 void createOrDestroyGPUCompositeMap();
1674 void waitForDerivedProcesses();
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;
1687 void calculateCurrentLod(
Viewport* vp);
1689 std::pair<bool, Vector3> checkQuadIntersection(
int x,
int y,
const Ray& ray);
1692 void deleteBlendMaps(
uint8 lowIndex);
1694 void shiftUpGPUBlendChannels(
uint8 index);
1696 void shiftDownGPUBlendChannels(
uint8 index);
1698 void copyBlendTextureChannel(
uint8 srcIndex,
uint8 srcChannel,
uint8 destIndex,
uint8 destChannel );
1700 void clearGPUBlendChannel(
uint8 index,
uint channel);
1702 void copyGlobalOptions();
1703 void checkLayers(
bool includeGPUResources);
1704 void checkDeclaration();
1705 void deriveUVMultipliers();
1708 void updateDerivedDataImpl(
const Rect& rect,
const Rect& lightmapExtraRect,
bool synchronous,
uint8 typeMask);
1710 void getEdgeRect(NeighbourIndex index,
long range,
Rect* outRect)
const;
1712 void getNeighbourEdgeRect(NeighbourIndex index,
const Rect& inRect,
Rect* outRect)
const;
1714 void getNeighbourPoint(NeighbourIndex index,
long x,
long y,
long *outx,
long *outy)
const;
1716 void getNeighbourPointOverflow(
long x,
long y, NeighbourIndex *outindex,
long *outx,
long *outy)
const;
1719 void removeFromNeighbours();
1800 GEN_COMPOSITE_MAP_MATERIAL
1876 size_t getPositionBufVertexSize()
const;
1877 size_t getDeltaBufVertexSize()
const;
1885 void increaseLodLevel(
bool synchronous =
false);
1889 void decreaseLodLevel();
static const uint8 DERIVED_DATA_DELTAS
uint8 mDerivedUpdatePendingMask
If another update is requested while one is already running.
void _setMorphRequired(bool morph)
Request internal implementation options for the terrain material to use, in this case vertex morphing...
Rect lightmapUpdateRect
The area of lightmap that was updated.
static const uint16 TERRAINLAYERDECLARATION_CHUNK_VERSION
const TexturePtr & getGlobalColourMap() const
Get access to the global colour map, if enabled.
static const uint8 DERIVED_DATA_ALL
uint8 getRenderQueueGroup(void) const
Get the render queue group that this terrain will be rendered into.
bool mDerivedDataUpdateInProgress
static const uint32 TERRAINLAYERSAMPLER_CHUNK_ID
uint16 getLightmapSize() const
Get the requested size of lightmap for this terrain.
float * inputFloat
Optional list of terrainSize * terrainSize floats defining the terrain.
GpuBufferAllocator * mCustomGpuBufferAllocator
uint16 getCompositeMapSize() const
Get the requested size of composite map for this terrain.
BytePointerList mCpuBlendMapStorage
Staging post for blend map data.
uint8 getLayerCount() const
Get the number of layers in this terrain.
uint16 mGlobalColourMapSize
uint16 getNumLodLevelsPerLeaf() const
Get the number of LOD levels in a leaf of the terrain quadtree.
Alignment terrainAlign
The alignment of the terrain.
void setUseVertexCompressionWhenAvailable(bool enable)
Set whether to allow vertex compression to be used when the material generator states that it support...
vector< LayerInstance >::type LayerInstanceList
static NameGenerator msCompositeMapNameGenerator
An instance of a layer, with specific texture names.
const String & getDefaultResourceGroup() const
Get the default resource group to use to load / save terrains.
void setQueryFlags(uint32 flags)
Set the query flags for this terrain.
void destroy()
Delete any input data if this struct is set to do so.
uint16 getNumLodLevels() const
Get the total number of LOD levels in the terrain.
VBufList mFreeDeltaBufList
uint16 getDefaultGlobalColourMapSize() const
Get the default size of the terrain global colour map for a new terrain.
Shared pointer implementation used to share index buffers.
void setCastsDynamicShadows(bool s)
Whether the terrain will be able to cast shadows (texture shadows only are supported, and you must be using depth shadow maps).
ImportData & operator=(const ImportData &rhs)
TerrainLodManager * mLodManager
const TerrainLayerDeclaration & getLayerDeclaration() const
Get the declaration which describes the layers in this terrain.
static NameGenerator msBlendTextureGenerator
bool mMaterialParamsDirty
RealVector mLayerUVMultiplier
const String & getResourceGroup() const
Get the resource group to use when loading / saving.
Interface to a general purpose request / response style background work queue.
unsigned long mCompositeMapUpdateCountdown
static const uint16 WORKQUEUE_DERIVED_DATA_REQUEST
unsigned long long uint64
_OgreTerrainExport friend std::ostream & operator<<(std::ostream &o, const DerivedDataResponse &r)
Interface used to by the Terrain instance to allocate GPU buffers.
Utility class to generate a sequentially numbered series of names.
const Camera * mLastLODCamera
uint8 remainingTypeMask
Remaining types not yet processed.
bool getUseVertexCompressionWhenAvailable() const
Get whether to allow vertex compression to be used when the material generator states that it support...
Class representing colour.
bool mLightMapShadowsOnly
float Real
Software floating point type.
void setMaxPixelError(Real pixerr)
Set the maximum screen pixel error that should be allowed when rendering.
void setCompositeMapDiffuse(const ColourValue &c)
Set the composite map diffuse light to use.
uint16 getGlobalColourMapSize() const
Get the size of the global colour map (if used)
const String & getMaterialName() const
Get the name of the material being used for the terrain.
Rect mDirtyLightmapFromNeighboursRect
#define OGRE_ALLOC_T(T, count, category)
Allocate a block of memory for a primitive type, and indicate the category of usage.
uint8 * mCpuLightmapStorage
bool mCompositeMapDirtyRectLightmapUpdate
True if the updates included lightmap changes (widen)
vector< String >::type StringVector
TexturePtrList mBlendTextureList
static const uint16 TERRAINLAYERSAMPLERELEMENT_CHUNK_VERSION
void setLightMapDirection(const Vector3 &v)
Set the shadow map light direction to use (world space).
PixelFormat
The pixel format used for images, textures, and render surfaces.
Real getDefaultLayerTextureWorldSize() const
Get the default world size for a layer 'splat' texture to cover.
uint16 mCompositeMapSizeActual
GenerateMaterialStage stage
Class representing a node in the scene graph.
float * mHeightData
The height data (world coords relative to mPos)
vector< TexturePtr >::type TexturePtrList
IlluminationRenderStage
Describes the stage of rendering when performing complex illumination.
const TexturePtr & getLightmap() const
Get access to the lightmap, if enabled (as requested by the material generator)
static NameGenerator msNormalMapNameGenerator
An abstraction of a viewport, i.e.
unsigned long mLastLODFrame
float constantHeight
If neither inputImage or inputFloat are supplied, the constant height at which the initial terrain sh...
bool isDerivedDataUpdateInProgress() const
Query whether a derived data update is in progress or not.
TerrainLayerDeclaration mLayerDecl
Real inputBias
How to bias the input values provided (if any)
uint8 * mCpuCompositeMapStorage
uint16 mLayerBlendMapSize
const Vector3 & getPosition() const
Get the world position of the terrain centre.
bool mUseRayBoxDistanceCalculation
unsigned long mLastMillis
ColourValue mCompositeMapAmbient
const MaterialPtr & _getMaterial() const
Internal getting of material.
Class that allows listening in on the various stages of SceneManager processing, so that custom behav...
_OgreTerrainExport friend std::ostream & operator<<(std::ostream &o, const DerivedDataRequest &r)
TerrainMaterialGeneratorPtr mMaterialGenerator
void setVisibilityFlags(uint32 flags)
Set the visibility flags for this terrain.
const ColourValue & getCompositeMapAmbient() const
Get the composite map ambient light to use.
void setUseRayBoxDistanceCalculation(bool rb)
Sets whether to use an accurate ray / box intersection to determine distance from a terrain tile...
const Vector3 & getLightMapDirection() const
Get the shadow map light direction to use (world space)
static const uint16 TERRAINLAYERSAMPLER_CHUNK_VERSION
Geometry held in main memory.
static const uint64 TERRAIN_GENERATE_MATERIAL_INTERVAL_MS
void setLightMapSize(uint16 sz)
Sets the default size of lightmaps for a new terrain.
bool getCastsDynamicShadows() const
Whether the terrain will be able to cast shadows (texture shadows only are supported, and you must be using depth shadow maps).
uint32 getVisibilityFlags(void) const
Get the visibility flags for this terrain.
map< uint32, HardwareIndexBufferSharedPtr >::type IBufMap
TerrainMaterialGeneratorPtr mDefaultMaterialGenerator
static const uint16 WORKQUEUE_GENERATE_MATERIAL_REQUEST
Class encapsulating a standard 4x4 homogeneous matrix.
The main containing class for a chunk of terrain.
Standard 3-dimensional vector.
void addQueryFlags(uint32 flags)
As setQueryFlags, except the flags passed as parameters are appended to the existing flags on this ob...
static const uint32 TERRAINLAYERSAMPLERELEMENT_CHUNK_ID
const MaterialPtr & _getCompositeMapMaterial() const
Internal getting of material for the terrain composite map.
General purpose request structure.
Shared pointer implementation used to share vertex buffers.
Vector3 pos
Position of the terrain.
static const uint32 TERRAINGENERALINFO_CHUNK_ID
TerrainLayerDeclaration layerDeclaration
Definition of the contents of each layer (required).
TerrainLayerBlendMapList mLayerBlendMapList
Rect deltaUpdateRect
The area of deltas that was updated.
static const uint32 TERRAINLAYERDECLARATION_CHUNK_ID
PixelBox * mCpuTerrainNormalMap
Pending data.
A data holder for communicating with the background GetMaterial.
void setDefaultLayerTextureWorldSize(Real sz)
Set the default world size for a layer 'splat' texture to cover.
Real getCompositeMapDistance() const
Get the distance at which to start using a composite map if present.
bool isModified() const
Returns whether this terrain has been modified since it was first loaded / defined.
Real inputScale
How to scale the input values provided (if any)
bool _getMorphRequired() const
Get whether LOD morphing is needed.
virtual ~GpuBufferAllocator()
static const uint32 TERRAINDERIVEDDATA_CHUNK_ID
Real mBase
Base position in world space, relative to mPos.
Rect normalUpdateRect
The area of normals that was updated.
void setRenderQueueGroup(uint8 grp)
Set the render queue group that this terrain will be rendered into.
void setCompositeMapSize(uint16 sz)
Sets the default size of composite maps for a new terrain.
General purpose response structure.
static const uint8 DERIVED_DATA_LIGHTMAP
#define OGRE_RW_MUTEX(name)
void setSkirtSize(Real skirtSz)
method - the default size of 'skirts' used to hide terrain cracks (default 10)
#define OGRE_FREE(ptr, category)
Free the memory allocated with OGRE_MALLOC or OGRE_ALLOC_T. Category is required to be restated to en...
TexturePtr getTerrainNormalMap() const
Get the (global) normal map texture.
uint16 getLightMapSize() const
Get the default size of the lightmaps for a new terrain.
PixelBox * normalMapBox
All CPU-side data, independent of textures; to be blitted in main thread.
TerrainQuadTreeNode * getQuadTree()
Get the top level of the quad tree which is used to divide up the terrain.
#define _OgreTerrainExport
vector< TerrainLayerBlendMap * >::type TerrainLayerBlendMapList
LayerInstanceList layerList
List of layer structures, one for each layer required.
Alignment
The alignment of the terrain.
Terrain LOD data manager.
uint16 getCompositeMapSize() const
Get the default size of the composite maps for a new terrain.
uint16 mLayerBlendMapSizeActual
static const size_t LOD_MORPH_CUSTOM_PARAM
Space
Enumeration of relative spaces that you might want to use to address the terrain. ...
static const uint8 DERIVED_DATA_NORMALS
Real mDefaultLayerTextureWorldSize
const TexturePtr & getCompositeMap() const
Get access to the composite map, if enabled (as requested by the material generator) ...
DefaultGpuBufferAllocator mDefaultGpuBufferAllocator
void setLayerBlendMapSize(uint16 sz)
Sets the default size of blend maps for a new terrain.
void removeQueryFlags(uint32 flags)
bool getGlobalColourMapEnabled() const
Get whether a global colour map is enabled on this terrain.
void setQueryFlags(uint32 flags)
Set the default query flags for terrains.
uint16 minBatchSize
Minimum batch size (along one edge) in vertices; must be 2^n+1.
Class exposing an interface to a blend map for a given layer.
Real getMaxPixelError() const
Get the maximum screen pixel error that should be allowed when rendering.
Rect lightmapExtraDirtyRect
Utility class providing helper methods for reading / writing structured data held in a DataStream...
uint16 terrainSize
Terrain size (along one edge) in vertices; must be 2^n+1.
ColourValue mCompositeMapDiffuse
bool mGlobalColourMapEnabled
NeighbourIndex
Neighbour index enumeration - indexed anticlockwise from East like angles.
uint16 mDefaultGlobalColourMapSize
static const uint16 TERRAINGENERALINFO_CHUNK_VERSION
A viewpoint from which the scene will be rendered.
bool deleteInputData
Whether this structure should 'own' the input data (inputImage and inputFloat), and therefore delete ...
const ColourValue & getCompositeMapDiffuse() const
Get the composite map iffuse light to use.
A node in a quad tree used to store a patch of terrain.
void setVisibilityFlags(uint32 flags)
Set the visbility flags that terrains will be rendered with.
void setCompositeMapAmbient(const ColourValue &c)
Set the composite map ambient light to use.
int getHighestLodPrepared() const
static const uint16 TERRAINDERIVEDDATA_CHUNK_VERSION
int getTargetLodLevel() const
Options class which just stores default options for the terrain.
Class representing an image file.
void removeQueryFlags(uint32 flags)
Real mCompositeMapDistance
Interface definition for a handler of responses.
Rect mDirtyDerivedDataRect
bool mPrepareInProgress
Don't release Height/DeltaData when preparing.
TerrainQuadTreeNode * mQuadTree
void addQueryFlags(uint32 flags)
As setQueryFlags, except the flags passed as parameters are appended to the existing flags on this ob...
void setCompositeMapDistance(Real c)
Set the distance at which to start using a composite map if present.
float * mDeltaData
The delta information defining how a vertex moves before it is removed at a lower LOD...
_OgreTerrainExport friend std::ostream & operator<<(std::ostream &o, const GenerateMaterialRequest &r)
MaterialPtr mCompositeMapMaterial
uint16 maxBatchSize
Maximum batch size (along one edge) in vertices; must be 2^n+1 and <= 65.
A data holder for communicating with the background derived data update.
Rect mDirtyGeometryRectForNeighbours
void setDefaultResourceGroup(const String &grp)
Set the default resource group to use to load / save terrains.
The definition of the information each layer will contain in this terrain.
ImportData(const ImportData &rhs)
Structure encapsulating import data that you may use to bootstrap the terrain without loading from a ...
uint16 getLayerBlendMapSize() const
Get the requested size of the blend maps used to blend between layers for this terrain.
uint16 mLayerBlendMapSize
bool mGenerateMaterialInProgress
SceneManager * getSceneManager() const
bool isLoaded() const
Return whether the terrain is loaded.
Image * inputImage
Optional heightmap providing the initial heights for the terrain.
int getHighestLodLoaded() const
uint32 getQueryFlags(void) const
Get the default query flags for terrains.
static const uint32 TERRAINLAYERINSTANCE_CHUNK_ID
static const uint32 TERRAIN_CHUNK_ID
Template class for creating single-instance global classes.
Real worldSize
The world size of the texture to be applied in this layer.
void setRenderQueueGroup(uint8 grp)
Set the render queue group that terrains will be rendered into.
list< HardwareVertexBufferSharedPtr >::type VBufList
virtual ~TerrainGlobalOptions()
void setResourceGroup(const String &resGroup)
Set the resource group to use when loading / saving.
A primitive describing a volume (3D), image (2D) or line (1D) of pixels in memory.
Real getSkirtSize() const
The default size of 'skirts' used to hide terrain cracks (default 10, set for new Terrain using Terra...
bool isHeightDataModified() const
Returns whether terrain heights have been modified since the terrain was first loaded / defined...
bool mUseVertexCompressionWhenAvailable
uint16 mLightmapSizeActual
Real mScale
Relationship between one point on the terrain and world size.
void setDefaultGlobalColourMapSize(uint16 sz)
Set the default size of the terrain global colour map for a new terrain.
Real worldSize
The world size of the terrain.
uint16 mNumLodLevelsPerLeafNode
Real getSkirtSize() const
The default size of 'skirts' used to hide terrain cracks (default 10)
static NameGenerator msLightmapNameGenerator
unsigned long long int mMaterialGenerationCount
A 3D box aligned with the x/y/z axes.
Manages the organisation and rendering of a 'scene' i.e.
int getPositiveLodLevel(int lodLevel) const
Get the real lod level.
uint32 getVisibilityFlags(void) const
Get the visbility flags that terrains will be rendered with.
LayerInstanceList mLayers
A data holder for communicating with the background derived data update.
Standard implementation of a buffer allocator which re-uses buffers.
Interface definition for a handler of requests.
uint8 getRenderQueueGroup(void) const
Get the render queue group that this terrain will be rendered into.
static const uint16 TERRAIN_MAX_BATCH_SIZE
vector< uint8 * >::type BytePointerList
uint32 getQueryFlags(void) const
Get the query flags for this terrain.
vector< Real >::type RealVector
Rect mCompositeMapDirtyRect
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
uint16 getLayerBlendMapSize() const
Get the default size of the blend maps for a new terrain.
Representation of a ray in space, i.e.
StringVector textureNames
List of texture names to import; must match with TerrainLayerDeclaration.
bool mCompositeMapRequired
uint8 * mCpuColourMapStorage
bool getUseRayBoxDistanceCalculation() const
Returns whether or not to use an accurate calculation of camera distance from a terrain tile (ray / A...
TexturePtr mTerrainNormalMap
Texture storing normals for the whole terrrain.
static const uint16 TERRAIN_CHUNK_VERSION
static const uint16 TERRAINLAYERINSTANCE_CHUNK_VERSION