5 #ifndef MERCATOR_HEIGHTMAP_H 6 #define MERCATOR_HEIGHTMAP_H 11 #include <wfmath/vector.h> 31 explicit HeightMap(
unsigned int resolution);
40 float get(
int x,
int z)
const {
41 return m_data[z * (m_res + 1) + x];
44 void getHeightAndNormal(
float x,
float z,
float &h,
45 WFMath::Vector<3> &normal)
const;
46 void getHeight(
float x,
float z,
float &h)
const;
49 float getMax()
const {
return m_max; }
51 float getMin()
const {
return m_min; }
56 void checkMaxMin(
float h);
62 float qRMD(WFMath::MTRand& rng,
float nn,
float fn,
float ff,
float nf,
63 float roughness,
float falloff,
float depth)
const;
70 #endif // MERCATOR_HEIGHTMAP_H Definition: HeightMap.h:13
Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...
Definition: HeightMap.h:21
Template for managing buffers of data for a segment.
Definition: Buffer.h:12
int getResolution() const
Accessor for resolution of this segment.
Definition: HeightMap.h:35
float getMin() const
Accessor for the minimum height value in this Segment.
Definition: HeightMap.h:51
Point on the fundamental grid that is used as the basis for terrain.
Definition: BasePoint.h:19
float getMax() const
Accessor for the maximum height value in this Segment.
Definition: HeightMap.h:49