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

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.