OGRE  2.0
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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>

+ Collaboration diagram for Ogre::Terrain::ImportData:

Public Member Functions

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

Public Attributes

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

Detailed Description

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

Definition at line 327 of file OgreTerrain.h.

Constructor & Destructor Documentation

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

Definition at line 403 of file OgreTerrain.h.

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

Definition at line 420 of file OgreTerrain.h.

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

Definition at line 491 of file OgreTerrain.h.

Member Function Documentation

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

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

Definition at line 479 of file OgreTerrain.h.

References Ogre::MEMCATEGORY_GEOMETRY, OGRE_DELETE, and OGRE_FREE.

Member Data Documentation

float Ogre::Terrain::ImportData::constantHeight

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

Definition at line 376 of file OgreTerrain.h.

Referenced by operator=().

bool Ogre::Terrain::ImportData::deleteInputData

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 385 of file OgreTerrain.h.

Referenced by operator=().

Real Ogre::Terrain::ImportData::inputBias

How to bias the input values provided (if any)

Definition at line 390 of file OgreTerrain.h.

Referenced by operator=().

float* Ogre::Terrain::ImportData::inputFloat

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 371 of file OgreTerrain.h.

Referenced by operator=().

Image* Ogre::Terrain::ImportData::inputImage

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 365 of file OgreTerrain.h.

Referenced by operator=().

Real Ogre::Terrain::ImportData::inputScale

How to scale the input values provided (if any)

Definition at line 388 of file OgreTerrain.h.

Referenced by operator=().

TerrainLayerDeclaration Ogre::Terrain::ImportData::layerDeclaration

Definition of the contents of each layer (required).

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

Definition at line 396 of file OgreTerrain.h.

Referenced by operator=().

LayerInstanceList Ogre::Terrain::ImportData::layerList

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 401 of file OgreTerrain.h.

Referenced by operator=().

uint16 Ogre::Terrain::ImportData::maxBatchSize

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 338 of file OgreTerrain.h.

Referenced by operator=().

uint16 Ogre::Terrain::ImportData::minBatchSize

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 349 of file OgreTerrain.h.

Referenced by operator=().

Vector3 Ogre::Terrain::ImportData::pos

Position of the terrain.

Remarks
Represents the position of the centre of the terrain.

Definition at line 355 of file OgreTerrain.h.

Referenced by operator=().

Alignment Ogre::Terrain::ImportData::terrainAlign

The alignment of the terrain.

Definition at line 330 of file OgreTerrain.h.

Referenced by operator=().

uint16 Ogre::Terrain::ImportData::terrainSize

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

Definition at line 332 of file OgreTerrain.h.

Referenced by operator=().

Real Ogre::Terrain::ImportData::worldSize

The world size of the terrain.

Definition at line 358 of file OgreTerrain.h.

Referenced by operator=().


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