#include <terrain.h>
Collaboration diagram for TerrainHeightmap:
Public Member Functions | |
TerrainHeightmap (float fHScale=10.0f, float fVScale=5.0f) | |
virtual | ~TerrainHeightmap () |
void | Load (ImageData *pkImage) |
void | Load (const std::string &rstrFilename, int iSize) |
int | GetIndex (int x, int y) const |
float | GetHeight (int x, int y) const |
const Vector3d & | GetNormal (int x, int y) const |
float | GetWorldHeight (float x, float y) |
float | GetMaxHeight () |
float | GetMinHeight () |
const int | GetSize () const |
const float | GetHScale () const |
const float | GetVScale () const |
Protected Attributes | |
float * | m_pfData |
int | m_iSize |
Vector3d * | m_pkNormalData |
float | m_fHScale |
float | m_fVScale |
float | m_fMaxHeight |
float | m_fMinHeight |
|
Initialize heightmap
|
|
|
|
Load the elevation data and size from an ImageData object.
|
|
Load the elevation data from a file
|
|
Get the index
|
|
Get the height of a point in heightmap-space.
|
|
Get vertex normal of a point in heightmap-space
|
|
Gets elevation in world units (eg, between elevation grid), where x and y are still considered ground-level
|
|
Returns the maximum height of any point in the heightmap
|
|
Returns the minimum height of any point in the heightmap
|
|
Returns the size of one side of the heightmap
|
|
Get the horizontal scaling factor for the heightmap
|
|
Get the vertical scaling factor for the heightmap
|
|
The elevation data |
|
Size of one side of the heightmap. Heightmaps must be square. |
|
The normals |
|
Scale factor in XY domains |
|
Scale factor in the Z domain |
|
The highest height value in the map |
|
The lowest height value in the map |