OGRE  1.9.0
Ogre::Terrain Class Reference

The main containing class for a chunk of terrain. More...

#include <OgreTerrain.h>

Inheritance diagram for Ogre::Terrain:

Classes

class  DefaultGpuBufferAllocator
 Standard implementation of a buffer allocator which re-uses buffers. More...
 
struct  DerivedDataRequest
 A data holder for communicating with the background derived data update. More...
 
struct  DerivedDataResponse
 A data holder for communicating with the background derived data update. More...
 
struct  GenerateMaterialRequest
 A data holder for communicating with the background GetMaterial. More...
 
class  GpuBufferAllocator
 Interface used to by the Terrain instance to allocate GPU buffers. More...
 
struct  ImportData
 Structure encapsulating import data that you may use to bootstrap the terrain without loading from a native data stream. More...
 
struct  LayerInstance
 An instance of a layer, with specific texture names. More...
 

Public Types

enum  Alignment { ALIGN_X_Z = 0 , ALIGN_X_Y = 1 , ALIGN_Y_Z = 2 }
 The alignment of the terrain. More...
 
typedef vector< LayerInstance >::type LayerInstanceList
 
enum  NeighbourIndex {
  NEIGHBOUR_EAST = 0 , NEIGHBOUR_NORTHEAST = 1 , NEIGHBOUR_NORTH = 2 , NEIGHBOUR_NORTHWEST = 3 ,
  NEIGHBOUR_WEST = 4 , NEIGHBOUR_SOUTHWEST = 5 , NEIGHBOUR_SOUTH = 6 , NEIGHBOUR_SOUTHEAST = 7 ,
  NEIGHBOUR_COUNT = 8
}
 Neighbour index enumeration - indexed anticlockwise from East like angles. More...
 
typedef vector< Real >::type RealVector
 
enum  Space { WORLD_SPACE = 0 , LOCAL_SPACE = 1 , TERRAIN_SPACE = 2 , POINT_SPACE = 3 }
 Enumeration of relative spaces that you might want to use to address the terrain. More...
 

Public Member Functions

 Terrain (SceneManager *sm)
 Constructor.
 
virtual ~Terrain ()
 
void _dirtyCompositeMapRect (const Rect &rect)
 Mark a region of the terrain composite map as dirty.
 
void _dumpTextures (const String &prefix, const String &suffix)
 Dump textures to files.
 
const MaterialPtr_getCompositeMapMaterial () const
 Internal getting of material for the terrain composite map.
 
const String_getDerivedResourceGroup () const
 Get the final resource group to use when loading / saving.
 
const MaterialPtr_getMaterial () const
 Internal getting of material.
 
bool _getMorphRequired () const
 Get whether LOD morphing is needed.
 
SceneNode_getRootSceneNode () const
 Get the root scene node for the terrain (internal use only)
 
bool _getUseVertexCompression () const
 Whether we're using vertex compression or not.
 
void _setCompositeMapRequired (bool compositeMap)
 Request internal implementation options for the terrain material to use, in this case a terrain-wide composite map.
 
void _setLightMapRequired (bool lightMap, bool shadowsOnly=false)
 Request internal implementation options for the terrain material to use, in this case a terrain-wide normal map.
 
void _setMorphRequired (bool morph)
 Request internal implementation options for the terrain material to use, in this case vertex morphing information.
 
void _setNormalMapRequired (bool normalMap)
 Request internal implementation options for the terrain material to use, in this case a terrain-wide normal map.
 
void addLayer (Real worldSize=0, const StringVector *textureNames=0)
 Add a new layer to this terrain.
 
void addLayer (uint8 index, Real worldSize=0, const StringVector *textureNames=0)
 Add a new layer to this terrain at a specific index.
 
void addQueryFlags (uint32 flags)
 As setQueryFlags, except the flags passed as parameters are appended to the existing flags on this object.
 
Rect calculateHeightDeltas (const Rect &rect)
 Calculate (or recalculate) the delta values of heights between a vertex in its recorded position, and the place it will end up in the LOD in which it is removed.
 
PixelBoxcalculateLightmap (const Rect &rect, const Rect &extraTargetRect, Rect &outFinalRect)
 Calculate (or recalculate) the terrain lightmap.
 
PixelBoxcalculateNormals (const Rect &rect, Rect &outFinalRect)
 Calculate (or recalculate) the normals on the terrain.
 
bool canHandleRequest (const WorkQueue::Request *req, const WorkQueue *srcQ)
 WorkQueue::RequestHandler override.
 
bool canHandleResponse (const WorkQueue::Response *res, const WorkQueue *srcQ)
 WorkQueue::ResponseHandler override.
 
Vector3 convertDirection (Space inSpace, const Vector3 &inDir, Space outSpace) const
 Convert a direction from one space to another with respect to this terrain.
 
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.
 
Vector3 convertPosition (Space inSpace, const Vector3 &inPos, Space outSpace) const
 Convert a position from one space to another with respect to this terrain.
 
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.
 
void decreaseLodLevel ()
 Removes highest LOD level loaded.
 
void dirty ()
 Mark the entire terrain as dirty.
 
void dirtyLightmap ()
 Mark a the entire lightmap as dirty.
 
void dirtyLightmapRect (const Rect &rect)
 Mark a region of the lightmap as dirty.
 
void dirtyRect (const Rect &rect)
 Mark a region of the terrain as dirty.
 
void finaliseHeightDeltas (const Rect &rect, bool cpuData)
 Finalise the height deltas.
 
void finaliseLightmap (const Rect &rect, PixelBox *lightmapBox)
 Finalise the lightmap.
 
void finaliseNormals (const Rect &rect, PixelBox *normalsBox)
 Finalise the normals.
 
void freeTemporaryResources ()
 Free as many resources as possible for optimal run-time memory use.
 
const AxisAlignedBoxgetAABB () const
 Get the AABB (local coords) of the entire terrain.
 
Alignment getAlignment () const
 Get the alignment of the terrain.
 
uint8 getBlendTextureCount () const
 Get the number of blend textures in use.
 
uint8 getBlendTextureCount (uint8 numLayers) const
 Get the number of blend textures needed for a given number of layers.
 
uint8 getBlendTextureIndex (uint8 layerIndex) const
 Get the index of the blend texture that a given layer uses.
 
const StringgetBlendTextureName (uint8 textureIndex) const
 Get the name of the packed blend texture at a specific index.
 
Real getBoundingRadius () const
 Get the bounding radius of the entire terrain.
 
const TexturePtrgetCompositeMap () const
 Get access to the composite map, if enabled (as requested by the material generator)
 
const MaterialPtrgetCompositeMapMaterial () const
 Get the material being used for the terrain composite map.
 
uint16 getCompositeMapSize () const
 Get the requested size of composite map for this terrain.
 
const float * getDeltaData () const
 Get a pointer to all the delta data for this terrain.
 
const float * getDeltaData (long x, long y) const
 Get a pointer to the delta data for a given point.
 
const TexturePtrgetGlobalColourMap () const
 Get access to the global colour map, if enabled.
 
bool getGlobalColourMapEnabled () const
 Get whether a global colour map is enabled on this terrain.
 
uint16 getGlobalColourMapSize () const
 Get the size of the global colour map (if used)
 
GpuBufferAllocatorgetGpuBufferAllocator ()
 Get the current buffer allocator.
 
float getHeightAtPoint (long x, long y) const
 Get the height data for a given terrain point.
 
float getHeightAtTerrainPosition (Real x, Real y) const
 Get the height data for a given terrain position.
 
float getHeightAtWorldPosition (const Vector3 &pos) const
 Get the height data for a given world position (projecting the point down on to the terrain).
 
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).
 
float * getHeightData () const
 Get a pointer to all the height data for this terrain.
 
float * getHeightData (long x, long y) const
 Get a pointer to the height data for a given point.
 
int getHighestLodLoaded () const
 
int getHighestLodPrepared () const
 
TerrainLayerBlendMapgetLayerBlendMap (uint8 layerIndex)
 Retrieve the layer blending map for a given layer, which may be used to edit the blending information for that layer.
 
uint16 getLayerBlendMapSize () const
 Get the requested size of the blend maps used to blend between layers for this terrain.
 
const TexturePtrgetLayerBlendTexture (uint8 index) const
 Get a blend texture with a given index.
 
std::pair< uint8, uint8getLayerBlendTextureIndex (uint8 layerIndex) const
 Get the texture index and colour channel of the blend information for a given layer.
 
uint8 getLayerCount () const
 Get the number of layers in this terrain.
 
const TerrainLayerDeclarationgetLayerDeclaration () const
 Get the declaration which describes the layers in this terrain.
 
const StringgetLayerTextureName (uint8 layerIndex, uint8 samplerIndex) const
 Get the name of the texture bound to a given index within a given layer.
 
Real getLayerUVMultiplier (uint8 index) const
 Get the layer UV multiplier.
 
Real getLayerWorldSize (uint8 index) const
 How large an area in world space the texture in a terrain layer covers before repeating.
 
const TexturePtrgetLightmap () const
 Get access to the lightmap, if enabled (as requested by the material generator)
 
uint16 getLightmapSize () const
 Get the requested size of lightmap for this terrain.
 
uint16 getLODLevelWhenVertexEliminated (long rowOrColulmn) const
 Utility method, get the first LOD Level at which this vertex is no longer included.
 
uint16 getLODLevelWhenVertexEliminated (long x, long y) const
 Utility method, get the first LOD Level at which this vertex is no longer included.
 
const MaterialPtrgetMaterial () const
 Get the material being used for the terrain.
 
const StringgetMaterialName () const
 Get the name of the material being used for the terrain.
 
uint16 getMaxBatchSize () const
 Get the maximum size in vertices along one side of a batch.
 
Real getMaxHeight () const
 Get the maximum height of the terrain.
 
uint8 getMaxLayers () const
 Get the maximum number of layers supported with the current options.
 
uint16 getMinBatchSize () const
 Get the minimum size in vertices along one side of a batch.
 
Real getMinHeight () const
 Get the minimum height of the terrain.
 
TerraingetNeighbour (NeighbourIndex index) const
 Retrieve the terrain's neighbour, or null if not present.
 
uint16 getNumLodLevels () const
 Get the total number of LOD levels in the terrain.
 
uint16 getNumLodLevelsPerLeaf () const
 Get the number of LOD levels in a leaf of the terrain quadtree.
 
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 more optimal).
 
void getPoint (long x, long y, Vector3 *outpos) const
 Get a Vector3 of the world-space point on the terrain, aligned as per options.
 
void getPointFromSelfOrNeighbour (long x, long y, Vector3 *outpos) const
 Get a Vector3 of the world-space point on the terrain, aligned as per options.
 
void getPointTransform (Matrix4 *outXform) const
 Get a transform which converts Vector4(xindex, yindex, height, 1) into an object-space position including scalings and alignment.
 
const Vector3getPosition () const
 Get the world position of the terrain centre.
 
void getPosition (const Vector3 &TSpos, Vector3 *outWSpos) const
 Convert a position from terrain basis space to world space.
 
void getPosition (Real x, Real y, Real z, Vector3 *outWSpos) const
 Convert a position from terrain basis space to world space.
 
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.
 
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.
 
TerrainQuadTreeNodegetQuadTree ()
 Get the top level of the quad tree which is used to divide up the terrain.
 
uint32 getQueryFlags (void) const
 Get the query flags for this terrain.
 
uint8 getRenderQueueGroup (void) const
 Get the render queue group that this terrain will be rendered into.
 
uint16 getResolutionAtLod (uint16 lodLevel) const
 Gets the resolution of the entire terrain (down one edge) at a given LOD level.
 
const StringgetResourceGroup () const
 Get the resource group to use when loading / saving.
 
SceneManagergetSceneManager () const
 
uint16 getSize () const
 Get the size of the terrain in vertices along one side.
 
Real getSkirtSize () const
 The default size of 'skirts' used to hide terrain cracks (default 10, set for new Terrain using TerrainGlobalOptions)
 
int getTargetLodLevel () const
 
TexturePtr getTerrainNormalMap () const
 Get the (global) normal map texture.
 
void getTerrainPosition (const Vector3 &WSpos, Vector3 *outTSpos) const
 Convert a position from world space to terrain basis space.
 
void getTerrainPosition (Real x, Real y, Real z, Vector3 *outTSpos) const
 Convert a position from world space to terrain basis space.
 
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.
 
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.
 
void getTerrainVector (const Vector3 &inVec, Vector3 *outVec) const
 Translate a vector from world space to local terrain space based on the alignment options.
 
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.
 
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.
 
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.
 
void getVector (const Vector3 &inVec, Vector3 *outVec) const
 Translate a vector into world space based on the alignment options.
 
void getVector (Real x, Real y, Real z, Vector3 *outVec) const
 Translate a vector into world space based on the alignment options.
 
void getVectorAlign (const Vector3 &inVec, Alignment align, Vector3 *outVec) const
 Translate a vector into world space based on a specified alignment.
 
void getVectorAlign (Real x, Real y, Real z, Alignment align, Vector3 *outVec) const
 Translate a vector into world space based on a specified alignment.
 
uint32 getVisibilityFlags (void) const
 Get the visibility flags for this terrain.
 
AxisAlignedBox getWorldAABB () const
 Get the AABB (world coords) of the entire terrain.
 
Real getWorldSize () const
 Get the size of the terrain in world units.
 
void handleGenerateMaterialResponse (const WorkQueue::Response *res, const WorkQueue *srcQ)
 Handler for GenerateMaterial.
 
WorkQueue::ResponsehandleRequest (const WorkQueue::Request *req, const WorkQueue *srcQ)
 WorkQueue::RequestHandler override.
 
void handleResponse (const WorkQueue::Response *res, const WorkQueue *srcQ)
 WorkQueue::ResponseHandler override.
 
void increaseLodLevel (bool synchronous=false)
 Increase Terrain's LOD level by 1.
 
bool isDerivedDataUpdateInProgress () const
 Query whether a derived data update is in progress or not.
 
bool isHeightDataModified () const
 Returns whether terrain heights have been modified since the terrain was first loaded / defined.
 
bool isLoaded () const
 Return whether the terrain is loaded.
 
bool isModified () const
 Returns whether this terrain has been modified since it was first loaded / defined.
 
void load (const String &filename)
 Prepare and load the terrain in one simple call from a standalone file.
 
void load (int lodLevel=0, bool synchronous=true)
 Load the terrain based on the data already populated via prepare methods.
 
void load (StreamSerialiser &stream)
 Prepare and load the terrain in one simple call from a stream.
 
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.
 
void notifyNeighbours ()
 Tell this instance to notify all neighbours that will be affected by a height change that has taken place.
 
 OGRE_RW_MUTEX (mNeighbourMutex)
 
void operator delete (void *ptr)
 
void operator delete (void *ptr)
 
void operator delete (void *ptr, const char *, int, const char *)
 
void operator delete (void *ptr, const char *, int, const char *)
 
void operator delete (void *ptr, void *)
 
void operator delete (void *ptr, void *)
 
void operator delete[] (void *ptr)
 
void operator delete[] (void *ptr)
 
void operator delete[] (void *ptr, const char *, int, const char *)
 
void operator delete[] (void *ptr, const char *, int, const char *)
 
void * operator new (size_t sz)
 
void * operator new (size_t sz)
 
void * operator new (size_t sz, const char *file, int line, const char *func)
 operator new, with debug line info
 
void * operator new (size_t sz, const char *file, int line, const char *func)
 operator new, with debug line info
 
void * operator new (size_t sz, void *ptr)
 placement operator new
 
void * operator new (size_t sz, void *ptr)
 placement operator new
 
void * operator new[] (size_t sz)
 
void * operator new[] (size_t sz)
 
void * operator new[] (size_t sz, const char *file, int line, const char *func)
 array operator new, with debug line info
 
void * operator new[] (size_t sz, const char *file, int line, const char *func)
 array operator new, with debug line info
 
virtual void postFindVisibleObjects (SceneManager *source, IlluminationRenderStage irs, Viewport *v)
 Called after searching for visible objects in this SceneManager.
 
virtual void postUpdateSceneGraph (SceneManager *source, Camera *camera)
 Called after updating the scene graph in this SceneManager.
 
void preFindVisibleObjects (SceneManager *source, SceneManager::IlluminationRenderStage irs, Viewport *v)
 Overridden from SceneManager::Listener.
 
bool prepare (const ImportData &importData)
 Prepare the terrain from some import data rather than loading from native data.
 
bool prepare (const String &filename)
 Prepare the terrain from a standalone file.
 
bool prepare (DataStreamPtr &stream)
 Prepare terrain data from saved data.
 
bool prepare (StreamSerialiser &stream)
 Prepare terrain data from saved data.
 
virtual void preUpdateSceneGraph (SceneManager *source, Camera *camera)
 Called prior to updating the scene graph in this SceneManager.
 
std::pair< bool, Vector3rayIntersects (const Ray &ray, bool cascadeToNeighbours=false, Real distanceLimit=0)
 Test for intersection of a given ray with the terrain.
 
TerrainraySelectNeighbour (const Ray &ray, Real distanceLimit=0)
 Utility method to pick a neighbour based on a ray.
 
void removeLayer (uint8 index)
 Remove a layer from the terrain.
 
void removeQueryFlags (uint32 flags)
 
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.
 
void save (const String &filename)
 Save terrain data in native form to a standalone file.
 
void save (StreamSerialiser &stream)
 Save terrain data in native form to a serializing stream.
 
void sceneManagerDestroyed (SceneManager *source)
 Overridden from SceneManager::Listener.
 
void setGlobalColourMapEnabled (bool enabled, uint16 size=0)
 Set whether a global colour map is enabled.
 
void setGpuBufferAllocator (GpuBufferAllocator *alloc)
 Tell this instance to use the given GpuBufferAllocator.
 
void setHeightAtPoint (long x, long y, float h)
 Set the height data for a given terrain point.
 
void setLayerTextureName (uint8 layerIndex, uint8 samplerIndex, const String &textureName)
 Set the name of the texture bound to a given index within a given layer.
 
void setLayerWorldSize (uint8 index, Real size)
 How large an area in world space the texture in a terrain layer covers before repeating.
 
void setNeighbour (NeighbourIndex index, Terrain *neighbour, bool recalculate=false, bool notifyOther=true)
 Set a terrain's neighbour, or null to detach one.
 
void setPosition (const Vector3 &pos)
 Set the position of the terrain centre in world coordinates.
 
void setQueryFlags (uint32 flags)
 Set the query flags for this terrain.
 
void setRenderQueueGroup (uint8 grp)
 Set the render queue group that this terrain will be rendered into.
 
void setResourceGroup (const String &resGroup)
 Set the resource group to use when loading / saving.
 
void setSize (uint16 newSize)
 Set the size of terrain in vertices along one side.
 
void setVisibilityFlags (uint32 flags)
 Set the visibility flags for this terrain.
 
void setWorldSize (Real newWorldSize)
 Set the world size of terrain.
 
virtual void shadowTextureCasterPreViewProj (Light *light, Camera *camera, size_t iteration)
 This event occurs just before the view & projection matrices are set for rendering into a shadow texture.
 
virtual void shadowTextureReceiverPreViewProj (Light *light, Frustum *frustum)
 This event occurs just before the view & projection matrices are set for re-rendering a shadow receiver.
 
virtual void shadowTexturesUpdated (size_t numberOfShadowTextures)
 Event raised after all shadow textures have been rendered into for all queues / targets but before any other geometry has been rendered (including main scene geometry and any additional shadow receiver passes).
 
virtual bool sortLightsAffectingFrustum (LightList &lightList)
 Hook to allow the listener to override the ordering of lights for the entire frustum.
 
void unload ()
 Unload the terrain and free GPU resources.
 
void unprepare ()
 Free CPU resources created during prepare methods.
 
void update (bool synchronous=false)
 Trigger the update process for the terrain.
 
void updateCompositeMap ()
 Performs an update on the terrain composite map based on its dirty region.
 
void updateCompositeMapWithDelay (Real delay=2)
 Performs an update on the terrain composite map based on its dirty region, but only at a maximum frequency.
 
void updateDerivedData (bool synchronous=false, uint8 typeMask=0xFF)
 Updates derived data for the terrain (LOD, lighting) to reflect changed height data, in a separate thread if threading is enabled (OGRE_THREAD_SUPPORT).
 
void updateGeometry ()
 Performs an update on the terrain geometry based on the dirty region.
 
void updateGeometryWithoutNotifyNeighbours ()
 Performs an update on the terrain geometry based on the dirty region.
 
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 / max heights to extrude manually.
 
void widenRectByVector (const Vector3 &vec, const Rect &inRect, Rect &outRect)
 Widen a rectangular area of terrain to take into account an extrusion vector.
 

Static Public Member Functions

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.
 
static size_t _getNumIndexesForBatchSize (uint16 batchSize)
 Utility method to get the number of indexes required to render a given batch.
 
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.
 
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.
 
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)
 
static NeighbourIndex getNeighbourIndex (long offsetx, long offsety)
 Get the neighbour enum for a given offset in a grid (signed).
 
static NeighbourIndex getOppositeNeighbour (NeighbourIndex index)
 Get the opposite neighbour relationship (useful for finding the neighbour index from the perspective of the tile the other side of the boundary).
 
static bool readLayerDeclaration (StreamSerialiser &ser, TerrainLayerDeclaration &targetdecl)
 Utility method to read a layer declaration from a stream.
 
static bool readLayerInstanceList (StreamSerialiser &ser, size_t numSamplers, Terrain::LayerInstanceList &targetlst)
 Utility method to read a layer instance list from a stream.
 
static void writeLayerDeclaration (const TerrainLayerDeclaration &decl, StreamSerialiser &ser)
 Utility method to write a layer declaration to a stream.
 
static void writeLayerInstanceList (const Terrain::LayerInstanceList &lst, StreamSerialiser &ser)
 Utility method to write a layer instance list to a stream.
 

Static Public Attributes

static const uint8 DERIVED_DATA_ALL
 
static const uint8 DERIVED_DATA_DELTAS
 
static const uint8 DERIVED_DATA_LIGHTMAP
 
static const uint8 DERIVED_DATA_NORMALS
 
static const size_t LOD_MORPH_CUSTOM_PARAM
 
static const uint32 TERRAIN_CHUNK_ID
 
static const uint16 TERRAIN_CHUNK_VERSION
 
static const uint64 TERRAIN_GENERATE_MATERIAL_INTERVAL_MS
 
static const uint16 TERRAIN_MAX_BATCH_SIZE
 
static const uint32 TERRAINDERIVEDDATA_CHUNK_ID
 
static const uint16 TERRAINDERIVEDDATA_CHUNK_VERSION
 
static const uint32 TERRAINGENERALINFO_CHUNK_ID
 
static const uint16 TERRAINGENERALINFO_CHUNK_VERSION
 
static const uint32 TERRAINLAYERDECLARATION_CHUNK_ID
 
static const uint16 TERRAINLAYERDECLARATION_CHUNK_VERSION
 
static const uint32 TERRAINLAYERINSTANCE_CHUNK_ID
 
static const uint16 TERRAINLAYERINSTANCE_CHUNK_VERSION
 
static const uint32 TERRAINLAYERSAMPLER_CHUNK_ID
 
static const uint16 TERRAINLAYERSAMPLER_CHUNK_VERSION
 
static const uint32 TERRAINLAYERSAMPLERELEMENT_CHUNK_ID
 
static const uint16 TERRAINLAYERSAMPLERELEMENT_CHUNK_VERSION
 
static const uint16 WORKQUEUE_DERIVED_DATA_REQUEST
 
static const uint16 WORKQUEUE_GENERATE_MATERIAL_REQUEST
 

Protected Types

typedef vector< uint8 * >::type BytePointerList
 
enum  GenerateMaterialStage { GEN_MATERIAL , GEN_COMPOSITE_MAP_MATERIAL }
 
typedef vector< TexturePtr >::type TexturePtrList
 

Protected Member Functions

void calculateCurrentLod (Viewport *vp)
 
void checkDeclaration ()
 
void checkLayers (bool includeGPUResources)
 
std::pair< bool, Vector3checkQuadIntersection (int x, int y, const Ray &ray)
 Test a single quad of the terrain for ray intersection.
 
void clearGPUBlendChannel (uint8 index, uint channel)
 Reset a blend channel back to full black.
 
void convertSpace (Space inSpace, const Vector3 &inVec, Space outSpace, Vector3 &outVec, bool translation) const
 
Vector3 convertTerrainToWorldAxes (const Vector3 &inVec) const
 
Vector3 convertWorldToTerrainAxes (const Vector3 &inVec) const
 
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 same texture.
 
void copyGlobalOptions ()
 
void createGPUBlendTextures ()
 
void createLayerBlendMaps ()
 
void createOrDestroyGPUColourMap ()
 
void createOrDestroyGPUCompositeMap ()
 
void createOrDestroyGPULightmap ()
 
void createOrDestroyGPUNormalMap ()
 
void deleteBlendMaps (uint8 lowIndex)
 Delete blend maps for all layers >= lowIndex.
 
void deriveUVMultipliers ()
 
void determineLodLevels ()
 
void distributeVertexData ()
 
void freeCPUResources ()
 
void freeGPUResources ()
 
void freeLodData ()
 
PixelFormat getBlendTextureFormat (uint8 textureIndex, uint8 numLayers) const
 
size_t getDeltaBufVertexSize () const
 
void getEdgeRect (NeighbourIndex index, long range, Rect *outRect) const
 
uint getGeoDataSizeAtLod (uint16 lodLevel) const
 Gets the data size at a given LOD level.
 
void getNeighbourEdgeRect (NeighbourIndex index, const Rect &inRect, Rect *outRect) const
 
void getNeighbourPoint (NeighbourIndex index, long x, long y, long *outx, long *outy) const
 
void getNeighbourPointOverflow (long x, long y, NeighbourIndex *outindex, long *outx, long *outy) const
 
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.
 
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 more optimal).
 
size_t getPositionBufVertexSize () const
 
int getPositiveLodLevel (int lodLevel) const
 Get the real lod level.
 
void removeFromNeighbours ()
 Removes this terrain instance from neighbouring terrain's list of neighbours.
 
void shiftDownGPUBlendChannels (uint8 index)
 Shift/slide all GPU blend texture channels > index down one slot. Blend data may shift into the previous texture.
 
void shiftUpGPUBlendChannels (uint8 index)
 Shift/slide all GPU blend texture channels > index up one slot. Blend data may shift into the next texture.
 
void updateBaseScale ()
 
void updateDerivedDataImpl (const Rect &rect, const Rect &lightmapExtraRect, bool synchronous, uint8 typeMask)
 
void waitForDerivedProcesses ()
 

Protected Attributes

Alignment mAlign
 
Real mBase
 Base position in world space, relative to mPos.
 
TexturePtrList mBlendTextureList
 
TexturePtr mColourMap
 
TexturePtr mCompositeMap
 
Rect mCompositeMapDirtyRect
 
bool mCompositeMapDirtyRectLightmapUpdate
 True if the updates included lightmap changes (widen)
 
MaterialPtr mCompositeMapMaterial
 
bool mCompositeMapRequired
 
uint16 mCompositeMapSize
 
uint16 mCompositeMapSizeActual
 
unsigned long mCompositeMapUpdateCountdown
 
BytePointerList mCpuBlendMapStorage
 Staging post for blend map data.
 
uint8mCpuColourMapStorage
 
uint8mCpuCompositeMapStorage
 
uint8mCpuLightmapStorage
 
PixelBoxmCpuTerrainNormalMap
 Pending data.
 
GpuBufferAllocatormCustomGpuBufferAllocator
 
DefaultGpuBufferAllocator mDefaultGpuBufferAllocator
 
float * mDeltaData
 The delta information defining how a vertex moves before it is removed at a lower LOD.
 
bool mDerivedDataUpdateInProgress
 
uint8 mDerivedUpdatePendingMask
 If another update is requested while one is already running.
 
Rect mDirtyDerivedDataRect
 
Rect mDirtyGeometryRect
 
Rect mDirtyGeometryRectForNeighbours
 
Rect mDirtyLightmapFromNeighboursRect
 
bool mGenerateMaterialInProgress
 
bool mGlobalColourMapEnabled
 
uint16 mGlobalColourMapSize
 
float * mHeightData
 The height data (world coords relative to mPos)
 
bool mHeightDataModified
 
bool mIsLoaded
 
const CameramLastLODCamera
 
unsigned long mLastLODFrame
 
unsigned long mLastMillis
 
int mLastViewportHeight
 
TerrainLayerBlendMapList mLayerBlendMapList
 
uint16 mLayerBlendMapSize
 
uint16 mLayerBlendMapSizeActual
 
TerrainLayerDeclaration mLayerDecl
 
LayerInstanceList mLayers
 
RealVector mLayerUVMultiplier
 
TexturePtr mLightmap
 
bool mLightMapRequired
 
bool mLightMapShadowsOnly
 
uint16 mLightmapSize
 
uint16 mLightmapSizeActual
 
TerrainLodManagermLodManager
 
bool mLodMorphRequired
 
MaterialPtr mMaterial
 
bool mMaterialDirty
 
unsigned long long int mMaterialGenerationCount
 
TerrainMaterialGeneratorPtr mMaterialGenerator
 
String mMaterialName
 
bool mMaterialParamsDirty
 
uint16 mMaxBatchSize
 
uint16 mMinBatchSize
 
bool mModified
 
TerrainmNeighbours [NEIGHBOUR_COUNT]
 
bool mNormalMapRequired
 
uint16 mNumLodLevels
 
uint16 mNumLodLevelsPerLeafNode
 
Vector3 mPos
 
bool mPrepareInProgress
 Don't release Height/DeltaData when preparing.
 
TerrainQuadTreeNodemQuadTree
 
uint32 mQueryFlags
 
uint8 mRenderQueueGroup
 
String mResourceGroup
 
SceneNodemRootNode
 
Real mScale
 Relationship between one point on the terrain and world size.
 
SceneManagermSceneMgr
 
uint16 mSize
 
Real mSkirtSize
 
TexturePtr mTerrainNormalMap
 Texture storing normals for the whole terrrain.
 
uint16 mTreeDepth
 
uint32 mVisibilityFlags
 
uint16 mWorkQueueChannel
 
Real mWorldSize
 

Static Protected Attributes

static NameGenerator msBlendTextureGenerator
 
static NameGenerator msCompositeMapNameGenerator
 
static NameGenerator msLightmapNameGenerator
 
static NameGenerator msNormalMapNameGenerator
 

Friends

class TerrainLodManager
 

Detailed Description

The main containing class for a chunk of terrain.

Terrain can be edited and stored. The data format for this in a file is:
TerrainData (Identifier 'TERR')
[Version 1]
Name Type Description
Terrain orientation uint8 The orientation of the terrain; XZ = 0, XY = 1, YZ = 2
Terrain size uint16 The number of vertices along one side of the terrain
Terrain world size Real The world size of one side of the terrain
Max batch size uint16 The maximum batch size in vertices along one side
Min batch size uint16 The minimum batch size in vertices along one side
Position Vector3 The location of the centre of the terrain
Height data float[size*size] List of floating point heights
LayerDeclaration LayerDeclaration* The layer declaration for this terrain (see below)
Layer count uint8 The number of layers in this terrain
LayerInstance list LayerInstance* A number of LayerInstance definitions based on layer count (see below)
Layer blend map size uint16 The size of the layer blend maps as stored in this file
Packed blend texture data uint8* layerCount-1 sets of blend texture data interleaved as either RGB or RGBA depending on layer count
Optional derived map data TerrainDerivedMap list 0 or more sets of map data derived from the original terrain
Delta data float[size*size] At each vertex, delta information for the LOD at which this vertex disappears
Quadtree delta data float[quadtrees*lods] At each quadtree node, for each lod a record of the max delta value in the region
TerrainLayerDeclaration (Identifier 'TDCL')
[Version 1]
Name Type Description
TerrainLayerSampler Count uint8 Number of samplers in this declaration
TerrainLayerSampler List TerrainLayerSampler* List of TerrainLayerSampler structures
Sampler Element Count uint8 Number of sampler elements in this declaration
TerrainLayerSamplerElement List TerrainLayerSamplerElement* List of TerrainLayerSamplerElement structures
TerrainLayerSampler (Identifier 'TSAM')
[Version 1]
Name Type Description
Alias String Alias name of this sampler
Format uint8 Desired pixel format
TerrainLayerSamplerElement (Identifier 'TSEL')
[Version 1]
Name Type Description
Source uint8 Sampler source index
Semantic uint8 Semantic interpretation of this element
Element start uint8 Start of this element in the sampler
Element count uint8 Number of elements in the sampler used by this entry
LayerInstance (Identifier 'TLIN')
[Version 1]
Name Type Description
World size Real The world size of this layer (determines UV scaling)
Texture list String* List of texture names corresponding to the number of samplers in the layer declaration
TerrainDerivedData (Identifier 'TDDA')
[Version 1]
Name Type Description
Derived data type name String Name of the derived data type ('normalmap', 'lightmap', 'colourmap', 'compositemap')
Size uint16 Size of the data along one edge
Data varies based on type The data

Definition at line 262 of file OgreTerrain.h.

Member Typedef Documentation

◆ BytePointerList

typedef vector<uint8*>::type Ogre::Terrain::BytePointerList
protected

Definition at line 1822 of file OgreTerrain.h.

◆ LayerInstanceList

Definition at line 308 of file OgreTerrain.h.

◆ RealVector

Definition at line 294 of file OgreTerrain.h.

◆ TexturePtrList

Definition at line 1825 of file OgreTerrain.h.

Member Enumeration Documentation

◆ Alignment

The alignment of the terrain.

Enumerator
ALIGN_X_Z 

Terrain is in the X/Z plane.

ALIGN_X_Y 

Terrain is in the X/Y plane.

ALIGN_Y_Z 

Terrain is in the Y/Z plane.

Definition at line 311 of file OgreTerrain.h.

◆ GenerateMaterialStage

Enumerator
GEN_MATERIAL 
GEN_COMPOSITE_MAP_MATERIAL 

Definition at line 1798 of file OgreTerrain.h.

◆ NeighbourIndex

Neighbour index enumeration - indexed anticlockwise from East like angles.

Enumerator
NEIGHBOUR_EAST 
NEIGHBOUR_NORTHEAST 
NEIGHBOUR_NORTH 
NEIGHBOUR_NORTHWEST 
NEIGHBOUR_WEST 
NEIGHBOUR_SOUTHWEST 
NEIGHBOUR_SOUTH 
NEIGHBOUR_SOUTHEAST 
NEIGHBOUR_COUNT 

Definition at line 496 of file OgreTerrain.h.

◆ Space

Enumeration of relative spaces that you might want to use to address the terrain.

Enumerator
WORLD_SPACE 

Simple global world space, axes and positions are all in world space.

LOCAL_SPACE 

As world space, but positions are relative to the terrain world position.

TERRAIN_SPACE 

x & y are parametric values on the terrain from 0 to 1, with the origin at the bottom left.

z is the world space height at that point.

POINT_SPACE 

x & y are integer points on the terrain from 0 to size-1, with the origin at the bottom left.

z is the world space height at that point.

Definition at line 513 of file OgreTerrain.h.

Constructor & Destructor Documentation

◆ Terrain()

◆ ~Terrain()

virtual Ogre::Terrain::~Terrain ( )
virtual

Member Function Documentation

◆ _calcSkirtVertexIndex()

static uint16 Ogre::Terrain::_calcSkirtVertexIndex ( uint16 mainIndex,
uint16 vdatasize,
bool isCol,
uint16 numSkirtRowsCols,
uint16 skirtRowColSkip )
static

Utility method to calculate the skirt index for a given original vertex index.

◆ _dirtyCompositeMapRect()

void Ogre::Terrain::_dirtyCompositeMapRect ( const Rect & rect)

Mark a region of the terrain composite map as dirty.

Remarks
You don't usually need to call this directly, it is inferred from changing the other data on the terrain.

◆ _dumpTextures()

void Ogre::Terrain::_dumpTextures ( const String & prefix,
const String & suffix )

Dump textures to files.

Remarks
This is a debugging method.

◆ _getCompositeMapMaterial()

const MaterialPtr & Ogre::Terrain::_getCompositeMapMaterial ( ) const

Internal getting of material for the terrain composite map.

Definition at line 1331 of file OgreTerrain.h.

References mCompositeMapMaterial.

◆ _getDerivedResourceGroup()

const String & Ogre::Terrain::_getDerivedResourceGroup ( ) const

Get the final resource group to use when loading / saving.

◆ _getMaterial()

const MaterialPtr & Ogre::Terrain::_getMaterial ( ) const

Internal getting of material.

Definition at line 1327 of file OgreTerrain.h.

References mMaterial.

◆ _getMorphRequired()

bool Ogre::Terrain::_getMorphRequired ( ) const

Get whether LOD morphing is needed.

Definition at line 1477 of file OgreTerrain.h.

References mLodMorphRequired.

◆ _getNumIndexesForBatchSize()

static size_t Ogre::Terrain::_getNumIndexesForBatchSize ( uint16 batchSize)
static

Utility method to get the number of indexes required to render a given batch.

◆ _getRootSceneNode()

SceneNode * Ogre::Terrain::_getRootSceneNode ( ) const

Get the root scene node for the terrain (internal use only)

◆ _getUseVertexCompression()

bool Ogre::Terrain::_getUseVertexCompression ( ) const

Whether we're using vertex compression or not.

◆ _populateIndexBuffer()

static void Ogre::Terrain::_populateIndexBuffer ( uint16 * pIndexes,
uint16 batchSize,
uint16 vdatasize,
size_t vertexIncrement,
uint16 xoffset,
uint16 yoffset,
uint16 numSkirtRowsCols,
uint16 skirtRowColSkip )
static

Utility method to populate a (locked) index buffer.

Parameters
pIndexesPointer to an index buffer to populate
batchSizeThe number of vertices down one side of the batch
vdatasizeThe number of vertices down one side of the vertex data being referenced
vertexIncrementThe number of vertices to increment for each new indexed row / column
xoffsetThe x offset from the start of the vertex data being referenced
yoffsetThe y offset from the start of the vertex data being referenced
numSkirtRowsColsNumber of rows and columns of skirts
skirtRowColSkipThe number of rows / cols to skip in between skirts

◆ _setCompositeMapRequired()

void Ogre::Terrain::_setCompositeMapRequired ( bool compositeMap)

Request internal implementation options for the terrain material to use, in this case a terrain-wide composite map.

The TerrainMaterialGenerator should call this method to specify the options it would like to use when creating a material. Not all the data is guaranteed to be up to date on return from this method - for example some maps may be generated in the background. However, on return from this method all the features that are requested will be referenceable by materials, the data may just take a few frames to be fully populated.

Parameters
compositeMapWhether a terrain-wide composite map is needed. A composite map is a texture with all of the blending and lighting baked in, such that at distance this texture can be used as an approximation of the multi-layer blended material. It is actually up to the material generator to render this composite map, because obviously precisely what it looks like depends on what the main material looks like. For this reason, the composite map is one piece of derived terrain data that is always calculated in the render thread, and usually on the GPU. It is expected that if this option is requested, the material generator will use it to construct distant LOD techniques.

◆ _setLightMapRequired()

void Ogre::Terrain::_setLightMapRequired ( bool lightMap,
bool shadowsOnly = false )

Request internal implementation options for the terrain material to use, in this case a terrain-wide normal map.

The TerrainMaterialGenerator should call this method to specify the options it would like to use when creating a material. Not all the data is guaranteed to be up to date on return from this method - for example some maps may be generated in the background. However, on return from this method all the features that are requested will be referenceable by materials, the data may just take a few frames to be fully populated.

Parameters
lightMapWhether a terrain-wide lightmap including precalculated lighting is required (light direction in TerrainGlobalOptions)
shadowsOnlyIf true, the lightmap contains only shadows, no directional lighting intensity

◆ _setMorphRequired()

void Ogre::Terrain::_setMorphRequired ( bool morph)

Request internal implementation options for the terrain material to use, in this case vertex morphing information.

The TerrainMaterialGenerator should call this method to specify the options it would like to use when creating a material. Not all the data is guaranteed to be up to date on return from this method - for example som maps may be generated in the background. However, on return from this method all the features that are requested will be referenceable by materials, the data may just take a few frames to be fully populated.

Parameters
morphWhether LOD morphing information is required to be calculated

Definition at line 1475 of file OgreTerrain.h.

References mLodMorphRequired.

◆ _setNormalMapRequired()

void Ogre::Terrain::_setNormalMapRequired ( bool normalMap)

Request internal implementation options for the terrain material to use, in this case a terrain-wide normal map.

The TerrainMaterialGenerator should call this method to specify the options it would like to use when creating a material. Not all the data is guaranteed to be up to date on return from this method - for example some maps may be generated in the background. However, on return from this method all the features that are requested will be referenceable by materials, the data may just take a few frames to be fully populated.

Parameters
normalMapWhether a terrain-wide normal map is requested. This is usually mutually exclusive with the lightmap option.

◆ addLayer() [1/2]

void Ogre::Terrain::addLayer ( Real worldSize = 0,
const StringVector * textureNames = 0 )

Add a new layer to this terrain.

Parameters
worldSizeThe size of the texture in this layer in world units. Default to zero to use the default
textureNamesA list of textures to assign to the samplers in this layer. Leave blank to provide these later.

◆ addLayer() [2/2]

void Ogre::Terrain::addLayer ( uint8 index,
Real worldSize = 0,
const StringVector * textureNames = 0 )

Add a new layer to this terrain at a specific index.

Parameters
indexThe index at which to insert this layer (existing layers are shifted forwards)
worldSizeThe size of the texture in this layer in world units. Default to zero to use the default
textureNamesA list of textures to assign to the samplers in this layer. Leave blank to provide these later.

◆ addQueryFlags()

void Ogre::Terrain::addQueryFlags ( uint32 flags)

As setQueryFlags, except the flags passed as parameters are appended to the existing flags on this object.

Definition at line 1364 of file OgreTerrain.h.

References mQueryFlags.

◆ calculateCurrentLod()

void Ogre::Terrain::calculateCurrentLod ( Viewport * vp)
protected

◆ calculateHeightDeltas()

Rect Ogre::Terrain::calculateHeightDeltas ( const Rect & rect)

Calculate (or recalculate) the delta values of heights between a vertex in its recorded position, and the place it will end up in the LOD in which it is removed.

Parameters
rectRectangle describing the area in which heights have altered
Returns
A Rectangle describing the area which was updated (may be wider than the input rectangle)

◆ calculateLightmap()

PixelBox * Ogre::Terrain::calculateLightmap ( const Rect & rect,
const Rect & extraTargetRect,
Rect & outFinalRect )

Calculate (or recalculate) the terrain lightmap.

Parameters
rectRectangle describing the area of heights that were changed
extraTargetRectRectangle describing a target area of the terrain that needs to be calculated additionally (e.g. from a neighbour)
outFinalRectOutput rectangle describing the area updated in the lightmap
Returns
Pointer to a PixelBox full of lighting data (caller responsible for deletion)

◆ calculateNormals()

PixelBox * Ogre::Terrain::calculateNormals ( const Rect & rect,
Rect & outFinalRect )

Calculate (or recalculate) the normals on the terrain.

Parameters
rectRectangle describing the area of heights that were changed
outFinalRectOutput rectangle describing the area updated
Returns
Pointer to a PixelBox full of normals (caller responsible for deletion)

◆ canHandleRequest()

bool Ogre::Terrain::canHandleRequest ( const WorkQueue::Request * req,
const WorkQueue * srcQ )
virtual

◆ canHandleResponse()

bool Ogre::Terrain::canHandleResponse ( const WorkQueue::Response * res,
const WorkQueue * srcQ )
virtual

◆ checkDeclaration()

void Ogre::Terrain::checkDeclaration ( )
protected

◆ checkLayers()

void Ogre::Terrain::checkLayers ( bool includeGPUResources)
protected

◆ checkQuadIntersection()

std::pair< bool, Vector3 > Ogre::Terrain::checkQuadIntersection ( int x,
int y,
const Ray & ray )
protected

Test a single quad of the terrain for ray intersection.

◆ clearGPUBlendChannel()

void Ogre::Terrain::clearGPUBlendChannel ( uint8 index,
uint channel )
protected

Reset a blend channel back to full black.

◆ convertDirection() [1/2]

Vector3 Ogre::Terrain::convertDirection ( Space inSpace,
const Vector3 & inDir,
Space outSpace ) const

Convert a direction from one space to another with respect to this terrain.

Parameters
inSpaceThe space that inDir is expressed as
inDirThe incoming direction
outSpaceThe space which outDir should be expressed as
Returns
The output direction

◆ convertDirection() [2/2]

void Ogre::Terrain::convertDirection ( Space inSpace,
const Vector3 & inDir,
Space outSpace,
Vector3 & outDir ) const

Convert a direction from one space to another with respect to this terrain.

Parameters
inSpaceThe space that inDir is expressed as
inDirThe incoming direction
outSpaceThe space which outDir should be expressed as
outDirThe output direction to be populated

◆ convertPosition() [1/2]

Vector3 Ogre::Terrain::convertPosition ( Space inSpace,
const Vector3 & inPos,
Space outSpace ) const

Convert a position from one space to another with respect to this terrain.

Parameters
inSpaceThe space that inPos is expressed as
inPosThe incoming position
outSpaceThe space which outPos should be expressed as
Returns
The output position

◆ convertPosition() [2/2]

void Ogre::Terrain::convertPosition ( Space inSpace,
const Vector3 & inPos,
Space outSpace,
Vector3 & outPos ) const

Convert a position from one space to another with respect to this terrain.

Parameters
inSpaceThe space that inPos is expressed as
inPosThe incoming position
outSpaceThe space which outPos should be expressed as
outPosThe output position to be populated

◆ convertSpace()

void Ogre::Terrain::convertSpace ( Space inSpace,
const Vector3 & inVec,
Space outSpace,
Vector3 & outVec,
bool translation ) const
protected

◆ convertTerrainToWorldAxes() [1/2]

static void Ogre::Terrain::convertTerrainToWorldAxes ( Alignment align,
const Vector3 & terrainVec,
Vector3 * worldVec )
static

Utility method to convert axes from terrain space (xy terrain, z up) tp world space.

◆ convertTerrainToWorldAxes() [2/2]

Vector3 Ogre::Terrain::convertTerrainToWorldAxes ( const Vector3 & inVec) const
protected

◆ convertWorldToTerrainAxes() [1/2]

static void Ogre::Terrain::convertWorldToTerrainAxes ( Alignment align,
const Vector3 & worldVec,
Vector3 * terrainVec )
static

Utility method to convert axes from world space to terrain space (xy terrain, z up)

◆ convertWorldToTerrainAxes() [2/2]

Vector3 Ogre::Terrain::convertWorldToTerrainAxes ( const Vector3 & inVec) const
protected

◆ copyBlendTextureChannel()

void Ogre::Terrain::copyBlendTextureChannel ( uint8 srcIndex,
uint8 srcChannel,
uint8 destIndex,
uint8 destChannel )
protected

Copy a GPU blend channel from one source to another. Source and Dest are not required to be in the same texture.

◆ copyGlobalOptions()

void Ogre::Terrain::copyGlobalOptions ( )
protected

◆ createGPUBlendTextures()

void Ogre::Terrain::createGPUBlendTextures ( )
protected

◆ createLayerBlendMaps()

void Ogre::Terrain::createLayerBlendMaps ( )
protected

◆ createOrDestroyGPUColourMap()

void Ogre::Terrain::createOrDestroyGPUColourMap ( )
protected

◆ createOrDestroyGPUCompositeMap()

void Ogre::Terrain::createOrDestroyGPUCompositeMap ( )
protected

◆ createOrDestroyGPULightmap()

void Ogre::Terrain::createOrDestroyGPULightmap ( )
protected

◆ createOrDestroyGPUNormalMap()

void Ogre::Terrain::createOrDestroyGPUNormalMap ( )
protected

◆ decreaseLodLevel()

void Ogre::Terrain::decreaseLodLevel ( )

Removes highest LOD level loaded.

Remarks
If there is LOD level load in progress it's load is canceled instead of removal of already loaded one.

◆ deleteBlendMaps()

void Ogre::Terrain::deleteBlendMaps ( uint8 lowIndex)
protected

Delete blend maps for all layers >= lowIndex.

◆ deriveUVMultipliers()

void Ogre::Terrain::deriveUVMultipliers ( )
protected

◆ determineLodLevels()

void Ogre::Terrain::determineLodLevels ( )
protected

◆ dirty()

void Ogre::Terrain::dirty ( )

Mark the entire terrain as dirty.

By marking a section of the terrain as dirty, you are stating that you have changed the height data within this rectangle. This rectangle will be merged with any existing outstanding changes. To finalise the changes, you must call update(), updateGeometry(), or updateDerivedData().

◆ dirtyLightmap()

void Ogre::Terrain::dirtyLightmap ( )

Mark a the entire lightmap as dirty.

Remarks
You only need to call this if you need to tell the terrain to update the lightmap data for some reason other than the terrain geometry has changed. Changing terrain geometry automatically dirties the correct lightmap areas.
Note
The lightmap won't actually be updated until update() or updateDerivedData() is called.

◆ dirtyLightmapRect()

void Ogre::Terrain::dirtyLightmapRect ( const Rect & rect)

Mark a region of the lightmap as dirty.

Remarks
You only need to call this if you need to tell the terrain to update the lightmap data for some reason other than the terrain geometry has changed. Changing terrain geometry automatically dirties the correct lightmap areas.
Note
The lightmap won't actually be updated until update() or updateDerivedData() is called.

◆ dirtyRect()

void Ogre::Terrain::dirtyRect ( const Rect & rect)

Mark a region of the terrain as dirty.

By marking a section of the terrain as dirty, you are stating that you have changed the height data within this rectangle. This rectangle will be merged with any existing outstanding changes. To finalise the changes, you must call update(), updateGeometry(), or updateDerivedData().

Parameters
rectA rectangle expressed in vertices describing the dirty region; left < right, top < bottom, left & top are inclusive, right & bottom exclusive

◆ distributeVertexData()

void Ogre::Terrain::distributeVertexData ( )
protected

◆ finaliseHeightDeltas()

void Ogre::Terrain::finaliseHeightDeltas ( const Rect & rect,
bool cpuData )

Finalise the height deltas.

Calculated height deltas are kept in a separate calculation field to make them safe to perform in a background thread. This call promotes those calculations to the runtime values, and must be called in the main thread.

Parameters
rectRectangle describing the area to finalise
cpuDataWhen updating vertex data, update the CPU copy (background)

◆ finaliseLightmap()

void Ogre::Terrain::finaliseLightmap ( const Rect & rect,
PixelBox * lightmapBox )

Finalise the lightmap.

Calculating lightmaps is kept in a separate calculation area to make it safe to perform in a background thread. This call promotes those calculations to the runtime values, and must be called in the main thread.

Parameters
rectRectangle describing the area to finalise
lightmapBoxPointer to a PixelBox full of normals

◆ finaliseNormals()

void Ogre::Terrain::finaliseNormals ( const Rect & rect,
PixelBox * normalsBox )

Finalise the normals.

Calculated normals are kept in a separate calculation area to make them safe to perform in a background thread. This call promotes those calculations to the runtime values, and must be called in the main thread.

Parameters
rectRectangle describing the area to finalise
normalsBoxPointer to a PixelBox full of normals

◆ freeCPUResources()

void Ogre::Terrain::freeCPUResources ( )
protected

◆ freeGPUResources()

void Ogre::Terrain::freeGPUResources ( )
protected

◆ freeLodData()

void Ogre::Terrain::freeLodData ( )
protected

◆ freeTemporaryResources()

void Ogre::Terrain::freeTemporaryResources ( )

Free as many resources as possible for optimal run-time memory use.

Remarks
This class keeps some temporary storage around in order to make certain actions (such as editing) possible more quickly. Calling this method will cause as many of those resources as possible to be freed. You might want to do this for example when you are finished editing a particular terrain and want to have optimal runtime efficiency.

◆ getAABB()

const AxisAlignedBox & Ogre::Terrain::getAABB ( ) const

Get the AABB (local coords) of the entire terrain.

◆ getAlignment()

Alignment Ogre::Terrain::getAlignment ( ) const

Get the alignment of the terrain.

◆ getBlendTextureCount() [1/2]

uint8 Ogre::Terrain::getBlendTextureCount ( ) const

Get the number of blend textures in use.

◆ getBlendTextureCount() [2/2]

uint8 Ogre::Terrain::getBlendTextureCount ( uint8 numLayers) const

Get the number of blend textures needed for a given number of layers.

◆ getBlendTextureFormat()

PixelFormat Ogre::Terrain::getBlendTextureFormat ( uint8 textureIndex,
uint8 numLayers ) const
protected

◆ getBlendTextureIndex()

uint8 Ogre::Terrain::getBlendTextureIndex ( uint8 layerIndex) const

Get the index of the blend texture that a given layer uses.

Parameters
layerIndexThe layer index, must be >= 1 and less than the number of layers
Returns
The index of the shared blend texture

◆ getBlendTextureName()

const String & Ogre::Terrain::getBlendTextureName ( uint8 textureIndex) const

Get the name of the packed blend texture at a specific index.

Parameters
textureIndexThis is the blend texture index, not the layer index (multiple layers will share a blend texture)

◆ getBoundingRadius()

Real Ogre::Terrain::getBoundingRadius ( ) const

Get the bounding radius of the entire terrain.

◆ getCompositeMap()

const TexturePtr & Ogre::Terrain::getCompositeMap ( ) const

Get access to the composite map, if enabled (as requested by the material generator)

Definition at line 1093 of file OgreTerrain.h.

References mCompositeMap.

◆ getCompositeMapMaterial()

const MaterialPtr & Ogre::Terrain::getCompositeMapMaterial ( ) const

Get the material being used for the terrain composite map.

◆ getCompositeMapSize()

uint16 Ogre::Terrain::getCompositeMapSize ( ) const

Get the requested size of composite map for this terrain.

Note that where hardware limits this, the actual texture may be lower resolution. This option is derived from TerrainGlobalOptions when the terrain is created.

Definition at line 1090 of file OgreTerrain.h.

References mCompositeMapSize.

◆ getDeltaBufVertexSize()

size_t Ogre::Terrain::getDeltaBufVertexSize ( ) const
protected

◆ getDeltaData() [1/2]

const float * Ogre::Terrain::getDeltaData ( ) const

Get a pointer to all the delta data for this terrain.

Remarks
The delta data is a measure at a given vertex of by how much vertically a vertex will have to move to reach the point at which it will be removed in the next lower LOD.

◆ getDeltaData() [2/2]

const float * Ogre::Terrain::getDeltaData ( long x,
long y ) const

Get a pointer to the delta data for a given point.

◆ getEdgeRect()

void Ogre::Terrain::getEdgeRect ( NeighbourIndex index,
long range,
Rect * outRect ) const
protected

◆ getGeoDataSizeAtLod()

uint Ogre::Terrain::getGeoDataSizeAtLod ( uint16 lodLevel) const
protected

Gets the data size at a given LOD level.

◆ getGlobalColourMap()

const TexturePtr & Ogre::Terrain::getGlobalColourMap ( ) const

Get access to the global colour map, if enabled.

Definition at line 1421 of file OgreTerrain.h.

References mColourMap.

◆ getGlobalColourMapEnabled()

bool Ogre::Terrain::getGlobalColourMapEnabled ( ) const

Get whether a global colour map is enabled on this terrain.

Definition at line 1417 of file OgreTerrain.h.

References mGlobalColourMapEnabled.

◆ getGlobalColourMapSize()

uint16 Ogre::Terrain::getGlobalColourMapSize ( ) const

Get the size of the global colour map (if used)

Definition at line 1419 of file OgreTerrain.h.

References mGlobalColourMapSize.

◆ getGpuBufferAllocator()

GpuBufferAllocator * Ogre::Terrain::getGpuBufferAllocator ( )

Get the current buffer allocator.

◆ getHeightAtPoint()

float Ogre::Terrain::getHeightAtPoint ( long x,
long y ) const

Get the height data for a given terrain point.

Parameters
x,yDiscrete coordinates in terrain vertices, values from 0 to size-1, left/right bottom/top

◆ getHeightAtTerrainPosition()

float Ogre::Terrain::getHeightAtTerrainPosition ( Real x,
Real y ) const

Get the height data for a given terrain position.

Parameters
x,yPosition in terrain space, values from 0 to 1 left/right bottom/top

◆ getHeightAtWorldPosition() [1/2]

float Ogre::Terrain::getHeightAtWorldPosition ( const Vector3 & pos) const

Get the height data for a given world position (projecting the point down on to the terrain).

Parameters
posPosition in world space. Positions will be clamped to the edge of the terrain

◆ getHeightAtWorldPosition() [2/2]

float Ogre::Terrain::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).

Parameters
x,y,zPosition in world space. Positions will be clamped to the edge of the terrain

◆ getHeightData() [1/2]

float * Ogre::Terrain::getHeightData ( ) const

Get a pointer to all the height data for this terrain.

Remarks
The height data is in world coordinates, relative to the position of the terrain.
This pointer is not const, so you can update the height data if you wish. However, changes will not be propagated until you call Terrain::dirty or Terrain::dirtyRect.

◆ getHeightData() [2/2]

float * Ogre::Terrain::getHeightData ( long x,
long y ) const

Get a pointer to the height data for a given point.

◆ getHighestLodLoaded()

int Ogre::Terrain::getHighestLodLoaded ( ) const

Definition at line 1892 of file OgreTerrain.h.

References mLodManager.

◆ getHighestLodPrepared()

int Ogre::Terrain::getHighestLodPrepared ( ) const

Definition at line 1891 of file OgreTerrain.h.

References mLodManager.

◆ getLayerBlendMap()

TerrainLayerBlendMap * Ogre::Terrain::getLayerBlendMap ( uint8 layerIndex)

Retrieve the layer blending map for a given layer, which may be used to edit the blending information for that layer.

Note
You can only do this after the terrain has been loaded. You may edit the content of the blend layer in another thread, but you may only upload it in the main render thread.
Parameters
layerIndexThe layer index, which should be 1 or higher (since the bottom layer has no blending).
Returns
Pointer to the TerrainLayerBlendMap requested. The caller must not delete this instance, use freeTemporaryResources if you want to save the memory after completing your editing.

◆ getLayerBlendMapSize()

uint16 Ogre::Terrain::getLayerBlendMapSize ( ) const

Get the requested size of the blend maps used to blend between layers for this terrain.

Note that where hardware limits this, the actual blend maps may be lower resolution. This option is derived from TerrainGlobalOptions when the terrain is created.

Definition at line 1073 of file OgreTerrain.h.

References mLayerBlendMapSize.

◆ getLayerBlendTexture()

const TexturePtr & Ogre::Terrain::getLayerBlendTexture ( uint8 index) const

Get a blend texture with a given index.

Parameters
indexThe blend texture index (note: not layer index; derive the texture index from getLayerBlendTextureIndex)

◆ getLayerBlendTextureIndex()

std::pair< uint8, uint8 > Ogre::Terrain::getLayerBlendTextureIndex ( uint8 layerIndex) const

Get the texture index and colour channel of the blend information for a given layer.

Parameters
layerIndexThe index of the layer (1 or higher, layer 0 has no blend data)
Returns
A pair in which the first value is the texture index, and the second value is the colour channel (RGBA)

◆ getLayerCount()

uint8 Ogre::Terrain::getLayerCount ( ) const

Get the number of layers in this terrain.

Definition at line 989 of file OgreTerrain.h.

References mLayers.

◆ getLayerDeclaration()

const TerrainLayerDeclaration & Ogre::Terrain::getLayerDeclaration ( ) const

Get the declaration which describes the layers in this terrain.

Definition at line 992 of file OgreTerrain.h.

References mLayerDecl.

◆ getLayerTextureName()

const String & Ogre::Terrain::getLayerTextureName ( uint8 layerIndex,
uint8 samplerIndex ) const

Get the name of the texture bound to a given index within a given layer.

See the LayerDeclaration for a list of sampelrs within a layer.

Parameters
layerIndexThe layer index.
samplerIndexThe sampler index within a layer

◆ getLayerUVMultiplier()

Real Ogre::Terrain::getLayerUVMultiplier ( uint8 index) const

Get the layer UV multiplier.

Remarks
This is derived from the texture world size. The base UVs in the terrain vary from 0 to 1 and this multiplier is used (in a fixed-function texture coord scaling or a shader parameter) to translate it to the final value.
Parameters
indexThe layer index.

◆ getLayerWorldSize()

Real Ogre::Terrain::getLayerWorldSize ( uint8 index) const

How large an area in world space the texture in a terrain layer covers before repeating.

Parameters
indexThe layer index.

◆ getLightmap()

const TexturePtr & Ogre::Terrain::getLightmap ( ) const

Get access to the lightmap, if enabled (as requested by the material generator)

Definition at line 1083 of file OgreTerrain.h.

References mLightmap.

◆ getLightmapSize()

uint16 Ogre::Terrain::getLightmapSize ( ) const

Get the requested size of lightmap for this terrain.

Note that where hardware limits this, the actual lightmap may be lower resolution. This option is derived from TerrainGlobalOptions when the terrain is created.

Definition at line 1080 of file OgreTerrain.h.

References mLightmapSize.

◆ getLODLevelWhenVertexEliminated() [1/2]

uint16 Ogre::Terrain::getLODLevelWhenVertexEliminated ( long rowOrColulmn) const

Utility method, get the first LOD Level at which this vertex is no longer included.

◆ getLODLevelWhenVertexEliminated() [2/2]

uint16 Ogre::Terrain::getLODLevelWhenVertexEliminated ( long x,
long y ) const

Utility method, get the first LOD Level at which this vertex is no longer included.

◆ getMaterial()

const MaterialPtr & Ogre::Terrain::getMaterial ( ) const

Get the material being used for the terrain.

◆ getMaterialName()

const String & Ogre::Terrain::getMaterialName ( ) const

Get the name of the material being used for the terrain.

Definition at line 1334 of file OgreTerrain.h.

References mMaterialName.

◆ getMaxBatchSize()

uint16 Ogre::Terrain::getMaxBatchSize ( ) const

Get the maximum size in vertices along one side of a batch.

◆ getMaxHeight()

Real Ogre::Terrain::getMaxHeight ( ) const

Get the maximum height of the terrain.

◆ getMaxLayers()

uint8 Ogre::Terrain::getMaxLayers ( ) const

Get the maximum number of layers supported with the current options.

Note
When you change the options requested, this value can change.

◆ getMinBatchSize()

uint16 Ogre::Terrain::getMinBatchSize ( ) const

Get the minimum size in vertices along one side of a batch.

◆ getMinHeight()

Real Ogre::Terrain::getMinHeight ( ) const

Get the minimum height of the terrain.

◆ getNeighbour()

Terrain * Ogre::Terrain::getNeighbour ( NeighbourIndex index) const

Retrieve the terrain's neighbour, or null if not present.

Remarks
Terrains only know about their neighbours if they are notified via setNeighbour. This information is not saved with the terrain since every tile must be able to be independent.
Parameters
indexThe index of the neighbour

References Terrain().

◆ getNeighbourEdgeRect()

void Ogre::Terrain::getNeighbourEdgeRect ( NeighbourIndex index,
const Rect & inRect,
Rect * outRect ) const
protected

◆ getNeighbourIndex()

static NeighbourIndex Ogre::Terrain::getNeighbourIndex ( long offsetx,
long offsety )
static

Get the neighbour enum for a given offset in a grid (signed).

◆ getNeighbourPoint()

void Ogre::Terrain::getNeighbourPoint ( NeighbourIndex index,
long x,
long y,
long * outx,
long * outy ) const
protected

◆ getNeighbourPointOverflow()

void Ogre::Terrain::getNeighbourPointOverflow ( long x,
long y,
NeighbourIndex * outindex,
long * outx,
long * outy ) const
protected

◆ getNumLodLevels()

uint16 Ogre::Terrain::getNumLodLevels ( ) const

Get the total number of LOD levels in the terrain.

Definition at line 1237 of file OgreTerrain.h.

References mNumLodLevels.

◆ getNumLodLevelsPerLeaf()

uint16 Ogre::Terrain::getNumLodLevelsPerLeaf ( ) const

Get the number of LOD levels in a leaf of the terrain quadtree.

Definition at line 1240 of file OgreTerrain.h.

References mNumLodLevelsPerLeafNode.

◆ getOppositeNeighbour()

static NeighbourIndex Ogre::Terrain::getOppositeNeighbour ( NeighbourIndex index)
static

Get the opposite neighbour relationship (useful for finding the neighbour index from the perspective of the tile the other side of the boundary).

◆ getPoint() [1/2]

void Ogre::Terrain::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 more optimal).

Note
This point is relative to Terrain::getPosition

◆ getPoint() [2/2]

void Ogre::Terrain::getPoint ( long x,
long y,
Vector3 * outpos ) const

Get a Vector3 of the world-space point on the terrain, aligned as per options.

Note
This point is relative to Terrain::getPosition

◆ getPointAlign() [1/2]

void Ogre::Terrain::getPointAlign ( long x,
long y,
Alignment align,
Vector3 * outpos ) const
protected

Get a Vector3 of the world-space point on the terrain, aligned Y-up always.

Note
This point is relative to Terrain::getPosition

◆ getPointAlign() [2/2]

void Ogre::Terrain::getPointAlign ( long x,
long y,
float height,
Alignment align,
Vector3 * outpos ) const
protected

Get a Vector3 of the world-space point on the terrain, supplying the height data manually (can be more optimal).

Note
This point is relative to Terrain::getPosition

◆ getPointFromSelfOrNeighbour()

void Ogre::Terrain::getPointFromSelfOrNeighbour ( long x,
long y,
Vector3 * outpos ) const

Get a Vector3 of the world-space point on the terrain, aligned as per options.

Cascades into neighbours if out of bounds.

Note
This point is relative to Terrain::getPosition - neighbours are adjusted to be relative to this tile

◆ getPointTransform()

void Ogre::Terrain::getPointTransform ( Matrix4 * outXform) const

Get a transform which converts Vector4(xindex, yindex, height, 1) into an object-space position including scalings and alignment.

◆ getPosition() [1/3]

const Vector3 & Ogre::Terrain::getPosition ( ) const

Get the world position of the terrain centre.

Definition at line 1096 of file OgreTerrain.h.

References mPos.

◆ getPosition() [2/3]

void Ogre::Terrain::getPosition ( const Vector3 & TSpos,
Vector3 * outWSpos ) const

Convert a position from terrain basis space to world space.

Parameters
TSposTerrain space position, where (0,0) is the bottom-left of the terrain, and (1,1) is the top-right. The Z coordinate is in absolute height units.
Note
This position is relative to Terrain::getPosition
Parameters
outWSposWorld space output position (setup according to current alignment).

◆ getPosition() [3/3]

void Ogre::Terrain::getPosition ( Real x,
Real y,
Real z,
Vector3 * outWSpos ) const

Convert a position from terrain basis space to world space.

Parameters
x,y,zTerrain space position, where (0,0) is the bottom-left of the terrain, and (1,1) is the top-right. The Z coordinate is in absolute height units.
Note
This position is relative to Terrain::getPosition
Parameters
outWSposWorld space output position (setup according to current alignment).

◆ getPositionAlign() [1/2]

void Ogre::Terrain::getPositionAlign ( const Vector3 & TSpos,
Alignment align,
Vector3 * outWSpos ) const

Convert a position from terrain basis space to world space based on a specified alignment.

Parameters
TSposTerrain space position, where (0,0) is the bottom-left of the terrain, and (1,1) is the top-right. The Z coordinate is in absolute height units.
outWSposWorld space output position (setup according to alignment).

◆ getPositionAlign() [2/2]

void Ogre::Terrain::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.

Parameters
x,y,zTerrain space position, where (0,0) is the bottom-left of the terrain, and (1,1) is the top-right. The Z coordinate is in absolute height units.
outWSposWorld space output position (setup according to alignment).

◆ getPositionBufVertexSize()

size_t Ogre::Terrain::getPositionBufVertexSize ( ) const
protected

◆ getPositiveLodLevel()

int Ogre::Terrain::getPositiveLodLevel ( int lodLevel) const
protected

Get the real lod level.

Parameters
lodLevelLOD level which can be negative.
Note
After mapping, [-mNumLodLevels, -1] equals to [0,mNumLodLevels-1] So you can reference the lowest LOD with -1

Definition at line 1657 of file OgreTerrain.h.

References mNumLodLevels.

◆ getQuadTree()

TerrainQuadTreeNode * Ogre::Terrain::getQuadTree ( )

Get the top level of the quad tree which is used to divide up the terrain.

Definition at line 1551 of file OgreTerrain.h.

References mQuadTree.

◆ getQueryFlags()

uint32 Ogre::Terrain::getQueryFlags ( void ) const

Get the query flags for this terrain.

Definition at line 1357 of file OgreTerrain.h.

References mQueryFlags.

◆ getRenderQueueGroup()

uint8 Ogre::Terrain::getRenderQueueGroup ( void ) const

Get the render queue group that this terrain will be rendered into.

Definition at line 1343 of file OgreTerrain.h.

References mRenderQueueGroup.

◆ getResolutionAtLod()

uint16 Ogre::Terrain::getResolutionAtLod ( uint16 lodLevel) const

Gets the resolution of the entire terrain (down one edge) at a given LOD level.

◆ getResourceGroup()

const String & Ogre::Terrain::getResourceGroup ( ) const

Get the resource group to use when loading / saving.

If this is blank, the default in TerrainGlobalOptions will be used.

Definition at line 672 of file OgreTerrain.h.

References mResourceGroup.

◆ getSceneManager()

SceneManager * Ogre::Terrain::getSceneManager ( ) const

Definition at line 510 of file OgreTerrain.h.

References mSceneMgr.

◆ getSize()

uint16 Ogre::Terrain::getSize ( ) const

Get the size of the terrain in vertices along one side.

◆ getSkirtSize()

Real Ogre::Terrain::getSkirtSize ( ) const

The default size of 'skirts' used to hide terrain cracks (default 10, set for new Terrain using TerrainGlobalOptions)

Definition at line 1234 of file OgreTerrain.h.

References mSkirtSize.

◆ getTargetLodLevel()

int Ogre::Terrain::getTargetLodLevel ( ) const

Definition at line 1893 of file OgreTerrain.h.

References mLodManager.

◆ getTerrainNormalMap()

TexturePtr Ogre::Terrain::getTerrainNormalMap ( ) const

Get the (global) normal map texture.

Definition at line 1554 of file OgreTerrain.h.

References mTerrainNormalMap.

◆ getTerrainPosition() [1/2]

void Ogre::Terrain::getTerrainPosition ( const Vector3 & WSpos,
Vector3 * outTSpos ) const

Convert a position from world space to terrain basis space.

Parameters
WSposWorld space position (setup according to current alignment).
outTSposTerrain space output position, where (0,0) is the bottom-left of the terrain, and (1,1) is the top-right. The Z coordinate is in absolute height units.

◆ getTerrainPosition() [2/2]

void Ogre::Terrain::getTerrainPosition ( Real x,
Real y,
Real z,
Vector3 * outTSpos ) const

Convert a position from world space to terrain basis space.

Parameters
x,y,zWorld space position (setup according to current alignment).
outTSposTerrain space output position, where (0,0) is the bottom-left of the terrain, and (1,1) is the top-right. The Z coordinate is in absolute height units.

◆ getTerrainPositionAlign() [1/2]

void Ogre::Terrain::getTerrainPositionAlign ( const Vector3 & WSpos,
Alignment align,
Vector3 * outTSpos ) const

Convert a position from world space to terrain basis space based on a specified alignment.

Parameters
WSposWorld space position (setup according to alignment).
outTSposTerrain space output position, where (0,0) is the bottom-left of the terrain, and (1,1) is the top-right. The Z coordinate is in absolute height units.

◆ getTerrainPositionAlign() [2/2]

void Ogre::Terrain::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.

Parameters
x,y,zWorld space position (setup according to alignment).
outTSposTerrain space output position, where (0,0) is the bottom-left of the terrain, and (1,1) is the top-right. The Z coordinate is in absolute height units.

◆ getTerrainVector() [1/2]

void Ogre::Terrain::getTerrainVector ( const Vector3 & inVec,
Vector3 * outVec ) const

Translate a vector from world space to local terrain space based on the alignment options.

Parameters
inVecThe vector in basis space, where x/y represents the terrain plane and z represents the up vector

◆ getTerrainVector() [2/2]

void Ogre::Terrain::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.

Parameters
x,y,zThe vector in basis space, where x/y represents the terrain plane and z represents the up vector

◆ getTerrainVectorAlign() [1/2]

void Ogre::Terrain::getTerrainVectorAlign ( const Vector3 & inVec,
Alignment align,
Vector3 * outVec ) const

Translate a vector from world space to local terrain space based on a specified alignment.

Parameters
inVecThe vector in basis space, where x/y represents the terrain plane and z represents the up vector

◆ getTerrainVectorAlign() [2/2]

void Ogre::Terrain::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.

Parameters
x,y,zThe vector in world space, where x/y represents the terrain plane and z represents the up vector

◆ getVector() [1/2]

void Ogre::Terrain::getVector ( const Vector3 & inVec,
Vector3 * outVec ) const

Translate a vector into world space based on the alignment options.

Parameters
inVecThe vector in basis space, where x/y represents the terrain plane and z represents the up vector

◆ getVector() [2/2]

void Ogre::Terrain::getVector ( Real x,
Real y,
Real z,
Vector3 * outVec ) const

Translate a vector into world space based on the alignment options.

Parameters
x,y,zThe vector in basis space, where x/y represents the terrain plane and z represents the up vector

◆ getVectorAlign() [1/2]

void Ogre::Terrain::getVectorAlign ( const Vector3 & inVec,
Alignment align,
Vector3 * outVec ) const

Translate a vector into world space based on a specified alignment.

Parameters
inVecThe vector in basis space, where x/y represents the terrain plane and z represents the up vector

◆ getVectorAlign() [2/2]

void Ogre::Terrain::getVectorAlign ( Real x,
Real y,
Real z,
Alignment align,
Vector3 * outVec ) const

Translate a vector into world space based on a specified alignment.

Parameters
x,y,zThe vector in basis space, where x/y represents the terrain plane and z represents the up vector

◆ getVisibilityFlags()

uint32 Ogre::Terrain::getVisibilityFlags ( void ) const

Get the visibility flags for this terrain.

Definition at line 1350 of file OgreTerrain.h.

References mVisibilityFlags.

◆ getWorldAABB()

AxisAlignedBox Ogre::Terrain::getWorldAABB ( ) const

Get the AABB (world coords) of the entire terrain.

◆ getWorldSize()

Real Ogre::Terrain::getWorldSize ( ) const

Get the size of the terrain in world units.

◆ handleGenerateMaterialResponse()

void Ogre::Terrain::handleGenerateMaterialResponse ( const WorkQueue::Response * res,
const WorkQueue * srcQ )

Handler for GenerateMaterial.

◆ handleRequest()

WorkQueue::Response * Ogre::Terrain::handleRequest ( const WorkQueue::Request * req,
const WorkQueue * srcQ )
virtual

◆ handleResponse()

void Ogre::Terrain::handleResponse ( const WorkQueue::Response * res,
const WorkQueue * srcQ )
virtual

◆ increaseLodLevel()

void Ogre::Terrain::increaseLodLevel ( bool synchronous = false)

Increase Terrain's LOD level by 1.

Parameters
synchronousRun synchronously

◆ isDerivedDataUpdateInProgress()

bool Ogre::Terrain::isDerivedDataUpdateInProgress ( ) const

Query whether a derived data update is in progress or not.

Definition at line 1626 of file OgreTerrain.h.

References mDerivedDataUpdateInProgress.

◆ isHeightDataModified()

bool Ogre::Terrain::isHeightDataModified ( ) const

Returns whether terrain heights have been modified since the terrain was first loaded / defined.

Remarks
This flag is reset on save().

Definition at line 763 of file OgreTerrain.h.

References mHeightDataModified.

◆ isLoaded()

bool Ogre::Terrain::isLoaded ( ) const

Return whether the terrain is loaded.

Remarks
Should only be called from the render thread really, since this is where the loaded state changes.

Definition at line 750 of file OgreTerrain.h.

References mIsLoaded.

◆ isModified()

bool Ogre::Terrain::isModified ( ) const

Returns whether this terrain has been modified since it was first loaded / defined.

Remarks
This flag is reset on save().

Definition at line 756 of file OgreTerrain.h.

References mModified.

◆ load() [1/3]

void Ogre::Terrain::load ( const String & filename)

Prepare and load the terrain in one simple call from a standalone file.

Note
This method must be called from the primary render thread. To load data in a background thread, use the prepare() method.

◆ load() [2/3]

void Ogre::Terrain::load ( int lodLevel = 0,
bool synchronous = true )

Load the terrain based on the data already populated via prepare methods.

Remarks
This method must be called in the main render thread.
Parameters
lodLevelLoad the specified LOD level
synchronousLoad type

◆ load() [3/3]

void Ogre::Terrain::load ( StreamSerialiser & stream)

Prepare and load the terrain in one simple call from a stream.

Note
This method must be called from the primary render thread. To load data in a background thread, use the prepare() method.

◆ neighbourModified()

void Ogre::Terrain::neighbourModified ( NeighbourIndex index,
const Rect & edgerect,
const Rect & shadowrect )

Notify that a neighbour has just finished updating and that this change affects this tile.

Parameters
indexThe neighbour index (from this tile's perspective)
edgerectThe area at the edge of this tile that needs height / normal recalculation (may be null)
shadowrectThe area on this tile where shadows need recalculating (may be null)

◆ notifyNeighbours()

void Ogre::Terrain::notifyNeighbours ( )

Tell this instance to notify all neighbours that will be affected by a height change that has taken place.

Remarks
This method will determine which neighbours need notification and call their neighbourModified method. It is called automatically by updateGeometry().

◆ OGRE_RW_MUTEX()

Ogre::Terrain::OGRE_RW_MUTEX ( mNeighbourMutex )

◆ operator delete() [1/6]

void Ogre::AllocatedObject< GeneralAllocPolicy >::operator delete ( void * ptr)
inherited

Definition at line 96 of file OgreMemoryAllocatedObject.h.

◆ operator delete() [2/6]

void Ogre::AllocatedObject< GeneralAllocPolicy >::operator delete ( void * ptr)
inherited

Definition at line 96 of file OgreMemoryAllocatedObject.h.

◆ operator delete() [3/6]

void Ogre::AllocatedObject< GeneralAllocPolicy >::operator delete ( void * ptr,
const char * ,
int ,
const char *  )
inherited

Definition at line 108 of file OgreMemoryAllocatedObject.h.

◆ operator delete() [4/6]

void Ogre::AllocatedObject< GeneralAllocPolicy >::operator delete ( void * ptr,
const char * ,
int ,
const char *  )
inherited

Definition at line 108 of file OgreMemoryAllocatedObject.h.

◆ operator delete() [5/6]

void Ogre::AllocatedObject< GeneralAllocPolicy >::operator delete ( void * ptr,
void *  )
inherited

Definition at line 102 of file OgreMemoryAllocatedObject.h.

◆ operator delete() [6/6]

void Ogre::AllocatedObject< GeneralAllocPolicy >::operator delete ( void * ptr,
void *  )
inherited

Definition at line 102 of file OgreMemoryAllocatedObject.h.

◆ operator delete[]() [1/4]

void Ogre::AllocatedObject< GeneralAllocPolicy >::operator delete[] ( void * ptr)
inherited

Definition at line 113 of file OgreMemoryAllocatedObject.h.

◆ operator delete[]() [2/4]

void Ogre::AllocatedObject< GeneralAllocPolicy >::operator delete[] ( void * ptr)
inherited

Definition at line 113 of file OgreMemoryAllocatedObject.h.

◆ operator delete[]() [3/4]

void Ogre::AllocatedObject< GeneralAllocPolicy >::operator delete[] ( void * ptr,
const char * ,
int ,
const char *  )
inherited

Definition at line 119 of file OgreMemoryAllocatedObject.h.

◆ operator delete[]() [4/4]

void Ogre::AllocatedObject< GeneralAllocPolicy >::operator delete[] ( void * ptr,
const char * ,
int ,
const char *  )
inherited

Definition at line 119 of file OgreMemoryAllocatedObject.h.

◆ operator new() [1/6]

void * Ogre::AllocatedObject< GeneralAllocPolicy >::operator new ( size_t sz)
inherited

Definition at line 73 of file OgreMemoryAllocatedObject.h.

◆ operator new() [2/6]

void * Ogre::AllocatedObject< GeneralAllocPolicy >::operator new ( size_t sz)
inherited

Definition at line 73 of file OgreMemoryAllocatedObject.h.

◆ operator new() [3/6]

void * Ogre::AllocatedObject< GeneralAllocPolicy >::operator new ( size_t sz,
const char * file,
int line,
const char * func )
inherited

operator new, with debug line info

Definition at line 68 of file OgreMemoryAllocatedObject.h.

◆ operator new() [4/6]

void * Ogre::AllocatedObject< GeneralAllocPolicy >::operator new ( size_t sz,
const char * file,
int line,
const char * func )
inherited

operator new, with debug line info

Definition at line 68 of file OgreMemoryAllocatedObject.h.

◆ operator new() [5/6]

void * Ogre::AllocatedObject< GeneralAllocPolicy >::operator new ( size_t sz,
void * ptr )
inherited

placement operator new

Definition at line 79 of file OgreMemoryAllocatedObject.h.

◆ operator new() [6/6]

void * Ogre::AllocatedObject< GeneralAllocPolicy >::operator new ( size_t sz,
void * ptr )
inherited

placement operator new

Definition at line 79 of file OgreMemoryAllocatedObject.h.

◆ operator new[]() [1/4]

void * Ogre::AllocatedObject< GeneralAllocPolicy >::operator new[] ( size_t sz)
inherited

Definition at line 91 of file OgreMemoryAllocatedObject.h.

◆ operator new[]() [2/4]

void * Ogre::AllocatedObject< GeneralAllocPolicy >::operator new[] ( size_t sz)
inherited

Definition at line 91 of file OgreMemoryAllocatedObject.h.

◆ operator new[]() [3/4]

void * Ogre::AllocatedObject< GeneralAllocPolicy >::operator new[] ( size_t sz,
const char * file,
int line,
const char * func )
inherited

array operator new, with debug line info

Definition at line 86 of file OgreMemoryAllocatedObject.h.

◆ operator new[]() [4/4]

void * Ogre::AllocatedObject< GeneralAllocPolicy >::operator new[] ( size_t sz,
const char * file,
int line,
const char * func )
inherited

array operator new, with debug line info

Definition at line 86 of file OgreMemoryAllocatedObject.h.

◆ postFindVisibleObjects()

virtual void Ogre::SceneManager::Listener::postFindVisibleObjects ( SceneManager * source,
IlluminationRenderStage irs,
Viewport * v )
virtualinherited

Called after searching for visible objects in this SceneManager.

Remarks
Note that the render queue at this stage will be full of the current scenes contents, ready for rendering. You may manually add renderables to this queue if you wish.
Parameters
sourceThe SceneManager instance raising this event.
irsThe stage of illumination being dealt with. IRS_NONE for a regular render, IRS_RENDER_TO_TEXTURE for a shadow caster render.
vThe viewport being updated. You can get the camera from here.

Reimplemented in Ogre::RTShader::ShaderGenerator::SGSceneManagerListener.

Definition at line 269 of file OgreSceneManager.h.

References Ogre::SceneManager::SceneManager().

◆ postUpdateSceneGraph()

virtual void Ogre::SceneManager::Listener::postUpdateSceneGraph ( SceneManager * source,
Camera * camera )
virtualinherited

Called after updating the scene graph in this SceneManager.

Remarks
This is called after updating the scene graph for a camera.
Parameters
sourceThe SceneManager instance raising this event.
cameraThe camera being updated.

Definition at line 243 of file OgreSceneManager.h.

References Ogre::SceneManager::SceneManager().

◆ preFindVisibleObjects()

void Ogre::Terrain::preFindVisibleObjects ( SceneManager * source,
SceneManager::IlluminationRenderStage irs,
Viewport * v )
virtual

Overridden from SceneManager::Listener.

Reimplemented from Ogre::SceneManager::Listener.

◆ prepare() [1/4]

bool Ogre::Terrain::prepare ( const ImportData & importData)

Prepare the terrain from some import data rather than loading from native data.

Remarks
This method may be called in a background thread.

◆ prepare() [2/4]

bool Ogre::Terrain::prepare ( const String & filename)

Prepare the terrain from a standalone file.

Note
This is safe to do in a background thread as it creates no GPU resources. It reads data from a native terrain data chunk. For more advanced uses, such as loading from a shared file, use the StreamSerialiser form.

◆ prepare() [3/4]

bool Ogre::Terrain::prepare ( DataStreamPtr & stream)

Prepare terrain data from saved data.

Remarks
This is safe to do in a background thread as it creates no GPU resources. It reads data from a native terrain data chunk.
Returns
true if the preparation was successful

◆ prepare() [4/4]

bool Ogre::Terrain::prepare ( StreamSerialiser & stream)

Prepare terrain data from saved data.

Remarks
This is safe to do in a background thread as it creates no GPU resources. It reads data from a native terrain data chunk.
Returns
true if the preparation was successful

◆ preUpdateSceneGraph()

virtual void Ogre::SceneManager::Listener::preUpdateSceneGraph ( SceneManager * source,
Camera * camera )
virtualinherited

Called prior to updating the scene graph in this SceneManager.

Remarks
This is called before updating the scene graph for a camera.
Parameters
sourceThe SceneManager instance raising this event.
cameraThe camera being updated.

Definition at line 234 of file OgreSceneManager.h.

References Ogre::SceneManager::SceneManager().

◆ rayIntersects()

std::pair< bool, Vector3 > Ogre::Terrain::rayIntersects ( const Ray & ray,
bool cascadeToNeighbours = false,
Real distanceLimit = 0 )

Test for intersection of a given ray with the terrain.

If the ray hits the terrain, the point of intersection is returned.

Parameters
rayThe ray to test for intersection
cascadeToNeighboursWhether the ray will be projected onto neighbours if no intersection is found
distanceLimitThe distance from the ray origin at which we will stop looking, 0 indicates no limit
Returns
A pair which contains whether the ray hit the terrain and, if so, where.
Remarks
This can be called from any thread as long as no parallel write to the heightmap data occurs.

◆ raySelectNeighbour()

Terrain * Ogre::Terrain::raySelectNeighbour ( const Ray & ray,
Real distanceLimit = 0 )

Utility method to pick a neighbour based on a ray.

Parameters
rayThe ray in world space
distanceLimitLimit beyond which we want to ignore neighbours (0 for infinite)
Returns
The first neighbour along this ray, or null

References Terrain().

◆ readLayerDeclaration()

static bool Ogre::Terrain::readLayerDeclaration ( StreamSerialiser & ser,
TerrainLayerDeclaration & targetdecl )
static

Utility method to read a layer declaration from a stream.

◆ readLayerInstanceList()

static bool Ogre::Terrain::readLayerInstanceList ( StreamSerialiser & ser,
size_t numSamplers,
Terrain::LayerInstanceList & targetlst )
static

Utility method to read a layer instance list from a stream.

◆ removeFromNeighbours()

void Ogre::Terrain::removeFromNeighbours ( )
protected

Removes this terrain instance from neighbouring terrain's list of neighbours.

◆ removeLayer()

void Ogre::Terrain::removeLayer ( uint8 index)

Remove a layer from the terrain.

◆ removeQueryFlags()

void Ogre::Terrain::removeQueryFlags ( uint32 flags)

Definition at line 1367 of file OgreTerrain.h.

References mQueryFlags.

◆ replaceLayer()

void Ogre::Terrain::replaceLayer ( uint8 index,
bool keepBlends,
Real worldSize = 0,
const StringVector * textureNames = 0 )

Replace an existing terrain layer, optionally preserving all other layer blend maps.

Parameters
indexThe 0 based index of the terrain layer to replace
keepBlendsTrue to keep using the existing blend maps. False to reset the blend map for the layer. Irrelevant if index == 0
worldSizeThe size of the texture in this layer in world units. Default to zero to use the default
textureNamesA list of textures to assign to the samplers in this layer. Leave blank to provide these later.

◆ save() [1/2]

void Ogre::Terrain::save ( const String & filename)

Save terrain data in native form to a standalone file.

Parameters
filenameThe name of the file to save to. If this is a filename with no path elements, then it is saved in the first writeable location available in the resource group you have chosen to use for this terrain. If the filename includes path specifiers then it is saved directly instead (but note that it may not be reloadable via the resource system if the location is not on the path).

◆ save() [2/2]

void Ogre::Terrain::save ( StreamSerialiser & stream)

Save terrain data in native form to a serializing stream.

Remarks
If you want complete control over where the terrain data goes, use this form.

◆ sceneManagerDestroyed()

void Ogre::Terrain::sceneManagerDestroyed ( SceneManager * source)
virtual

Overridden from SceneManager::Listener.

Reimplemented from Ogre::SceneManager::Listener.

◆ setGlobalColourMapEnabled()

void Ogre::Terrain::setGlobalColourMapEnabled ( bool enabled,
uint16 size = 0 )

Set whether a global colour map is enabled.

Remarks
A global colour map can add variation to your terrain and reduce the perceived tiling effect you might get in areas of continuous lighting and the same texture. The global colour map is only used when the material generator chooses to use it.
Note
You must only call this from the main render thread
Parameters
enabledWhether the global colour map is enabled or not
sizeThe resolution of the colour map. A value of zero means 'no change' and the default is set in TerrainGlobalOptions.

◆ setGpuBufferAllocator()

void Ogre::Terrain::setGpuBufferAllocator ( GpuBufferAllocator * alloc)

Tell this instance to use the given GpuBufferAllocator.

Remarks
May only be called when the terrain is not loaded.

◆ setHeightAtPoint()

void Ogre::Terrain::setHeightAtPoint ( long x,
long y,
float h )

Set the height data for a given terrain point.

Note
this doesn't take effect until you call update()
Parameters
x,yDiscrete coordinates in terrain vertices, values from 0 to size-1, left/right bottom/top
hThe new height

◆ setLayerTextureName()

void Ogre::Terrain::setLayerTextureName ( uint8 layerIndex,
uint8 samplerIndex,
const String & textureName )

Set the name of the texture bound to a given index within a given layer.

See the LayerDeclaration for a list of sampelrs within a layer.

Parameters
layerIndexThe layer index.
samplerIndexThe sampler index within a layer
textureNameThe name of the texture to use

◆ setLayerWorldSize()

void Ogre::Terrain::setLayerWorldSize ( uint8 index,
Real size )

How large an area in world space the texture in a terrain layer covers before repeating.

Parameters
indexThe layer index.
sizeThe world size of the texture before repeating

◆ setNeighbour()

void Ogre::Terrain::setNeighbour ( NeighbourIndex index,
Terrain * neighbour,
bool recalculate = false,
bool notifyOther = true )

Set a terrain's neighbour, or null to detach one.

Remarks
This information is not saved with the terrain since every tile must be able to be independent. However if modifications are made to a tile which can affect its neighbours, while connected the changes will be propagated.
Parameters
indexThe index of the neighbour
neighbourThe terrain instance to become the neighbour, or null to reset.
recalculateIf true, this terrain instance will recalculate elements that could be affected by the connection of this tile (e.g. matching heights, calcaulting normals, calculating shadows crossing the boundary). If false, this terrain's state is assumed to be up to date already (e.g. was calculated with this tile present before and the state saved).
notifyOtherWhether the neighbour should also be notified (recommended to leave this at the default so relationships are up to date before background updates are triggered)

References Terrain().

◆ setPosition()

void Ogre::Terrain::setPosition ( const Vector3 & pos)

Set the position of the terrain centre in world coordinates.

◆ setQueryFlags()

void Ogre::Terrain::setQueryFlags ( uint32 flags)

Set the query flags for this terrain.

Remarks
The default is specified in TerrainGlobalOptions

Definition at line 1361 of file OgreTerrain.h.

References mQueryFlags.

◆ setRenderQueueGroup()

void Ogre::Terrain::setRenderQueueGroup ( uint8 grp)

Set the render queue group that this terrain will be rendered into.

Remarks
The default is specified in TerrainGlobalOptions

Definition at line 1347 of file OgreTerrain.h.

References mRenderQueueGroup.

◆ setResourceGroup()

void Ogre::Terrain::setResourceGroup ( const String & resGroup)

Set the resource group to use when loading / saving.

Parameters
resGroupResource group name - you can set this to blank to use the default in TerrainGlobalOptions.

Definition at line 667 of file OgreTerrain.h.

References mResourceGroup.

◆ setSize()

void Ogre::Terrain::setSize ( uint16 newSize)

Set the size of terrain in vertices along one side.

Note
The existing height data will be bilinear filtered to fill the new size
Parameters
newSizethe new size of the terrain

◆ setVisibilityFlags()

void Ogre::Terrain::setVisibilityFlags ( uint32 flags)

Set the visibility flags for this terrain.

Remarks
The default is specified in TerrainGlobalOptions

Definition at line 1354 of file OgreTerrain.h.

References mVisibilityFlags.

◆ setWorldSize()

void Ogre::Terrain::setWorldSize ( Real newWorldSize)

Set the world size of terrain.

Parameters
newWorldSizethe new world size of the terrain

◆ shadowTextureCasterPreViewProj()

virtual void Ogre::SceneManager::Listener::shadowTextureCasterPreViewProj ( Light * light,
Camera * camera,
size_t iteration )
virtualinherited

This event occurs just before the view & projection matrices are set for rendering into a shadow texture.

Remarks
You can use this event hook to perform some custom processing, such as altering the camera being used for rendering the light's view, including setting custom view & projection matrices if you want to perform an advanced shadow technique.
Note
This event will only be fired when texture shadows are in use.
Parameters
lightPointer to the light for which shadows are being rendered
cameraPointer to the camera being used to render
iterationFor lights that use multiple shadow textures, the iteration number

Reimplemented in Ogre::RTShader::ShaderGenerator::SGSceneManagerListener.

Definition at line 303 of file OgreSceneManager.h.

◆ shadowTextureReceiverPreViewProj()

virtual void Ogre::SceneManager::Listener::shadowTextureReceiverPreViewProj ( Light * light,
Frustum * frustum )
virtualinherited

This event occurs just before the view & projection matrices are set for re-rendering a shadow receiver.

Remarks
You can use this event hook to perform some custom processing, such as altering the projection frustum being used for rendering the shadow onto the receiver to perform an advanced shadow technique.
Note
This event will only be fired when texture shadows are in use.
Parameters
lightPointer to the light for which shadows are being rendered
frustumPointer to the projection frustum being used to project the shadow texture

Reimplemented in Ogre::RTShader::ShaderGenerator::SGSceneManagerListener.

Definition at line 320 of file OgreSceneManager.h.

◆ shadowTexturesUpdated()

virtual void Ogre::SceneManager::Listener::shadowTexturesUpdated ( size_t numberOfShadowTextures)
virtualinherited

Event raised after all shadow textures have been rendered into for all queues / targets but before any other geometry has been rendered (including main scene geometry and any additional shadow receiver passes).

Remarks
This callback is useful for those that wish to perform some additional processing on shadow textures before they are used to render shadows. For example you could perform some filtering by rendering the existing shadow textures into another alternative shadow texture with a shader.]
Note
This event will only be fired when texture shadows are in use.
Parameters
numberOfShadowTexturesThe number of shadow textures in use

Reimplemented in Ogre::RTShader::ShaderGenerator::SGSceneManagerListener.

Definition at line 287 of file OgreSceneManager.h.

◆ shiftDownGPUBlendChannels()

void Ogre::Terrain::shiftDownGPUBlendChannels ( uint8 index)
protected

Shift/slide all GPU blend texture channels > index down one slot. Blend data may shift into the previous texture.

◆ shiftUpGPUBlendChannels()

void Ogre::Terrain::shiftUpGPUBlendChannels ( uint8 index)
protected

Shift/slide all GPU blend texture channels > index up one slot. Blend data may shift into the next texture.

◆ sortLightsAffectingFrustum()

virtual bool Ogre::SceneManager::Listener::sortLightsAffectingFrustum ( LightList & lightList)
virtualinherited

Hook to allow the listener to override the ordering of lights for the entire frustum.

Remarks
Whilst ordinarily lights are sorted per rendered object (
See also
MovableObject::queryLights), texture shadows adds another issue in that, given there is a finite number of shadow textures, we must choose which lights to render texture shadows from based on the entire frustum. These lights should always be listed first in every objects own list, followed by any other lights which will not cast texture shadows (either because they have shadow casting off, or there aren't enough shadow textures to service them).
This hook allows you to override the detailed ordering of the lights per frustum. The default ordering is shadow casters first (which you must also respect if you override this method), and ordered by distance from the camera within those 2 groups. Obviously the closest lights with shadow casting enabled will be listed first. Only lights within the range of the frustum will be in the list.
Parameters
lightListThe list of lights within range of the frustum which you may sort.
Returns
true if you sorted the list, false otherwise.

Definition at line 346 of file OgreSceneManager.h.

◆ unload()

void Ogre::Terrain::unload ( )

Unload the terrain and free GPU resources.

Remarks
This method must be called in the main render thread.

◆ unprepare()

void Ogre::Terrain::unprepare ( )

Free CPU resources created during prepare methods.

Remarks
This is safe to do in a background thread after calling unload().

◆ update()

void Ogre::Terrain::update ( bool synchronous = false)

Trigger the update process for the terrain.

Remarks
Updating the terrain will process any dirty sections of the terrain. This may affect many things:
  1. The terrain geometry
  2. The terrain error metrics which determine LOD transitions
  3. The terrain normal map, if present
  4. The terrain lighting map, if present
  5. The terrain composite map, if present
If threading is enabled, only item 1 (the geometry) will be updated synchronously, ie will be fully up to date when this method returns. The other elements are more expensive to compute, and will be queued for processing in a background thread, in the order shown above. As these updates complete, the effects will be shown.

You can also separate the timing of updating the geometry, LOD and the lighting information if you want, by calling updateGeometry() and updateDerivedData() separately.

Parameters
synchronousIf true, all updates will happen immediately and not in a separate thread.

◆ updateBaseScale()

void Ogre::Terrain::updateBaseScale ( )
protected

◆ updateCompositeMap()

void Ogre::Terrain::updateCompositeMap ( )

Performs an update on the terrain composite map based on its dirty region.

Remarks
Rather than calling this directly, call updateDerivedData, which will also call it after the other derived data has been updated (there is no point updating the composite map until lighting has been updated). However the blend maps may call this directly when only the blending information has been updated.

◆ updateCompositeMapWithDelay()

void Ogre::Terrain::updateCompositeMapWithDelay ( Real delay = 2)

Performs an update on the terrain composite map based on its dirty region, but only at a maximum frequency.

Remarks
Rather than calling this directly, call updateDerivedData, which will also call it after the other derived data has been updated (there is no point updating the composite map until lighting has been updated). However the blend maps may call this directly when only the blending information has been updated.
Note
This method will log the request for an update, but won't do it just yet unless there are no further requests in the next 'delay' seconds. This means you can call it all the time but only pick up changes in quiet times.

◆ updateDerivedData()

void Ogre::Terrain::updateDerivedData ( bool synchronous = false,
uint8 typeMask = 0xFF )

Updates derived data for the terrain (LOD, lighting) to reflect changed height data, in a separate thread if threading is enabled (OGRE_THREAD_SUPPORT).

If threading is enabled, on return from this method the derived data will not necessarily be updated immediately, the calculation may be done in the background. Only one update will run in the background at once. This derived data can typically survive being out of sync for a few frames which is why it is not done synchronously

Parameters
synchronousIf true, the update will happen immediately and not in a separate thread.
typeMaskMask indicating the types of data we should generate

◆ updateDerivedDataImpl()

void Ogre::Terrain::updateDerivedDataImpl ( const Rect & rect,
const Rect & lightmapExtraRect,
bool synchronous,
uint8 typeMask )
protected

◆ updateGeometry()

void Ogre::Terrain::updateGeometry ( )

Performs an update on the terrain geometry based on the dirty region.

Remarks
Terrain geometry will be updated when this method returns.

◆ updateGeometryWithoutNotifyNeighbours()

void Ogre::Terrain::updateGeometryWithoutNotifyNeighbours ( )

Performs an update on the terrain geometry based on the dirty region.

Remarks
Terrain geometry will be updated when this method returns, and no neighbours will be notified.

◆ waitForDerivedProcesses()

void Ogre::Terrain::waitForDerivedProcesses ( )
protected

◆ widenRectByVector() [1/2]

void Ogre::Terrain::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 / max heights to extrude manually.

Parameters
vecA vector in world space
inRectInput rectangle
minHeight,maxHeightThe extents of the height to extrude
outRectOutput rectangle

◆ widenRectByVector() [2/2]

void Ogre::Terrain::widenRectByVector ( const Vector3 & vec,
const Rect & inRect,
Rect & outRect )

Widen a rectangular area of terrain to take into account an extrusion vector.

Parameters
vecA vector in world space
inRectInput rectangle
outRectOutput rectangle

◆ writeLayerDeclaration()

static void Ogre::Terrain::writeLayerDeclaration ( const TerrainLayerDeclaration & decl,
StreamSerialiser & ser )
static

Utility method to write a layer declaration to a stream.

◆ writeLayerInstanceList()

static void Ogre::Terrain::writeLayerInstanceList ( const Terrain::LayerInstanceList & lst,
StreamSerialiser & ser )
static

Utility method to write a layer instance list to a stream.

Friends And Related Symbol Documentation

◆ TerrainLodManager

friend class TerrainLodManager
friend

Definition at line 266 of file OgreTerrain.h.

References TerrainLodManager.

Referenced by TerrainLodManager.

Member Data Documentation

◆ DERIVED_DATA_ALL

const uint8 Ogre::Terrain::DERIVED_DATA_ALL
static

Definition at line 1190 of file OgreTerrain.h.

◆ DERIVED_DATA_DELTAS

const uint8 Ogre::Terrain::DERIVED_DATA_DELTAS
static

Definition at line 1187 of file OgreTerrain.h.

◆ DERIVED_DATA_LIGHTMAP

const uint8 Ogre::Terrain::DERIVED_DATA_LIGHTMAP
static

Definition at line 1189 of file OgreTerrain.h.

◆ DERIVED_DATA_NORMALS

const uint8 Ogre::Terrain::DERIVED_DATA_NORMALS
static

Definition at line 1188 of file OgreTerrain.h.

◆ LOD_MORPH_CUSTOM_PARAM

const size_t Ogre::Terrain::LOD_MORPH_CUSTOM_PARAM
static

Definition at line 292 of file OgreTerrain.h.

◆ mAlign

Alignment Ogre::Terrain::mAlign
protected

Definition at line 1733 of file OgreTerrain.h.

◆ mBase

Real Ogre::Terrain::mBase
protected

Base position in world space, relative to mPos.

Definition at line 1744 of file OgreTerrain.h.

◆ mBlendTextureList

TexturePtrList Ogre::Terrain::mBlendTextureList
protected

Definition at line 1826 of file OgreTerrain.h.

◆ mColourMap

TexturePtr Ogre::Terrain::mColourMap
protected

Definition at line 1831 of file OgreTerrain.h.

Referenced by getGlobalColourMap().

◆ mCompositeMap

TexturePtr Ogre::Terrain::mCompositeMap
protected

Definition at line 1841 of file OgreTerrain.h.

Referenced by getCompositeMap().

◆ mCompositeMapDirtyRect

Rect Ogre::Terrain::mCompositeMapDirtyRect
protected

Definition at line 1843 of file OgreTerrain.h.

◆ mCompositeMapDirtyRectLightmapUpdate

bool Ogre::Terrain::mCompositeMapDirtyRectLightmapUpdate
protected

True if the updates included lightmap changes (widen)

Definition at line 1847 of file OgreTerrain.h.

◆ mCompositeMapMaterial

MaterialPtr Ogre::Terrain::mCompositeMapMaterial
mutableprotected

Definition at line 1848 of file OgreTerrain.h.

Referenced by _getCompositeMapMaterial().

◆ mCompositeMapRequired

bool Ogre::Terrain::mCompositeMapRequired
protected

Definition at line 1860 of file OgreTerrain.h.

◆ mCompositeMapSize

uint16 Ogre::Terrain::mCompositeMapSize
protected

Definition at line 1839 of file OgreTerrain.h.

Referenced by getCompositeMapSize().

◆ mCompositeMapSizeActual

uint16 Ogre::Terrain::mCompositeMapSizeActual
protected

Definition at line 1840 of file OgreTerrain.h.

◆ mCompositeMapUpdateCountdown

unsigned long Ogre::Terrain::mCompositeMapUpdateCountdown
protected

Definition at line 1844 of file OgreTerrain.h.

◆ mCpuBlendMapStorage

BytePointerList Ogre::Terrain::mCpuBlendMapStorage
protected

Staging post for blend map data.

Definition at line 1824 of file OgreTerrain.h.

◆ mCpuColourMapStorage

uint8* Ogre::Terrain::mCpuColourMapStorage
protected

Definition at line 1832 of file OgreTerrain.h.

◆ mCpuCompositeMapStorage

uint8* Ogre::Terrain::mCpuCompositeMapStorage
protected

Definition at line 1842 of file OgreTerrain.h.

◆ mCpuLightmapStorage

uint8* Ogre::Terrain::mCpuLightmapStorage
protected

Definition at line 1837 of file OgreTerrain.h.

◆ mCpuTerrainNormalMap

PixelBox* Ogre::Terrain::mCpuTerrainNormalMap
protected

Pending data.

Definition at line 1865 of file OgreTerrain.h.

◆ mCustomGpuBufferAllocator

GpuBufferAllocator* Ogre::Terrain::mCustomGpuBufferAllocator
protected

Definition at line 1873 of file OgreTerrain.h.

◆ mDefaultGpuBufferAllocator

DefaultGpuBufferAllocator Ogre::Terrain::mDefaultGpuBufferAllocator
protected

Definition at line 1874 of file OgreTerrain.h.

◆ mDeltaData

float* Ogre::Terrain::mDeltaData
protected

The delta information defining how a vertex moves before it is removed at a lower LOD.

Definition at line 1732 of file OgreTerrain.h.

◆ mDerivedDataUpdateInProgress

bool Ogre::Terrain::mDerivedDataUpdateInProgress
protected

Definition at line 1760 of file OgreTerrain.h.

Referenced by isDerivedDataUpdateInProgress().

◆ mDerivedUpdatePendingMask

uint8 Ogre::Terrain::mDerivedUpdatePendingMask
protected

If another update is requested while one is already running.

Definition at line 1762 of file OgreTerrain.h.

◆ mDirtyDerivedDataRect

Rect Ogre::Terrain::mDirtyDerivedDataRect
protected

Definition at line 1757 of file OgreTerrain.h.

◆ mDirtyGeometryRect

Rect Ogre::Terrain::mDirtyGeometryRect
protected

Definition at line 1756 of file OgreTerrain.h.

◆ mDirtyGeometryRectForNeighbours

Rect Ogre::Terrain::mDirtyGeometryRectForNeighbours
protected

Definition at line 1758 of file OgreTerrain.h.

◆ mDirtyLightmapFromNeighboursRect

Rect Ogre::Terrain::mDirtyLightmapFromNeighboursRect
protected

Definition at line 1759 of file OgreTerrain.h.

◆ mGenerateMaterialInProgress

bool Ogre::Terrain::mGenerateMaterialInProgress
protected

Definition at line 1764 of file OgreTerrain.h.

◆ mGlobalColourMapEnabled

bool Ogre::Terrain::mGlobalColourMapEnabled
protected

Definition at line 1830 of file OgreTerrain.h.

Referenced by getGlobalColourMapEnabled().

◆ mGlobalColourMapSize

uint16 Ogre::Terrain::mGlobalColourMapSize
protected

Definition at line 1829 of file OgreTerrain.h.

Referenced by getGlobalColourMapSize().

◆ mHeightData

float* Ogre::Terrain::mHeightData
protected

The height data (world coords relative to mPos)

Definition at line 1730 of file OgreTerrain.h.

◆ mHeightDataModified

bool Ogre::Terrain::mHeightDataModified
protected

Definition at line 1727 of file OgreTerrain.h.

Referenced by isHeightDataModified().

◆ mIsLoaded

bool Ogre::Terrain::mIsLoaded
protected

Definition at line 1725 of file OgreTerrain.h.

Referenced by isLoaded().

◆ mLastLODCamera

const Camera* Ogre::Terrain::mLastLODCamera
protected

Definition at line 1867 of file OgreTerrain.h.

◆ mLastLODFrame

unsigned long Ogre::Terrain::mLastLODFrame
protected

Definition at line 1868 of file OgreTerrain.h.

◆ mLastMillis

unsigned long Ogre::Terrain::mLastMillis
protected

Definition at line 1845 of file OgreTerrain.h.

◆ mLastViewportHeight

int Ogre::Terrain::mLastViewportHeight
protected

Definition at line 1869 of file OgreTerrain.h.

◆ mLayerBlendMapList

TerrainLayerBlendMapList Ogre::Terrain::mLayerBlendMapList
protected

Definition at line 1827 of file OgreTerrain.h.

◆ mLayerBlendMapSize

uint16 Ogre::Terrain::mLayerBlendMapSize
protected

Definition at line 1820 of file OgreTerrain.h.

Referenced by getLayerBlendMapSize().

◆ mLayerBlendMapSizeActual

uint16 Ogre::Terrain::mLayerBlendMapSizeActual
protected

Definition at line 1821 of file OgreTerrain.h.

◆ mLayerDecl

TerrainLayerDeclaration Ogre::Terrain::mLayerDecl
protected

Definition at line 1747 of file OgreTerrain.h.

Referenced by getLayerDeclaration().

◆ mLayers

LayerInstanceList Ogre::Terrain::mLayers
protected

Definition at line 1748 of file OgreTerrain.h.

Referenced by getLayerCount().

◆ mLayerUVMultiplier

RealVector Ogre::Terrain::mLayerUVMultiplier
protected

Definition at line 1749 of file OgreTerrain.h.

◆ mLightmap

TexturePtr Ogre::Terrain::mLightmap
protected

Definition at line 1836 of file OgreTerrain.h.

Referenced by getLightmap().

◆ mLightMapRequired

bool Ogre::Terrain::mLightMapRequired
protected

Definition at line 1858 of file OgreTerrain.h.

◆ mLightMapShadowsOnly

bool Ogre::Terrain::mLightMapShadowsOnly
protected

Definition at line 1859 of file OgreTerrain.h.

◆ mLightmapSize

uint16 Ogre::Terrain::mLightmapSize
protected

Definition at line 1834 of file OgreTerrain.h.

Referenced by getLightmapSize().

◆ mLightmapSizeActual

uint16 Ogre::Terrain::mLightmapSizeActual
protected

Definition at line 1835 of file OgreTerrain.h.

◆ mLodManager

TerrainLodManager* Ogre::Terrain::mLodManager
protected

Definition at line 1879 of file OgreTerrain.h.

Referenced by getHighestLodLoaded(), getHighestLodPrepared(), and getTargetLodLevel().

◆ mLodMorphRequired

bool Ogre::Terrain::mLodMorphRequired
protected

Definition at line 1856 of file OgreTerrain.h.

Referenced by _getMorphRequired(), and _setMorphRequired().

◆ mMaterial

MaterialPtr Ogre::Terrain::mMaterial
mutableprotected

Definition at line 1814 of file OgreTerrain.h.

Referenced by _getMaterial().

◆ mMaterialDirty

bool Ogre::Terrain::mMaterialDirty
mutableprotected

Definition at line 1817 of file OgreTerrain.h.

◆ mMaterialGenerationCount

unsigned long long int Ogre::Terrain::mMaterialGenerationCount
mutableprotected

Definition at line 1816 of file OgreTerrain.h.

◆ mMaterialGenerator

TerrainMaterialGeneratorPtr Ogre::Terrain::mMaterialGenerator
mutableprotected

Definition at line 1815 of file OgreTerrain.h.

◆ mMaterialName

String Ogre::Terrain::mMaterialName
protected

Definition at line 1813 of file OgreTerrain.h.

Referenced by getMaterialName().

◆ mMaterialParamsDirty

bool Ogre::Terrain::mMaterialParamsDirty
mutableprotected

Definition at line 1818 of file OgreTerrain.h.

◆ mMaxBatchSize

uint16 Ogre::Terrain::mMaxBatchSize
protected

Definition at line 1736 of file OgreTerrain.h.

◆ mMinBatchSize

uint16 Ogre::Terrain::mMinBatchSize
protected

Definition at line 1737 of file OgreTerrain.h.

◆ mModified

bool Ogre::Terrain::mModified
protected

Definition at line 1726 of file OgreTerrain.h.

Referenced by isModified().

◆ mNeighbours

Terrain* Ogre::Terrain::mNeighbours[NEIGHBOUR_COUNT]
protected

Definition at line 1871 of file OgreTerrain.h.

◆ mNormalMapRequired

bool Ogre::Terrain::mNormalMapRequired
protected

Definition at line 1857 of file OgreTerrain.h.

◆ mNumLodLevels

uint16 Ogre::Terrain::mNumLodLevels
protected

Definition at line 1740 of file OgreTerrain.h.

Referenced by getNumLodLevels(), and getPositiveLodLevel().

◆ mNumLodLevelsPerLeafNode

uint16 Ogre::Terrain::mNumLodLevelsPerLeafNode
protected

Definition at line 1741 of file OgreTerrain.h.

Referenced by getNumLodLevelsPerLeaf().

◆ mPos

Vector3 Ogre::Terrain::mPos
protected

Definition at line 1738 of file OgreTerrain.h.

Referenced by getPosition().

◆ mPrepareInProgress

bool Ogre::Terrain::mPrepareInProgress
mutableprotected

Don't release Height/DeltaData when preparing.

Definition at line 1766 of file OgreTerrain.h.

◆ mQuadTree

TerrainQuadTreeNode* Ogre::Terrain::mQuadTree
protected

Definition at line 1739 of file OgreTerrain.h.

Referenced by getQuadTree().

◆ mQueryFlags

uint32 Ogre::Terrain::mQueryFlags
protected

Definition at line 1754 of file OgreTerrain.h.

Referenced by addQueryFlags(), getQueryFlags(), removeQueryFlags(), and setQueryFlags().

◆ mRenderQueueGroup

uint8 Ogre::Terrain::mRenderQueueGroup
protected

Definition at line 1752 of file OgreTerrain.h.

Referenced by getRenderQueueGroup(), and setRenderQueueGroup().

◆ mResourceGroup

String Ogre::Terrain::mResourceGroup
protected

Definition at line 1724 of file OgreTerrain.h.

Referenced by getResourceGroup(), and setResourceGroup().

◆ mRootNode

SceneNode* Ogre::Terrain::mRootNode
protected

Definition at line 1723 of file OgreTerrain.h.

◆ msBlendTextureGenerator

NameGenerator Ogre::Terrain::msBlendTextureGenerator
staticprotected

Definition at line 1851 of file OgreTerrain.h.

◆ mScale

Real Ogre::Terrain::mScale
protected

Relationship between one point on the terrain and world size.

Definition at line 1746 of file OgreTerrain.h.

◆ mSceneMgr

SceneManager* Ogre::Terrain::mSceneMgr
protected

Definition at line 1722 of file OgreTerrain.h.

Referenced by getSceneManager().

◆ msCompositeMapNameGenerator

NameGenerator Ogre::Terrain::msCompositeMapNameGenerator
staticprotected

Definition at line 1854 of file OgreTerrain.h.

◆ mSize

uint16 Ogre::Terrain::mSize
protected

Definition at line 1735 of file OgreTerrain.h.

◆ mSkirtSize

Real Ogre::Terrain::mSkirtSize
protected

Definition at line 1751 of file OgreTerrain.h.

Referenced by getSkirtSize().

◆ msLightmapNameGenerator

NameGenerator Ogre::Terrain::msLightmapNameGenerator
staticprotected

Definition at line 1853 of file OgreTerrain.h.

◆ msNormalMapNameGenerator

NameGenerator Ogre::Terrain::msNormalMapNameGenerator
staticprotected

Definition at line 1852 of file OgreTerrain.h.

◆ mTerrainNormalMap

TexturePtr Ogre::Terrain::mTerrainNormalMap
protected

Texture storing normals for the whole terrrain.

Definition at line 1862 of file OgreTerrain.h.

Referenced by getTerrainNormalMap().

◆ mTreeDepth

uint16 Ogre::Terrain::mTreeDepth
protected

Definition at line 1742 of file OgreTerrain.h.

◆ mVisibilityFlags

uint32 Ogre::Terrain::mVisibilityFlags
protected

Definition at line 1753 of file OgreTerrain.h.

Referenced by getVisibilityFlags(), and setVisibilityFlags().

◆ mWorkQueueChannel

uint16 Ogre::Terrain::mWorkQueueChannel
protected

Definition at line 1721 of file OgreTerrain.h.

◆ mWorldSize

Real Ogre::Terrain::mWorldSize
protected

Definition at line 1734 of file OgreTerrain.h.

◆ TERRAIN_CHUNK_ID

const uint32 Ogre::Terrain::TERRAIN_CHUNK_ID
static

Definition at line 274 of file OgreTerrain.h.

◆ TERRAIN_CHUNK_VERSION

const uint16 Ogre::Terrain::TERRAIN_CHUNK_VERSION
static

Definition at line 275 of file OgreTerrain.h.

◆ TERRAIN_GENERATE_MATERIAL_INTERVAL_MS

const uint64 Ogre::Terrain::TERRAIN_GENERATE_MATERIAL_INTERVAL_MS
static

Definition at line 277 of file OgreTerrain.h.

◆ TERRAIN_MAX_BATCH_SIZE

const uint16 Ogre::Terrain::TERRAIN_MAX_BATCH_SIZE
static

Definition at line 276 of file OgreTerrain.h.

◆ TERRAINDERIVEDDATA_CHUNK_ID

const uint32 Ogre::Terrain::TERRAINDERIVEDDATA_CHUNK_ID
static

Definition at line 287 of file OgreTerrain.h.

◆ TERRAINDERIVEDDATA_CHUNK_VERSION

const uint16 Ogre::Terrain::TERRAINDERIVEDDATA_CHUNK_VERSION
static

Definition at line 288 of file OgreTerrain.h.

◆ TERRAINGENERALINFO_CHUNK_ID

const uint32 Ogre::Terrain::TERRAINGENERALINFO_CHUNK_ID
static

Definition at line 289 of file OgreTerrain.h.

◆ TERRAINGENERALINFO_CHUNK_VERSION

const uint16 Ogre::Terrain::TERRAINGENERALINFO_CHUNK_VERSION
static

Definition at line 290 of file OgreTerrain.h.

◆ TERRAINLAYERDECLARATION_CHUNK_ID

const uint32 Ogre::Terrain::TERRAINLAYERDECLARATION_CHUNK_ID
static

Definition at line 279 of file OgreTerrain.h.

◆ TERRAINLAYERDECLARATION_CHUNK_VERSION

const uint16 Ogre::Terrain::TERRAINLAYERDECLARATION_CHUNK_VERSION
static

Definition at line 280 of file OgreTerrain.h.

◆ TERRAINLAYERINSTANCE_CHUNK_ID

const uint32 Ogre::Terrain::TERRAINLAYERINSTANCE_CHUNK_ID
static

Definition at line 285 of file OgreTerrain.h.

◆ TERRAINLAYERINSTANCE_CHUNK_VERSION

const uint16 Ogre::Terrain::TERRAINLAYERINSTANCE_CHUNK_VERSION
static

Definition at line 286 of file OgreTerrain.h.

◆ TERRAINLAYERSAMPLER_CHUNK_ID

const uint32 Ogre::Terrain::TERRAINLAYERSAMPLER_CHUNK_ID
static

Definition at line 281 of file OgreTerrain.h.

◆ TERRAINLAYERSAMPLER_CHUNK_VERSION

const uint16 Ogre::Terrain::TERRAINLAYERSAMPLER_CHUNK_VERSION
static

Definition at line 282 of file OgreTerrain.h.

◆ TERRAINLAYERSAMPLERELEMENT_CHUNK_ID

const uint32 Ogre::Terrain::TERRAINLAYERSAMPLERELEMENT_CHUNK_ID
static

Definition at line 283 of file OgreTerrain.h.

◆ TERRAINLAYERSAMPLERELEMENT_CHUNK_VERSION

const uint16 Ogre::Terrain::TERRAINLAYERSAMPLERELEMENT_CHUNK_VERSION
static

Definition at line 284 of file OgreTerrain.h.

◆ WORKQUEUE_DERIVED_DATA_REQUEST

const uint16 Ogre::Terrain::WORKQUEUE_DERIVED_DATA_REQUEST
static

Definition at line 1541 of file OgreTerrain.h.

◆ WORKQUEUE_GENERATE_MATERIAL_REQUEST

const uint16 Ogre::Terrain::WORKQUEUE_GENERATE_MATERIAL_REQUEST
static

Definition at line 1542 of file OgreTerrain.h.


The documentation for this class was generated from the following file: