Loading...
Searching...
No Matches
Ogre::TerrainLodManager Class Reference
Optional Components » Terrain

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, const String &filename="")
| TerrainLodManager (Terrain *t, DataStreamPtr &stream)
virtual | ~TerrainLodManager ()
void | close ()
void | fillBufferAtLod (uint lodLevel, const float *data, uint dataSize)
| Copy geometry data from buffer to mHeightData/mDeltaData.
int | getHighestLodLoaded ()
int | getHighestLodPrepared ()
LodInfo & | getLodInfo (uint lodLevel)
int | getTargetLodLevel ()
bool | isOpen () const
void | open (const String &filename)
void | readLodData (uint16 lowerLodBound, uint16 higherLodBound)
| Read separated geometry data from file into allocated memory.
void | updateToLodLevel (int lodLevel, bool synchronous=false)
void | waitForDerivedProcesses ()

## Static Public Member Functions

static void | saveLodData (StreamSerialiser &stream, Terrain *terrain)
| Save each LOD level separately compressed so seek is possible.

## Static Public Attributes

static const uint32 | TERRAINLODDATA_CHUNK_ID
static const uint16 | TERRAINLODDATA_CHUNK_VERSION

## Detailed Description

Terrain LOD data manager.

  This class is used for managing terrain LOD data's loading, unloading.

## Member Typedef Documentation

## LodData

typedef std::vector<float> Ogre::TerrainLodManager::LodData

## LodsData

typedef std::vector<LodData> Ogre::TerrainLodManager::LodsData

## Constructor & Destructor Documentation

## TerrainLodManager() [1/2]

Ogre::TerrainLodManager::TerrainLodManager | ( | Terrain * | t,
|  | DataStreamPtr & | stream )

Referenced by Ogre::TerrainLodManager::LoadLodRequest::LoadLodRequest().

## TerrainLodManager() [2/2]

Ogre::TerrainLodManager::TerrainLodManager | ( | Terrain * | t,
|  | const String & | filename = "" )

## ~TerrainLodManager()

virtual Ogre::TerrainLodManager::~TerrainLodManager | ( |  | ) |

virtual

## Member Function Documentation

## open()

void Ogre::TerrainLodManager::open | ( | const String & | filename | ) |

## close()

void Ogre::TerrainLodManager::close | ( |  | ) |

## isOpen()

bool Ogre::TerrainLodManager::isOpen | ( |  | ) | const

## updateToLodLevel()

void Ogre::TerrainLodManager::updateToLodLevel | ( | int | lodLevel,
|  | bool | synchronous = false )

## saveLodData()

void Ogre::TerrainLodManager::saveLodData | ( | StreamSerialiser & | stream,
|  | Terrain * | terrain )

static

Save each LOD level separately compressed so seek is possible.

## fillBufferAtLod()

void Ogre::TerrainLodManager::fillBufferAtLod | ( | uint | lodLevel,
|  | const float * | data,
|  | uint | dataSize )

Copy geometry data from buffer to mHeightData/mDeltaData.

Parameters

  lodLevel | A LOD level to work with
  data,dataSize | Buffer which holds geometry data if separated form

Remarks
  Data in buffer has to be both height and delta data. First half is height data. Seconds half is delta data.

## readLodData()

void Ogre::TerrainLodManager::readLodData | ( | uint16 | lowerLodBound,
|  | uint16 | higherLodBound )

Read separated geometry data from file into allocated memory.

Parameters

  lowerLodBound | Lower bound of LOD levels to load
  higherLodBound | Upper bound of LOD levels to load

Remarks
  Geometry data are uncompressed using inflate() and stored into allocated buffer

## waitForDerivedProcesses()

void Ogre::TerrainLodManager::waitForDerivedProcesses | ( |  | ) |

## getHighestLodPrepared()

int Ogre::TerrainLodManager::getHighestLodPrepared | ( |  | ) |

inline

## getHighestLodLoaded()

int Ogre::TerrainLodManager::getHighestLodLoaded | ( |  | ) |

inline

## getTargetLodLevel()

int Ogre::TerrainLodManager::getTargetLodLevel | ( |  | ) |

inline

## getLodInfo()

LodInfo & Ogre::TerrainLodManager::getLodInfo | ( | uint | lodLevel | ) |

inline

## Member Data Documentation

## TERRAINLODDATA_CHUNK_ID

const uint32 Ogre::TerrainLodManager::TERRAINLODDATA_CHUNK_ID

static

## TERRAINLODDATA_CHUNK_VERSION

const uint16 Ogre::TerrainLodManager::TERRAINLODDATA_CHUNK_VERSION

static

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

- OgreTerrainLodManager.h