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();
Representation of a ray in space, i.e.
A data holder for communicating with the background derived data update.
bool isModified() const
Returns whether this terrain has been modified since it was first loaded / defined.
void setLayerBlendMapSize(uint16 sz)
Sets the default size of blend maps for a new terrain.
A viewpoint from which the scene will be rendered.
int getTargetLodLevel() const
GenerateMaterialStage stage
static const uint32 TERRAIN_CHUNK_ID
Structure encapsulating import data that you may use to bootstrap the terrain without loading from a ...
uint8 getLayerCount() const
Get the number of layers in this terrain.
#define OGRE_ALLOC_T(T, count, category)
Allocate a block of memory for a primitive type, and indicate the category of usage.
unsigned long long int mMaterialGenerationCount
Class encapsulating a standard 4x4 homogeneous matrix.
_OgreTerrainExport friend std::ostream & operator<<(std::ostream &o, const GenerateMaterialRequest &r)
static const uint16 TERRAINLAYERINSTANCE_CHUNK_VERSION
uint16 getLayerBlendMapSize() const
Get the default size of the blend maps for a new terrain.
float * inputFloat
Optional list of terrainSize * terrainSize floats defining the terrain.
float Real
Software floating point type.
bool getGlobalColourMapEnabled() const
Get whether a global colour map is enabled on this terrain.
uint16 mCompositeMapSizeActual
NeighbourIndex
Neighbour index enumeration - indexed anticlockwise from East like angles.
const String & getResourceGroup() const
Get the resource group to use when loading / saving.
bool isLoaded() const
Return whether the terrain is loaded.
void setSkirtSize(Real skirtSz)
method - the default size of 'skirts' used to hide terrain cracks (default 10)
Utility class to generate a sequentially numbered series of names.
const ColourValue & getCompositeMapAmbient() const
Get the composite map ambient light to use.
The main containing class for a chunk of terrain.
Real mDefaultLayerTextureWorldSize
vector< LayerInstance >::type LayerInstanceList
void addQueryFlags(uint32 flags)
As setQueryFlags, except the flags passed as parameters are appended to the existing flags on this ob...
General purpose request structure.
Real mCompositeMapDistance
Template class for creating single-instance global classes.
static const uint16 TERRAINGENERALINFO_CHUNK_VERSION
uint16 getGlobalColourMapSize() const
Get the size of the global colour map (if used)
uint16 getLightMapSize() const
Get the default size of the lightmaps for a new terrain.
Rect lightmapUpdateRect
The area of lightmap that was updated.
const Vector3 & getPosition() const
Get the world position of the terrain centre.
bool mUseVertexCompressionWhenAvailable
Class representing colour.
static const uint16 WORKQUEUE_DERIVED_DATA_REQUEST
General purpose response structure.
const Vector3 & getLightMapDirection() const
Get the shadow map light direction to use (world space)
Manages the organisation and rendering of a 'scene' i.e.
static const uint32 TERRAINDERIVEDDATA_CHUNK_ID
ColourValue mCompositeMapDiffuse
uint16 mLayerBlendMapSize
bool isDerivedDataUpdateInProgress() const
Query whether a derived data update is in progress or not.
uint8 * mCpuLightmapStorage
_OgreTerrainExport friend std::ostream & operator<<(std::ostream &o, const DerivedDataResponse &r)
static const uint8 DERIVED_DATA_LIGHTMAP
const MaterialPtr & _getMaterial() const
Internal getting of material.
bool mUseRayBoxDistanceCalculation
uint16 mGlobalColourMapSize
static const uint8 DERIVED_DATA_ALL
Real getDefaultLayerTextureWorldSize() const
Get the default world size for a layer 'splat' texture to cover.
ColourValue mCompositeMapAmbient
TerrainLayerBlendMapList mLayerBlendMapList
void _setMorphRequired(bool morph)
Request internal implementation options for the terrain material to use, in this case vertex morphing...
uint16 getNumLodLevels() const
Get the total number of LOD levels in the terrain.
static const uint16 TERRAIN_CHUNK_VERSION
Shared pointer implementation used to share vertex buffers.
A 3D box aligned with the x/y/z axes.
Rect deltaUpdateRect
The area of deltas that was updated.
Real mScale
Relationship between one point on the terrain and world size.
static const uint16 TERRAIN_MAX_BATCH_SIZE
static NameGenerator msBlendTextureGenerator
const String & getMaterialName() const
Get the name of the material being used for the terrain.
unsigned long mCompositeMapUpdateCountdown
IlluminationRenderStage
Describes the stage of rendering when performing complex illumination.
Class that allows listening in on the various stages of SceneManager processing, so that custom behav...
int getPositiveLodLevel(int lodLevel) const
Get the real lod level.
bool deleteInputData
Whether this structure should 'own' the input data (inputImage and inputFloat), and therefore delete ...
Real getCompositeMapDistance() const
Get the distance at which to start using a composite map if present.
void setResourceGroup(const String &resGroup)
Set the resource group to use when loading / saving.
float * mDeltaData
The delta information defining how a vertex moves before it is removed at a lower LOD...
TexturePtrList mBlendTextureList
Class representing a node in the scene graph.
bool mDerivedDataUpdateInProgress
static const uint8 DERIVED_DATA_DELTAS
bool mGlobalColourMapEnabled
void removeQueryFlags(uint32 flags)
static const uint32 TERRAINLAYERSAMPLERELEMENT_CHUNK_ID
uint16 minBatchSize
Minimum batch size (along one edge) in vertices; must be 2^n+1.
void removeQueryFlags(uint32 flags)
uint16 mDefaultGlobalColourMapSize
void setRenderQueueGroup(uint8 grp)
Set the render queue group that this terrain will be rendered into.
static const uint64 TERRAIN_GENERATE_MATERIAL_INTERVAL_MS
static const uint16 TERRAINLAYERDECLARATION_CHUNK_VERSION
BytePointerList mCpuBlendMapStorage
Staging post for blend map data.
void setQueryFlags(uint32 flags)
Set the default query flags for terrains.
vector< TexturePtr >::type TexturePtrList
A data holder for communicating with the background GetMaterial.
uint8 getRenderQueueGroup(void) const
Get the render queue group that this terrain will be rendered into.
Shared pointer implementation used to share index buffers.
Alignment terrainAlign
The alignment of the terrain.
void setQueryFlags(uint32 flags)
Set the query flags for this terrain.
VBufList mFreeDeltaBufList
void addQueryFlags(uint32 flags)
As setQueryFlags, except the flags passed as parameters are appended to the existing flags on this ob...
const TerrainLayerDeclaration & getLayerDeclaration() const
Get the declaration which describes the layers in this terrain.
uint16 getDefaultGlobalColourMapSize() const
Get the default size of the terrain global colour map for a new terrain.
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).
void destroy()
Delete any input data if this struct is set to do so.
const TexturePtr & getLightmap() const
Get access to the lightmap, if enabled (as requested by the material generator)
TerrainLayerDeclaration layerDeclaration
Definition of the contents of each layer (required).
Rect normalUpdateRect
The area of normals that was updated.
TerrainLodManager * mLodManager
uint16 terrainSize
Terrain size (along one edge) in vertices; must be 2^n+1.
vector< Real >::type RealVector
uint32 getQueryFlags(void) const
Get the default query flags for terrains.
Rect mDirtyLightmapFromNeighboursRect
void setDefaultLayerTextureWorldSize(Real sz)
Set the default world size for a layer 'splat' texture to cover.
bool getUseVertexCompressionWhenAvailable() const
Get whether to allow vertex compression to be used when the material generator states that it support...
Interface definition for a handler of requests.
void setLightMapSize(uint16 sz)
Sets the default size of lightmaps for a new terrain.
Real worldSize
The world size of the terrain.
PixelFormat
The pixel format used for images, textures, and render surfaces.
int getHighestLodPrepared() const
Class exposing an interface to a blend map for a given layer.
bool mCompositeMapDirtyRectLightmapUpdate
True if the updates included lightmap changes (widen)
void setCompositeMapSize(uint16 sz)
Sets the default size of composite maps for a new terrain.
void setCompositeMapDistance(Real c)
Set the distance at which to start using a composite map if present.
Space
Enumeration of relative spaces that you might want to use to address the terrain. ...
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
Interface used to by the Terrain instance to allocate GPU buffers.
MaterialPtr mCompositeMapMaterial
#define _OgreTerrainExport
unsigned long long uint64
void setRenderQueueGroup(uint8 grp)
Set the render queue group that terrains will be rendered into.
TerrainQuadTreeNode * mQuadTree
RealVector mLayerUVMultiplier
TerrainLayerDeclaration mLayerDecl
StringVector textureNames
List of texture names to import; must match with TerrainLayerDeclaration.
Alignment
The alignment of the terrain.
const Camera * mLastLODCamera
ImportData(const ImportData &rhs)
Utility class providing helper methods for reading / writing structured data held in a DataStream...
uint16 mNumLodLevelsPerLeafNode
vector< String >::type StringVector
uint16 mLayerBlendMapSizeActual
static const uint8 DERIVED_DATA_NORMALS
static const uint16 TERRAINDERIVEDDATA_CHUNK_VERSION
Rect mCompositeMapDirtyRect
uint16 maxBatchSize
Maximum batch size (along one edge) in vertices; must be 2^n+1 and <= 65.
vector< TerrainLayerBlendMap * >::type TerrainLayerBlendMapList
void setVisibilityFlags(uint32 flags)
Set the visbility flags that terrains will be rendered with.
Standard 3-dimensional vector.
uint16 getLightmapSize() const
Get the requested size of lightmap for this terrain.
Interface definition for a handler of responses.
Image * inputImage
Optional heightmap providing the initial heights for the terrain.
The definition of the information each layer will contain in this terrain.
Class representing an image file.
static NameGenerator msCompositeMapNameGenerator
int getHighestLodLoaded() const
Real getSkirtSize() const
The default size of 'skirts' used to hide terrain cracks (default 10)
TerrainMaterialGeneratorPtr mMaterialGenerator
PixelBox * mCpuTerrainNormalMap
Pending data.
An abstraction of a viewport, i.e.
uint32 getVisibilityFlags(void) const
Get the visibility flags for this terrain.
float * mHeightData
The height data (world coords relative to mPos)
uint8 * mCpuColourMapStorage
TerrainMaterialGeneratorPtr mDefaultMaterialGenerator
uint8 * mCpuCompositeMapStorage
unsigned long mLastMillis
void setLightMapDirection(const Vector3 &v)
Set the shadow map light direction to use (world space).
bool isHeightDataModified() const
Returns whether terrain heights have been modified since the terrain was first loaded / defined...
bool mMaterialParamsDirty
static const uint32 TERRAINLAYERSAMPLER_CHUNK_ID
Options class which just stores default options for the terrain.
PixelBox * normalMapBox
All CPU-side data, independent of textures; to be blitted in main thread.
ImportData & operator=(const ImportData &rhs)
uint32 getQueryFlags(void) const
Get the query flags for this terrain.
void setUseRayBoxDistanceCalculation(bool rb)
Sets whether to use an accurate ray / box intersection to determine distance from a terrain tile...
Terrain LOD data manager.
Rect mDirtyDerivedDataRect
void setDefaultResourceGroup(const String &grp)
Set the default resource group to use to load / save terrains.
TexturePtr mTerrainNormalMap
Texture storing normals for the whole terrrain.
static const uint16 TERRAINLAYERSAMPLERELEMENT_CHUNK_VERSION
LayerInstanceList layerList
List of layer structures, one for each layer required.
uint16 getCompositeMapSize() const
Get the default size of the composite maps for a new terrain.
Real inputScale
How to scale the input values provided (if any)
Geometry held in main memory.
Vector3 pos
Position of the terrain.
bool _getMorphRequired() const
Get whether LOD morphing is needed.
void setVisibilityFlags(uint32 flags)
Set the visibility flags for this terrain.
#define OGRE_FREE(ptr, category)
Free the memory allocated with OGRE_MALLOC or OGRE_ALLOC_T. Category is required to be restated to en...
uint16 getNumLodLevelsPerLeaf() const
Get the number of LOD levels in a leaf of the terrain quadtree.
GpuBufferAllocator * mCustomGpuBufferAllocator
static NameGenerator msLightmapNameGenerator
const String & getDefaultResourceGroup() const
Get the default resource group to use to load / save terrains.
DefaultGpuBufferAllocator mDefaultGpuBufferAllocator
Standard implementation of a buffer allocator which re-uses buffers.
virtual ~TerrainGlobalOptions()
uint16 mLayerBlendMapSize
#define OGRE_RW_MUTEX(name)
void setMaxPixelError(Real pixerr)
Set the maximum screen pixel error that should be allowed when rendering.
Real worldSize
The world size of the texture to be applied in this layer.
bool getUseRayBoxDistanceCalculation() const
Returns whether or not to use an accurate calculation of camera distance from a terrain tile (ray / A...
uint8 mDerivedUpdatePendingMask
If another update is requested while one is already running.
const TexturePtr & getGlobalColourMap() const
Get access to the global colour map, if enabled.
vector< uint8 * >::type BytePointerList
static const uint16 WORKQUEUE_GENERATE_MATERIAL_REQUEST
static const uint32 TERRAINLAYERDECLARATION_CHUNK_ID
A data holder for communicating with the background derived data update.
Real mBase
Base position in world space, relative to mPos.
map< uint32, HardwareIndexBufferSharedPtr >::type IBufMap
const MaterialPtr & _getCompositeMapMaterial() const
Internal getting of material for the terrain composite map.
float constantHeight
If neither inputImage or inputFloat are supplied, the constant height at which the initial terrain sh...
static const size_t LOD_MORPH_CUSTOM_PARAM
unsigned long mLastLODFrame
void setUseVertexCompressionWhenAvailable(bool enable)
Set whether to allow vertex compression to be used when the material generator states that it support...
Interface to a general purpose request / response style background work queue.
uint32 getVisibilityFlags(void) const
Get the visbility flags that terrains will be rendered with.
const TexturePtr & getCompositeMap() const
Get access to the composite map, if enabled (as requested by the material generator) ...
A primitive describing a volume (3D), image (2D) or line (1D) of pixels in memory.
uint8 getRenderQueueGroup(void) const
Get the render queue group that this terrain will be rendered into.
A node in a quad tree used to store a patch of terrain.
void setDefaultGlobalColourMapSize(uint16 sz)
Set the default size of the terrain global colour map for a new terrain.
virtual ~GpuBufferAllocator()
list< HardwareVertexBufferSharedPtr >::type VBufList
void setCompositeMapAmbient(const ColourValue &c)
Set the composite map ambient light to use.
Rect lightmapExtraDirtyRect
uint16 getLayerBlendMapSize() const
Get the requested size of the blend maps used to blend between layers for this terrain.
An instance of a layer, with specific texture names.
void setCompositeMapDiffuse(const ColourValue &c)
Set the composite map diffuse light to use.
uint16 mLightmapSizeActual
uint16 getCompositeMapSize() const
Get the requested size of composite map for this terrain.
SceneManager * getSceneManager() const
TerrainQuadTreeNode * getQuadTree()
Get the top level of the quad tree which is used to divide up the terrain.
static const uint16 TERRAINLAYERSAMPLER_CHUNK_VERSION
_OgreTerrainExport friend std::ostream & operator<<(std::ostream &o, const DerivedDataRequest &r)
Real inputBias
How to bias the input values provided (if any)
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).
static NameGenerator msNormalMapNameGenerator
TexturePtr getTerrainNormalMap() const
Get the (global) normal map texture.
static const uint32 TERRAINLAYERINSTANCE_CHUNK_ID
LayerInstanceList mLayers
Real getMaxPixelError() const
Get the maximum screen pixel error that should be allowed when rendering.
uint8 remainingTypeMask
Remaining types not yet processed.
Rect mDirtyGeometryRectForNeighbours
static const uint32 TERRAINGENERALINFO_CHUNK_ID
bool mPrepareInProgress
Don't release Height/DeltaData when preparing.
bool mGenerateMaterialInProgress
bool mCompositeMapRequired
const ColourValue & getCompositeMapDiffuse() const
Get the composite map iffuse light to use.
bool mLightMapShadowsOnly
Real getSkirtSize() const
The default size of 'skirts' used to hide terrain cracks (default 10, set for new Terrain using Terra...