Stellarium  0.90.0
List of all members | Classes | Public Types | Public Member Functions
Heightmap Class Reference

This represents a heightmap for viewer-ground collision. More...

#include <Heightmap.hpp>

Public Types

typedef QVector< unsigned int > IdxList
 
typedef QVector< Vec3fPosList
 

Public Member Functions

 Heightmap ()
 Construct a heightmap from a loaded OBJ mesh. More...
 
void setMeshData (const IdxList &indexList, const PosList &posList, const AABBox *bbox=Q_NULLPTR)
 Sets the mesh data to use. If the bbox is given, min/max calculation is skipped and its values are taken. More...
 
float getHeight (const float x, const float y) const
 Get z Value at (x,y) coordinates. More...
 
void setNullHeight (float h)
 set/retrieve default height More...
 
float getNullHeight () const
 

Detailed Description

This represents a heightmap for viewer-ground collision.

Definition at line 27 of file Heightmap.hpp.

Constructor & Destructor Documentation

Heightmap::Heightmap ( )

Construct a heightmap from a loaded OBJ mesh.

The mesh is stored as reference and used for calculations.

Parameters
objMesh for building the heightmap.

Member Function Documentation

float Heightmap::getHeight ( const float  x,
const float  y 
) const

Get z Value at (x,y) coordinates.

In case of ambiguities always returns the maximum height.

Parameters
xx-value
yy-value
Returns
z-Value at position given by x and y
void Heightmap::setMeshData ( const IdxList &  indexList,
const PosList &  posList,
const AABBox bbox = Q_NULLPTR 
)

Sets the mesh data to use. If the bbox is given, min/max calculation is skipped and its values are taken.

void Heightmap::setNullHeight ( float  h)
inline

set/retrieve default height

Definition at line 51 of file Heightmap.hpp.


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