i6engine  1.0
i6e::modules::Terrain Class Reference

Saves all Terrain-specific things. More...

#include <D:/Projekte/i6engine/libs/i6engine-modules/include/i6engine/modules/graphics/Terrain.h>

Public Member Functions

 Terrain (GraphicsManager *manager, const std::string &heightmap, const double size, double inputScale, uint16_t vertices, const std::vector< std::tuple< double, std::string, std::string, double, double >> &layers, int64_t minX, int64_t minY, int64_t maxX, int64_t maxY)
 Creates a new Terrain Creates a new Ogre terrain by using Ogre's TerrainGroup object with a heightmap Thereby passing a filename and calling Ogre's loadAllTerrains Then configuring. More...
 
 Terrain (GraphicsManager *manager, const std::vector< std::vector< double >> &heightdata, const double size, double inputScale, uint16_t vertices, const std::vector< std::tuple< double, std::string, std::string, double, double >> &layers, int64_t minX, int64_t minY, int64_t maxX, int64_t maxY)
 Creates a new Terrain Creates a new Ogre terrain by using Ogre's TerrainGroup object with heightdata Thereby passing a filename and calling Ogre's loadAllTerrains Then configuring. More...
 
 ~Terrain ()
 Terrain::~Terrain() Calls Ogre's terrain object delete functions. More...
 
void defineTerrainHeightmap (const int64_t x, const int64_t y)
 Configures Ogre Terrain using heightmap. More...
 
void defineTerrainHeightdata (const int64_t x, const int64_t y)
 Configures Ogre Terrain using heightdata. More...
 
void configureTerrainDefaults ()
 Terrain::configureTerrainDefaults() Configures Ogre Terrain using default values. More...
 
void getTerrainImage (const bool flipX, const bool flipY, Ogre::Image &img)
 Terrain::getTerrainImage(const bool flipX, const bool flipY, Ogre::Image & img) loads an Ogre terain image and flips it depending on flipX and flipY params. More...
 
void initBlendMaps (Ogre::Terrain *terrain)
 
Ogre::TerrainGroup * getTerrainGroup () const
 Returns a pointer to the TerrainGroup of the graphics library Returns a pointer to the TerrainGroup of the graphics library. More...
 
Ogre::TerrainGlobalOptions * getTerrainGlobalOptions () const
 Returns a pointer to the TerrainGlobalsOptions of the graphics library Returns a pointer to the TerrainGlobalOptions of the graphics library. More...
 
void setHeightAtPosition (uint64_t x, uint64_t z, double height)
 sets height at position More...
 
void saveCollisionShape (const std::string &outFile)
 saves collision shape as bullet collisionshape to given file More...
 
bool isDirty () const
 
void update ()
 

Detailed Description

Saves all Terrain-specific things.

Definition at line 52 of file Terrain.h.

Constructor & Destructor Documentation

i6e::modules::Terrain::Terrain ( GraphicsManager manager,
const std::string &  heightmap,
const double  size,
double  inputScale,
uint16_t  vertices,
const std::vector< std::tuple< double, std::string, std::string, double, double >> &  layers,
int64_t  minX,
int64_t  minY,
int64_t  maxX,
int64_t  maxY 
)

Creates a new Terrain Creates a new Ogre terrain by using Ogre's TerrainGroup object with a heightmap Thereby passing a filename and calling Ogre's loadAllTerrains Then configuring.

i6e::modules::Terrain::Terrain ( GraphicsManager manager,
const std::vector< std::vector< double >> &  heightdata,
const double  size,
double  inputScale,
uint16_t  vertices,
const std::vector< std::tuple< double, std::string, std::string, double, double >> &  layers,
int64_t  minX,
int64_t  minY,
int64_t  maxX,
int64_t  maxY 
)

Creates a new Terrain Creates a new Ogre terrain by using Ogre's TerrainGroup object with heightdata Thereby passing a filename and calling Ogre's loadAllTerrains Then configuring.

i6e::modules::Terrain::~Terrain ( )

Terrain::~Terrain() Calls Ogre's terrain object delete functions.

Member Function Documentation

void i6e::modules::Terrain::configureTerrainDefaults ( )

Terrain::configureTerrainDefaults() Configures Ogre Terrain using default values.

void i6e::modules::Terrain::defineTerrainHeightdata ( const int64_t  x,
const int64_t  y 
)

Configures Ogre Terrain using heightdata.

void i6e::modules::Terrain::defineTerrainHeightmap ( const int64_t  x,
const int64_t  y 
)

Configures Ogre Terrain using heightmap.

Ogre::TerrainGlobalOptions* i6e::modules::Terrain::getTerrainGlobalOptions ( ) const
inline

Returns a pointer to the TerrainGlobalsOptions of the graphics library Returns a pointer to the TerrainGlobalOptions of the graphics library.

Definition at line 110 of file Terrain.h.

Ogre::TerrainGroup* i6e::modules::Terrain::getTerrainGroup ( ) const
inline

Returns a pointer to the TerrainGroup of the graphics library Returns a pointer to the TerrainGroup of the graphics library.

Definition at line 104 of file Terrain.h.

void i6e::modules::Terrain::getTerrainImage ( const bool  flipX,
const bool  flipY,
Ogre::Image &  img 
)

Terrain::getTerrainImage(const bool flipX, const bool flipY, Ogre::Image & img) loads an Ogre terain image and flips it depending on flipX and flipY params.

void i6e::modules::Terrain::initBlendMaps ( Ogre::Terrain *  terrain)
bool i6e::modules::Terrain::isDirty ( ) const
inline

Definition at line 122 of file Terrain.h.

void i6e::modules::Terrain::saveCollisionShape ( const std::string &  outFile)

saves collision shape as bullet collisionshape to given file

void i6e::modules::Terrain::setHeightAtPosition ( uint64_t  x,
uint64_t  z,
double  height 
)

sets height at position

void i6e::modules::Terrain::update ( )

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