Stellarium
23.4
|
This represents a heightmap for viewer-ground collision. More...
#include <Heightmap.hpp>
Public Types | |
typedef QVector< unsigned int > | IdxList |
typedef QVector< Vec3f > | PosList |
Public Member Functions | |
Heightmap () | |
Construct a heightmap from a loaded OBJ mesh. More... | |
void | setMeshData (const IdxList &indexList, const PosList &posList, const AABBox *bbox=nullptr) |
Sets the mesh data to use. If the bbox is given, min/max calculation is skipped and its values are taken. | |
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 | |
float | getNullHeight () const |
This represents a heightmap for viewer-ground collision.
Heightmap::Heightmap | ( | ) |
Construct a heightmap from a loaded OBJ mesh.
The mesh is stored as reference and used for calculations.
obj | Mesh for building the heightmap. |
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.
x | x-value |
y | y-value |