![]() |
OGRE
1.12.12
Object-Oriented Graphics Rendering Engine
|
Terrain LOD data manager. More...
#include <OgreTerrainLodManager.h>
Classes | |
struct | LoadLodRequest |
struct | LodInfo |
Public Types | |
typedef std::vector< float > | LodData |
typedef std::vector< LodData > | LodsData |
Public Member Functions | |
TerrainLodManager (Terrain *t, DataStreamPtr &stream) | |
TerrainLodManager (Terrain *t, const String &filename="") | |
virtual | ~TerrainLodManager () |
virtual bool | canHandleRequest (const WorkQueue::Request *req, const WorkQueue *srcQ) |
Return whether this handler can process a given request. More... | |
virtual bool | canHandleResponse (const WorkQueue::Response *res, const WorkQueue *srcQ) |
Return whether this handler can process a given response. More... | |
void | close () |
void | fillBufferAtLod (uint lodLevel, const float *data, uint dataSize) |
Copy geometry data from buffer to mHeightData/mDeltaData. More... | |
int | getHighestLodLoaded () |
int | getHighestLodPrepared () |
LodInfo & | getLodInfo (uint lodLevel) |
int | getTargetLodLevel () |
virtual WorkQueue::Response * | handleRequest (const WorkQueue::Request *req, const WorkQueue *srcQ) |
The handler method every subclass must implement. More... | |
virtual void | handleResponse (const WorkQueue::Response *res, const WorkQueue *srcQ) |
The handler method every subclass must implement. More... | |
bool | isOpen () const |
void | open (const String &filename) |
void | readLodData (uint16 lowerLodBound, uint16 higherLodBound) |
Read separated geometry data from file into allocated memory. More... | |
void | updateToLodLevel (int lodLevel, bool synchronous=false) |
void | waitForDerivedProcesses () |
![]() | |
RequestHandler () | |
virtual | ~RequestHandler () |
![]() | |
ResponseHandler () | |
virtual | ~ResponseHandler () |
Static Public Member Functions | |
static void | saveLodData (StreamSerialiser &stream, Terrain *terrain) |
Save each LOD level separately compressed so seek is possible. More... | |
Static Public Attributes | |
static const uint32 | TERRAINLODDATA_CHUNK_ID |
static const uint16 | TERRAINLODDATA_CHUNK_VERSION |
static const uint16 | WORKQUEUE_LOAD_LOD_DATA_REQUEST |
Terrain LOD data manager.
typedef std::vector<float> Ogre::TerrainLodManager::LodData |
typedef std::vector<LodData> Ogre::TerrainLodManager::LodsData |
Ogre::TerrainLodManager::TerrainLodManager | ( | Terrain * | t, |
DataStreamPtr & | stream | ||
) |
|
virtual |
void Ogre::TerrainLodManager::open | ( | const String & | filename | ) |
void Ogre::TerrainLodManager::close | ( | ) |
bool Ogre::TerrainLodManager::isOpen | ( | ) | const |
|
virtual |
Return whether this handler can process a given request.
Reimplemented from Ogre::WorkQueue::RequestHandler.
|
virtual |
Return whether this handler can process a given response.
Reimplemented from Ogre::WorkQueue::ResponseHandler.
|
virtual |
The handler method every subclass must implement.
If a failure is encountered, return a Response with a failure result rather than raise an exception.
req | The Request structure, which is effectively owned by the handler during this call. It must be attached to the returned Response regardless of success or failure. |
srcQ | The work queue that this request originated from |
Implements Ogre::WorkQueue::RequestHandler.
|
virtual |
The handler method every subclass must implement.
res | The Response structure. The caller is responsible for deleting this after the call is made, none of the data contained (except pointers to structures in user Any data) will persist after this call is returned. |
srcQ | The work queue that this request originated from |
Implements Ogre::WorkQueue::ResponseHandler.
void Ogre::TerrainLodManager::updateToLodLevel | ( | int | lodLevel, |
bool | synchronous = false |
||
) |
|
static |
Save each LOD level separately compressed so seek is possible.
Copy geometry data from buffer to mHeightData/mDeltaData.
lodLevel | A LOD level to work with |
data,dataSize | Buffer which holds geometry data if separated form |
Read separated geometry data from file into allocated memory.
lowerLodBound | Lower bound of LOD levels to load |
higherLodBound | Upper bound of LOD levels to load |
void Ogre::TerrainLodManager::waitForDerivedProcesses | ( | ) |
|
inline |
Referenced by Ogre::Terrain::getHighestLodPrepared().
|
inline |
Referenced by Ogre::Terrain::getHighestLodLoaded().
|
inline |
Referenced by Ogre::Terrain::getTargetLodLevel().
|
static |
|
static |
|
static |