5 #ifndef MERCATOR_TERRAIN_MOD_H 6 #define MERCATOR_TERRAIN_MOD_H 10 #include <wfmath/intersect.h> 11 #include <wfmath/ball.h> 44 virtual void apply(
float &point,
int x,
int z)
const = 0;
51 template <
template <
int>
class Shape>
62 bool checkIntersects(
const Segment& s)
const override;
64 void setShape(
const Shape<2> & s);
74 template <
template <
int>
class Shape>
90 virtual void apply(
float &point,
int x,
int z)
const;
92 void setShape(
float level,
const Shape<2> & s);
103 template <
template <
int>
class Shape>
120 virtual void apply(
float &point,
int x,
int z)
const;
122 void setShape(
float dist,
const Shape<2> & s);
133 template <
template <
int>
class Shape>
152 virtual void apply(
float &point,
int x,
int z)
const;
154 void setShape(
float level,
float dx,
float dz,
const Shape<2> & s);
169 template <
template <
int>
class Shape>
184 virtual void apply(
float &point,
int x,
int z)
const;
186 void setShape(
float level,
const Shape<2> & s);
195 #endif // MERCATOR_TERRAIN_MOD_H CraterTerrainMod(float level, const Shape< 2 > &s)
Constructor.
Definition: TerrainMod.h:176
Device which effects a change in the terrain.
Definition: Effector.h:25
float m_dx
The rate of change of the height along X.
Definition: TerrainMod.h:160
void setFunction(effector_func f)
Change the function used to apply this mod to existing points.
Definition: TerrainMod.h:36
float m_level
The height level of all points affected.
Definition: TerrainMod.h:96
Terrain modifier that defines an area of sloped height.
Definition: TerrainMod.h:134
effector_func m_function
Function used to apply this mod to existing points.
Definition: TerrainMod.h:29
SlopeTerrainMod(float level, float dx, float dz, const Shape< 2 > &s)
Constructor.
Definition: TerrainMod.h:144
virtual void apply(float &point, int x, int z) const =0
Apply this modifier on a terrain segment.
Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...
Definition: Segment.h:36
float m_dz
The rate of change of the height along Z.
Definition: TerrainMod.h:162
Shape< 2 > m_shape
Shape of the modifier.
Definition: TerrainMod.h:67
Terrain modifier that defines a crater.
Definition: TerrainMod.h:170
float m_level
The height level of the crater center.
Definition: TerrainMod.h:190
float m_dist
Adjustment to the height of all points affected.
Definition: TerrainMod.h:126
Terrain modifier that defines an area of adjusted height.
Definition: TerrainMod.h:104
Terrain modifier that defines an area of fixed height.
Definition: TerrainMod.h:75
LevelTerrainMod(float level, const Shape< 2 > &s)
Constructor.
Definition: TerrainMod.h:82
float m_level
The height of the centre point.
Definition: TerrainMod.h:158
AdjustTerrainMod(float dist, const Shape< 2 > &s)
Constructor.
Definition: TerrainMod.h:112
Base class for modifiers to the procedurally generated terrain.
Definition: TerrainMod.h:20
Terrain modifier which is defined by a shape variable.
Definition: TerrainMod.h:52