Helper class to assist you in managing multiple terrain instances that are connected to each other. More...
#include <OgreTerrainGroup.h>
Classes | |
struct | LoadRequest |
Structure for holding the load request. More... | |
struct | RayResult |
Result from a terrain ray intersection with the terrain group. More... | |
struct | TerrainSlot |
Slot for a terrain instance, together with its definition. More... | |
struct | TerrainSlotDefinition |
Definition of how to populate a 'slot' in the terrain group. More... | |
Public Types | |
typedef vector< Terrain * >::type | TerrainList |
typedef map< uint32, TerrainSlot * >::type | TerrainSlotMap |
Packed map, signed 16 bits for each axis from -32767 to +32767. | |
typedef MapIterator < TerrainSlotMap > | TerrainIterator |
typedef ConstMapIterator < TerrainSlotMap > | ConstTerrainIterator |
Public Member Functions | |
TerrainGroup (SceneManager *sm, Terrain::Alignment align, uint16 terrainSize, Real terrainWorldSize) | |
Constructor. | |
TerrainGroup (SceneManager *sm) | |
Alternate constructor. | |
virtual | ~TerrainGroup () |
virtual Terrain::ImportData & | getDefaultImportSettings () |
Retrieve a shared structure which will provide the base settings for all terrains created via this group. | |
virtual void | setOrigin (const Vector3 &pos) |
Define the centre position of the grid of terrain. | |
virtual const Vector3 & | getOrigin () const |
Retrieve the centre position of the grid of terrain. | |
virtual Terrain::Alignment | getAlignment () const |
Retrieve the alignment of the grid of terrain (cannot be modified after construction). | |
virtual Real | getTerrainWorldSize () const |
Retrieve the world size of each terrain instance. | |
virtual void | setTerrainWorldSize (Real newWorldSize) |
Set the world size of terrain. | |
virtual uint16 | getTerrainSize () const |
Retrieve the size of each terrain instance in number of vertices down one side. | |
virtual void | setTerrainSize (uint16 newTerrainSize) |
Set the size of each terrain instance in number of vertices down one side. | |
virtual SceneManager * | getSceneManager () const |
Retrieve the SceneManager being used for this group. | |
void | setFilenameConvention (const String &prefix, const String &extension) |
Set the naming convention for file names in this terrain group. | |
void | setFilenamePrefix (const String &prefix) |
void | setFilenameExtension (const String &extension) |
const String & | getFilenamePrefix () const |
const String & | getFilenameExtension () const |
void | setResourceGroup (const String &grp) |
Set the resource group in which files will be located. | |
const String & | getResourceGroup () const |
Get the resource group in which files will be located. | |
virtual void | defineTerrain (long x, long y) |
Define a 'slot' in the terrain grid - in this case to be loaded from a generated file name. | |
virtual void | defineTerrain (long x, long y, float constantHeight) |
Define a 'slot' in the terrain grid - in this case a flat terrain. | |
virtual void | defineTerrain (long x, long y, const Terrain::ImportData *importData) |
Define the content of a 'slot' in the terrain grid. | |
virtual void | defineTerrain (long x, long y, const Image *img, const Terrain::LayerInstanceList *layers=0) |
Define the content of a 'slot' in the terrain grid. | |
virtual void | defineTerrain (long x, long y, const float *pFloat, const Terrain::LayerInstanceList *layers=0) |
Define the content of a 'slot' in the terrain grid. | |
virtual void | defineTerrain (long x, long y, const String &filename) |
Define the content of a 'slot' in the terrain grid. | |
virtual void | loadAllTerrains (bool synchronous=false) |
Load any terrain instances that have been defined but not loaded yet. | |
virtual void | loadTerrain (long x, long y, bool synchronous=false) |
Load a specific terrain slot based on the definition that has already been supplied. | |
virtual void | unloadTerrain (long x, long y) |
Unload a specific terrain slot. | |
virtual void | removeTerrain (long x, long y) |
Remove a specific terrain slot. | |
void | removeAllTerrains () |
Remove all terrain instances. | |
void | saveAllTerrains (bool onlyIfModified, bool replaceManualFilenames=true) |
Save all terrain instances using the assigned file names, or via the filename convention. | |
virtual TerrainSlotDefinition * | getTerrainDefinition (long x, long y) const |
Get the definition of a slot in the terrain. | |
virtual Terrain * | getTerrain (long x, long y) const |
Get the terrain instance at a given slot, if loaded. | |
void | freeTemporaryResources () |
Free as many resources as possible for optimal run-time memory use for all terrain tiles. | |
void | update (bool synchronous=false) |
Trigger the update process for all terrain instances. | |
void | updateGeometry () |
Performs an update on all terrain geometry. | |
void | updateDerivedData (bool synchronous=false, uint8 typeMask=0xFF) |
Updates derived data for all terrains (LOD, lighting) to reflect changed height data. | |
float | getHeightAtWorldPosition (Real x, Real y, Real z, Terrain **ppTerrain=0) |
Get the height data for a given world position (projecting the point down on to the terrain underneath). | |
float | getHeightAtWorldPosition (const Vector3 &pos, Terrain **ppTerrain=0) |
Get the height data for a given world position (projecting the point down on to the terrain). | |
RayResult | rayIntersects (const Ray &ray, Real distanceLimit=0) const |
Test for intersection of a given ray with any terrain in the group. | |
void | boxIntersects (const AxisAlignedBox &box, TerrainList *resultList) const |
Test intersection of a box with the terrain. | |
void | sphereIntersects (const Sphere &sphere, TerrainList *resultList) const |
Test intersection of a sphere with the terrain. | |
void | convertWorldPositionToTerrainSlot (const Vector3 &pos, long *x, long *y) const |
Convert a world position to terrain slot coordinates. | |
void | convertTerrainSlotToWorldPosition (long x, long y, Vector3 *pos) const |
Convert a slot location to a world position at the centre. | |
bool | isDerivedDataUpdateInProgress () const |
Calls Terrain::isDerivedDataUpdateInProgress on each loaded instance and returns true if any of them are undergoing a derived update. | |
TerrainIterator | getTerrainIterator () |
Get an iterator over the defined terrains. | |
ConstTerrainIterator | getTerrainIterator () const |
Get an iterator over the defined terrains (const). | |
bool | canHandleRequest (const WorkQueue::Request *req, const WorkQueue *srcQ) |
WorkQueue::RequestHandler override. | |
WorkQueue::Response * | handleRequest (const WorkQueue::Request *req, const WorkQueue *srcQ) |
WorkQueue::RequestHandler override. | |
bool | canHandleResponse (const WorkQueue::Response *res, const WorkQueue *srcQ) |
WorkQueue::ResponseHandler override. | |
void | handleResponse (const WorkQueue::Response *res, const WorkQueue *srcQ) |
WorkQueue::ResponseHandler override. | |
uint32 | packIndex (long x, long y) const |
Convert coordinates to a packed integer index. | |
void | unpackIndex (uint32 key, long *x, long *y) |
Convert a packed integer index to coordinates. | |
String | generateFilename (long x, long y) const |
Generate a file name based on the current naming convention. | |
void | saveGroupDefinition (const String &filename) |
Save the group data only in native form to a file. | |
void | saveGroupDefinition (StreamSerialiser &stream) |
Save the group data only in native form to a serializing stream. | |
void | loadGroupDefinition (const String &filename) |
Load the group definition only in native form from a file. | |
void | loadGroupDefinition (StreamSerialiser &stream) |
Load the group definition only in native form from a serializing stream. | |
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 * | operator new (size_t sz, void *ptr) |
placement operator new | |
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) |
void | operator delete (void *ptr) |
void | operator delete (void *ptr, void *) |
void | operator delete (void *ptr, const char *, int, const char *) |
void | operator delete[] (void *ptr) |
void | operator delete[] (void *ptr, const char *, int, const char *) |
Static Public Attributes | |
static const uint16 | WORKQUEUE_LOAD_REQUEST |
static const uint32 | CHUNK_ID |
static const uint16 | CHUNK_VERSION |
Protected Member Functions | |
Vector3 | getTerrainSlotPosition (long x, long y) |
Get the position of a terrain instance. | |
TerrainSlot * | getTerrainSlot (long x, long y, bool createIfMissing) |
Retrieve a slot, potentially allocate one. | |
TerrainSlot * | getTerrainSlot (long x, long y) const |
void | connectNeighbour (TerrainSlot *slot, long offsetx, long offsety) |
void | loadTerrainImpl (TerrainSlot *slot, bool synchronous) |
Protected Attributes | |
SceneManager * | mSceneManager |
Terrain::Alignment | mAlignment |
uint16 | mTerrainSize |
Real | mTerrainWorldSize |
Terrain::ImportData | mDefaultImportData |
Vector3 | mOrigin |
TerrainSlotMap | mTerrainSlots |
uint16 | mWorkQueueChannel |
String | mFilenamePrefix |
String | mFilenameExtension |
String | mResourceGroup |
Terrain::DefaultGpuBufferAllocator | mBufferAllocator |
Helper class to assist you in managing multiple terrain instances that are connected to each other.
Definition at line 65 of file OgreTerrainGroup.h.
Definition at line 456 of file OgreTerrainGroup.h.
Definition at line 455 of file OgreTerrainGroup.h.
typedef vector<Terrain*>::type Ogre::TerrainGroup::TerrainList |
Definition at line 414 of file OgreTerrainGroup.h.
typedef map<uint32, TerrainSlot*>::type Ogre::TerrainGroup::TerrainSlotMap |
Packed map, signed 16 bits for each axis from -32767 to +32767.
Definition at line 454 of file OgreTerrainGroup.h.
Ogre::TerrainGroup::TerrainGroup | ( | SceneManager * | sm, | |
Terrain::Alignment | align, | |||
uint16 | terrainSize, | |||
Real | terrainWorldSize | |||
) |
Constructor.
sm | The SceneManager which will parent the terrain instances. | |
align | The alignment that all terrain instances will use | |
terrainSize | The size of each terrain down one edge in vertices (2^n+1) | |
terrainWorldSize | The world size of each terrain instance |
Ogre::TerrainGroup::TerrainGroup | ( | SceneManager * | sm | ) |
Alternate constructor.
virtual Ogre::TerrainGroup::~TerrainGroup | ( | ) | [virtual] |
void Ogre::TerrainGroup::boxIntersects | ( | const AxisAlignedBox & | box, | |
TerrainList * | resultList | |||
) | const |
Test intersection of a box with the terrain.
box | The AABB you want to test in world units | |
resultList | Pointer to a list of terrain pointers which will be updated to include just the terrains that overlap |
bool Ogre::TerrainGroup::canHandleRequest | ( | const WorkQueue::Request * | req, | |
const WorkQueue * | srcQ | |||
) | [virtual] |
WorkQueue::RequestHandler override.
Reimplemented from Ogre::WorkQueue::RequestHandler.
bool Ogre::TerrainGroup::canHandleResponse | ( | const WorkQueue::Response * | res, | |
const WorkQueue * | srcQ | |||
) | [virtual] |
WorkQueue::ResponseHandler override.
Reimplemented from Ogre::WorkQueue::ResponseHandler.
void Ogre::TerrainGroup::connectNeighbour | ( | TerrainSlot * | slot, | |
long | offsetx, | |||
long | offsety | |||
) | [protected] |
void Ogre::TerrainGroup::convertTerrainSlotToWorldPosition | ( | long | x, | |
long | y, | |||
Vector3 * | pos | |||
) | const |
Convert a slot location to a world position at the centre.
x,y | The slot coordinates | |
pos | Pointer to the world position to be completed |
void Ogre::TerrainGroup::convertWorldPositionToTerrainSlot | ( | const Vector3 & | pos, | |
long * | x, | |||
long * | y | |||
) | const |
Convert a world position to terrain slot coordinates.
pos | The world position | |
x,y | Pointers to the coordinates to be completed. |
virtual void Ogre::TerrainGroup::defineTerrain | ( | long | x, | |
long | y, | |||
const String & | filename | |||
) | [virtual] |
Define the content of a 'slot' in the terrain grid.
x,y | The coordinates of the terrain slot relative to the centre slot (signed). | |
filename | The name of a file which fully defines the terrain (as written by Terrain::save). Size settings from all files must agree. |
virtual void Ogre::TerrainGroup::defineTerrain | ( | long | x, | |
long | y, | |||
const float * | pFloat, | |||
const Terrain::LayerInstanceList * | layers = 0 | |||
) | [virtual] |
Define the content of a 'slot' in the terrain grid.
x,y | The coordinates of the terrain slot relative to the centre slot (signed). | |
pFloat | Heights array | |
layers | Optional texture layers to use (if not supplied, default import data layers will be used) - this data is copied during the call so you may destroy your copy afterwards. |
virtual void Ogre::TerrainGroup::defineTerrain | ( | long | x, | |
long | y, | |||
const Image * | img, | |||
const Terrain::LayerInstanceList * | layers = 0 | |||
) | [virtual] |
Define the content of a 'slot' in the terrain grid.
x,y | The coordinates of the terrain slot relative to the centre slot (signed). | |
img | Heightfield image - this data is copied during the call so you may destroy your copy afterwards. | |
layers | Optional texture layers to use (if not supplied, default import data layers will be used) - this data is copied during the call so you may destroy your copy afterwards. |
virtual void Ogre::TerrainGroup::defineTerrain | ( | long | x, | |
long | y, | |||
const Terrain::ImportData * | importData | |||
) | [virtual] |
Define the content of a 'slot' in the terrain grid.
x,y | The coordinates of the terrain slot relative to the centre slot (signed). | |
importData | Import data - this data is copied during the call so you may destroy your copy afterwards. |
virtual void Ogre::TerrainGroup::defineTerrain | ( | long | x, | |
long | y, | |||
float | constantHeight | |||
) | [virtual] |
Define a 'slot' in the terrain grid - in this case a flat terrain.
x,y | The coordinates of the terrain slot relative to the centre slot (signed). | |
constantHeight | The constant, uniform height that you want the terrain to start at |
virtual void Ogre::TerrainGroup::defineTerrain | ( | long | x, | |
long | y | |||
) | [virtual] |
Define a 'slot' in the terrain grid - in this case to be loaded from a generated file name.
x,y | The coordinates of the terrain slot relative to the centre slot (signed). |
void Ogre::TerrainGroup::freeTemporaryResources | ( | ) |
Free as many resources as possible for optimal run-time memory use for all terrain tiles.
String Ogre::TerrainGroup::generateFilename | ( | long | x, | |
long | y | |||
) | const |
Generate a file name based on the current naming convention.
virtual Terrain::Alignment Ogre::TerrainGroup::getAlignment | ( | ) | const [virtual] |
Retrieve the alignment of the grid of terrain (cannot be modified after construction).
Definition at line 114 of file OgreTerrainGroup.h.
virtual Terrain::ImportData& Ogre::TerrainGroup::getDefaultImportSettings | ( | ) | [virtual] |
Retrieve a shared structure which will provide the base settings for all terrains created via this group.
Definition at line 102 of file OgreTerrainGroup.h.
const String& Ogre::TerrainGroup::getFilenameExtension | ( | ) | const |
Definition at line 154 of file OgreTerrainGroup.h.
const String& Ogre::TerrainGroup::getFilenamePrefix | ( | ) | const |
Definition at line 152 of file OgreTerrainGroup.h.
float Ogre::TerrainGroup::getHeightAtWorldPosition | ( | const Vector3 & | pos, | |
Terrain ** | ppTerrain = 0 | |||
) |
Get the height data for a given world position (projecting the point down on to the terrain).
pos | Position in world space. Positions will be clamped to the edge of the terrain | |
ppTerrain | Pointer to a pointer to a terrain which will be completed with the terrain that was found to resolve this query, or null if none were |
float Ogre::TerrainGroup::getHeightAtWorldPosition | ( | Real | x, | |
Real | y, | |||
Real | z, | |||
Terrain ** | ppTerrain = 0 | |||
) |
Get the height data for a given world position (projecting the point down on to the terrain underneath).
x,y,z | Position in world space. Positions will be clamped to the edge of the terrain | |
ppTerrain | Pointer to a pointer to a terrain which will be completed with the terrain that was found to resolve this query, or null if none were |
virtual const Vector3& Ogre::TerrainGroup::getOrigin | ( | ) | const [virtual] |
Retrieve the centre position of the grid of terrain.
Definition at line 110 of file OgreTerrainGroup.h.
const String& Ogre::TerrainGroup::getResourceGroup | ( | ) | const |
Get the resource group in which files will be located.
Definition at line 159 of file OgreTerrainGroup.h.
virtual SceneManager* Ogre::TerrainGroup::getSceneManager | ( | ) | const [virtual] |
Retrieve the SceneManager being used for this group.
Definition at line 135 of file OgreTerrainGroup.h.
virtual Terrain* Ogre::TerrainGroup::getTerrain | ( | long | x, | |
long | y | |||
) | const [virtual] |
Get the terrain instance at a given slot, if loaded.
x,y | The coordinates of the terrain slot relative to the centre slot (signed). |
virtual TerrainSlotDefinition* Ogre::TerrainGroup::getTerrainDefinition | ( | long | x, | |
long | y | |||
) | const [virtual] |
Get the definition of a slot in the terrain.
x,y | The coordinates of the terrain slot relative to the centre slot (signed). |
ConstTerrainIterator Ogre::TerrainGroup::getTerrainIterator | ( | ) | const |
Get an iterator over the defined terrains (const).
TerrainIterator Ogre::TerrainGroup::getTerrainIterator | ( | ) |
Get an iterator over the defined terrains.
virtual uint16 Ogre::TerrainGroup::getTerrainSize | ( | ) | const [virtual] |
Retrieve the size of each terrain instance in number of vertices down one side.
Definition at line 126 of file OgreTerrainGroup.h.
TerrainSlot* Ogre::TerrainGroup::getTerrainSlot | ( | long | x, | |
long | y | |||
) | const [protected] |
TerrainSlot* Ogre::TerrainGroup::getTerrainSlot | ( | long | x, | |
long | y, | |||
bool | createIfMissing | |||
) | [protected] |
Retrieve a slot, potentially allocate one.
Vector3 Ogre::TerrainGroup::getTerrainSlotPosition | ( | long | x, | |
long | y | |||
) | [protected] |
Get the position of a terrain instance.
virtual Real Ogre::TerrainGroup::getTerrainWorldSize | ( | ) | const [virtual] |
Retrieve the world size of each terrain instance.
Definition at line 118 of file OgreTerrainGroup.h.
WorkQueue::Response* Ogre::TerrainGroup::handleRequest | ( | const WorkQueue::Request * | req, | |
const WorkQueue * | srcQ | |||
) | [virtual] |
WorkQueue::RequestHandler override.
Implements Ogre::WorkQueue::RequestHandler.
void Ogre::TerrainGroup::handleResponse | ( | const WorkQueue::Response * | res, | |
const WorkQueue * | srcQ | |||
) | [virtual] |
WorkQueue::ResponseHandler override.
Implements Ogre::WorkQueue::ResponseHandler.
bool Ogre::TerrainGroup::isDerivedDataUpdateInProgress | ( | ) | const |
Calls Terrain::isDerivedDataUpdateInProgress on each loaded instance and returns true if any of them are undergoing a derived update.
virtual void Ogre::TerrainGroup::loadAllTerrains | ( | bool | synchronous = false |
) | [virtual] |
Load any terrain instances that have been defined but not loaded yet.
synchronous | Whether we should force this to happen entirely in the primary thread (default false, operations are threaded if possible) |
void Ogre::TerrainGroup::loadGroupDefinition | ( | StreamSerialiser & | stream | ) |
Load the group definition only in native form from a serializing stream.
void Ogre::TerrainGroup::loadGroupDefinition | ( | const String & | filename | ) |
Load the group definition only in native form from a file.
virtual void Ogre::TerrainGroup::loadTerrain | ( | long | x, | |
long | y, | |||
bool | synchronous = false | |||
) | [virtual] |
Load a specific terrain slot based on the definition that has already been supplied.
x,y | The coordinates of the terrain slot relative to the centre slot (signed). | |
synchronous | Whether we should force this to happen entirely in the primary thread (default false, operations are threaded if possible) |
void Ogre::TerrainGroup::loadTerrainImpl | ( | TerrainSlot * | slot, | |
bool | synchronous | |||
) | [protected] |
void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr, | |
const char * | , | |||
int | , | |||
const char * | ||||
) | [inherited] |
Definition at line 107 of file OgreMemoryAllocatedObject.h.
void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr, | |
void * | ||||
) | [inherited] |
Definition at line 101 of file OgreMemoryAllocatedObject.h.
void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr | ) | [inherited] |
Definition at line 95 of file OgreMemoryAllocatedObject.h.
void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr, | |
const char * | , | |||
int | , | |||
const char * | ||||
) | [inherited] |
Definition at line 118 of file OgreMemoryAllocatedObject.h.
void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr | ) | [inherited] |
Definition at line 112 of file OgreMemoryAllocatedObject.h.
void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz, | |
void * | ptr | |||
) | [inherited] |
placement operator new
Definition at line 78 of file OgreMemoryAllocatedObject.h.
void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz | ) | [inherited] |
Definition at line 72 of file OgreMemoryAllocatedObject.h.
void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz, | |
const char * | file, | |||
int | line, | |||
const char * | func | |||
) | [inherited] |
operator new, with debug line info
Definition at line 67 of file OgreMemoryAllocatedObject.h.
void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz | ) | [inherited] |
Definition at line 90 of file OgreMemoryAllocatedObject.h.
void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz, | |
const char * | file, | |||
int | line, | |||
const char * | func | |||
) | [inherited] |
array operator new, with debug line info
Definition at line 85 of file OgreMemoryAllocatedObject.h.
uint32 Ogre::TerrainGroup::packIndex | ( | long | x, | |
long | y | |||
) | const |
Convert coordinates to a packed integer index.
Test for intersection of a given ray with any terrain in the group.
If the ray hits a terrain, the point of intersection and terrain instance is returned.
ray | The ray to test for intersection | |
distanceLimit | The distance from the ray origin at which we will stop looking, 0 indicates no limit |
void Ogre::TerrainGroup::removeAllTerrains | ( | ) |
Remove all terrain instances.
virtual void Ogre::TerrainGroup::removeTerrain | ( | long | x, | |
long | y | |||
) | [virtual] |
Remove a specific terrain slot.
x,y | The coordinates of the terrain slot relative to the centre slot (signed). |
void Ogre::TerrainGroup::saveAllTerrains | ( | bool | onlyIfModified, | |
bool | replaceManualFilenames = true | |||
) |
Save all terrain instances using the assigned file names, or via the filename convention.
onlyIfModified | If true, only terrains that have been modified since load(), or since the last save(), will be saved. You want to set this to true if you loaded the terrain from these same files, but false if you defined them using some other input data since the files wouldn't exist. | |
replaceManualFilenames | If true, replaces any manually defined filenames in the TerrainSlotDefinition with the generated names from the convention. This is recommended since it makes everything more consistent, although you might want to use manual filenames in the original definition to import previously separate data. |
void Ogre::TerrainGroup::saveGroupDefinition | ( | StreamSerialiser & | stream | ) |
Save the group data only in native form to a serializing stream.
void Ogre::TerrainGroup::saveGroupDefinition | ( | const String & | filename | ) |
Save the group data only in native form to a file.
Set the naming convention for file names in this terrain group.
void Ogre::TerrainGroup::setFilenameExtension | ( | const String & | extension | ) |
void Ogre::TerrainGroup::setFilenamePrefix | ( | const String & | prefix | ) |
virtual void Ogre::TerrainGroup::setOrigin | ( | const Vector3 & | pos | ) | [virtual] |
Define the centre position of the grid of terrain.
void Ogre::TerrainGroup::setResourceGroup | ( | const String & | grp | ) |
Set the resource group in which files will be located.
Definition at line 157 of file OgreTerrainGroup.h.
virtual void Ogre::TerrainGroup::setTerrainSize | ( | uint16 | newTerrainSize | ) | [virtual] |
Set the size of each terrain instance in number of vertices down one side.
newTerrainSize | the new map size of each terrain instance |
virtual void Ogre::TerrainGroup::setTerrainWorldSize | ( | Real | newWorldSize | ) | [virtual] |
Set the world size of terrain.
newWorldSize | the new world size of each terrain instance |
void Ogre::TerrainGroup::sphereIntersects | ( | const Sphere & | sphere, | |
TerrainList * | resultList | |||
) | const |
Test intersection of a sphere with the terrain.
sphere | The sphere you want to test in world units | |
resultList | Pointer to a list of terrain pointers which will be updated to include just the terrains that overlap |
virtual void Ogre::TerrainGroup::unloadTerrain | ( | long | x, | |
long | y | |||
) | [virtual] |
Unload a specific terrain slot.
x,y | The coordinates of the terrain slot relative to the centre slot (signed). |
void Ogre::TerrainGroup::unpackIndex | ( | uint32 | key, | |
long * | x, | |||
long * | y | |||
) |
Convert a packed integer index to coordinates.
void Ogre::TerrainGroup::update | ( | bool | synchronous = false |
) |
Trigger the update process for all terrain instances.
void Ogre::TerrainGroup::updateDerivedData | ( | bool | synchronous = false , |
|
uint8 | typeMask = 0xFF | |||
) |
Updates derived data for all terrains (LOD, lighting) to reflect changed height data.
void Ogre::TerrainGroup::updateGeometry | ( | ) |
Performs an update on all terrain geometry.
const uint32 Ogre::TerrainGroup::CHUNK_ID [static] |
Definition at line 496 of file OgreTerrainGroup.h.
const uint16 Ogre::TerrainGroup::CHUNK_VERSION [static] |
Definition at line 497 of file OgreTerrainGroup.h.
Terrain::Alignment Ogre::TerrainGroup::mAlignment [protected] |
Definition at line 501 of file OgreTerrainGroup.h.
Definition at line 511 of file OgreTerrainGroup.h.
Definition at line 504 of file OgreTerrainGroup.h.
String Ogre::TerrainGroup::mFilenameExtension [protected] |
Definition at line 509 of file OgreTerrainGroup.h.
String Ogre::TerrainGroup::mFilenamePrefix [protected] |
Definition at line 508 of file OgreTerrainGroup.h.
Vector3 Ogre::TerrainGroup::mOrigin [protected] |
Definition at line 505 of file OgreTerrainGroup.h.
String Ogre::TerrainGroup::mResourceGroup [protected] |
Definition at line 510 of file OgreTerrainGroup.h.
SceneManager* Ogre::TerrainGroup::mSceneManager [protected] |
Definition at line 500 of file OgreTerrainGroup.h.
uint16 Ogre::TerrainGroup::mTerrainSize [protected] |
Definition at line 502 of file OgreTerrainGroup.h.
TerrainSlotMap Ogre::TerrainGroup::mTerrainSlots [protected] |
Definition at line 506 of file OgreTerrainGroup.h.
Real Ogre::TerrainGroup::mTerrainWorldSize [protected] |
Definition at line 503 of file OgreTerrainGroup.h.
uint16 Ogre::TerrainGroup::mWorkQueueChannel [protected] |
Definition at line 507 of file OgreTerrainGroup.h.
const uint16 Ogre::TerrainGroup::WORKQUEUE_LOAD_REQUEST [static] |
Definition at line 495 of file OgreTerrainGroup.h.
Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Fri May 25 23:42:05 2012