Public Member Functions | Public Attributes
Ogre::Terrain::ImportData Struct Reference

Structure encapsulating import data that you may use to bootstrap the terrain without loading from a native data stream. More...

#include <OgreTerrain.h>

List of all members.

Public Member Functions

 ImportData ()
 ImportData (const ImportData &rhs)
ImportDataoperator= (const ImportData &rhs)
void destroy ()
 Delete any input data if this struct is set to do so.
 ~ImportData ()

Public Attributes

Alignment terrainAlign
 The alignment of the terrain.
uint16 terrainSize
 Terrain size (along one edge) in vertices; must be 2^n+1.
uint16 maxBatchSize
 Maximum batch size (along one edge) in vertices; must be 2^n+1 and <= 65.
uint16 minBatchSize
 Minimum batch size (along one edge) in vertices; must be 2^n+1.
Vector3 pos
 Position of the terrain.
Real worldSize
 The world size of the terrain.
ImageinputImage
 Optional heightmap providing the initial heights for the terrain.
float * inputFloat
 Optional list of terrainSize * terrainSize floats defining the terrain.
float constantHeight
 If neither inputImage or inputFloat are supplied, the constant height at which the initial terrain should be created (flat).
bool deleteInputData
 Whether this structure should 'own' the input data (inputImage and inputFloat), and therefore delete it on destruction.
Real inputScale
 How to scale the input values provided (if any)
Real inputBias
 How to bias the input values provided (if any)
TerrainLayerDeclaration layerDeclaration
 Definition of the contents of each layer (required).
LayerInstanceList layerList
 List of layer structures, one for each layer required.

Detailed Description

Structure encapsulating import data that you may use to bootstrap the terrain without loading from a native data stream.

Definition at line 318 of file OgreTerrain.h.


Constructor & Destructor Documentation

Ogre::Terrain::ImportData::ImportData ( )

Definition at line 394 of file OgreTerrain.h.

Ogre::Terrain::ImportData::ImportData ( const ImportData rhs)

Definition at line 411 of file OgreTerrain.h.

Ogre::Terrain::ImportData::~ImportData ( )

Definition at line 482 of file OgreTerrain.h.


Member Function Documentation

void Ogre::Terrain::ImportData::destroy ( void  )

Delete any input data if this struct is set to do so.

Definition at line 470 of file OgreTerrain.h.

References Ogre::MEMCATEGORY_GEOMETRY, OGRE_DELETE, and OGRE_FREE.

ImportData& Ogre::Terrain::ImportData::operator= ( const ImportData rhs)

Member Data Documentation

If neither inputImage or inputFloat are supplied, the constant height at which the initial terrain should be created (flat).

Definition at line 367 of file OgreTerrain.h.

Referenced by operator=().

Whether this structure should 'own' the input data (inputImage and inputFloat), and therefore delete it on destruction.

The default is false so you have to manage your own memory. If you set it to true, then you must have allocated the memory through OGRE_NEW (for Image) and OGRE_ALLOC_T (for inputFloat), the latter with the category MEMCATEGORY_GEOMETRY.

Definition at line 376 of file OgreTerrain.h.

Referenced by operator=().

How to bias the input values provided (if any)

Definition at line 381 of file OgreTerrain.h.

Referenced by operator=().

Optional list of terrainSize * terrainSize floats defining the terrain.

The list of floats wil be interpreted such that the first row in the array equates to the bottom row of vertices.

Definition at line 362 of file OgreTerrain.h.

Referenced by operator=().

Optional heightmap providing the initial heights for the terrain.

Remarks:
If supplied, should ideally be terrainSize * terrainSize, but if it isn't it will be resized.

Definition at line 356 of file OgreTerrain.h.

Referenced by operator=().

How to scale the input values provided (if any)

Definition at line 379 of file OgreTerrain.h.

Referenced by operator=().

Definition of the contents of each layer (required).

Most likely, you will pull a declaration from a TerrainMaterialGenerator of your choice.

Definition at line 387 of file OgreTerrain.h.

Referenced by operator=().

List of layer structures, one for each layer required.

Can be empty or underfilled if required, list will be padded with blank textures.

Definition at line 392 of file OgreTerrain.h.

Referenced by operator=().

Maximum batch size (along one edge) in vertices; must be 2^n+1 and <= 65.

Remarks:
The terrain will be divided into hierarchical tiles, and this is the maximum size of one tile in vertices (at any LOD).

Definition at line 329 of file OgreTerrain.h.

Referenced by operator=().

Minimum batch size (along one edge) in vertices; must be 2^n+1.

Remarks:
The terrain will be divided into tiles, and this is the minimum size of one tile in vertices (at any LOD). Adjacent tiles will be collected together into one batch to drop LOD levels once they are individually at this minimum, so setting this value higher means greater batching at the expense of making adjacent tiles use a common LOD. Once the entire terrain is collected together into one batch this effectively sets the minimum LOD.

Definition at line 340 of file OgreTerrain.h.

Referenced by operator=().

Position of the terrain.

Remarks:
Represents the position of the centre of the terrain.

Definition at line 346 of file OgreTerrain.h.

Referenced by operator=().

The alignment of the terrain.

Definition at line 321 of file OgreTerrain.h.

Referenced by operator=().

Terrain size (along one edge) in vertices; must be 2^n+1.

Definition at line 323 of file OgreTerrain.h.

Referenced by operator=().

The world size of the terrain.

Definition at line 349 of file OgreTerrain.h.

Referenced by operator=().


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

Copyright © 2008 Torus Knot Software Ltd
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Sat Jan 14 2012 18:40:57