5 #ifndef MERCATOR_HEIGHTMAP_H 6 #define MERCATOR_HEIGHTMAP_H 11 #include <wfmath/vector.h> 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
Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...
Template for managing buffers of data for a segment.
float getMax() const
Accessor for the maximum height value in this Segment.
float getMin() const
Accessor for the minimum height value in this Segment.
int getResolution() const
Accessor for resolution of this segment.
Point on the fundamental grid that is used as the basis for terrain.