mercator
0.4.0
A terrain generation library for the Worldforge system.
|
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
virtual void apply(float &point, int x, int z) const
Apply this modifier on a terrain segment.
virtual void apply(float &point, int x, int z) const
Apply this modifier on a terrain segment.
Terrain modifier that defines an area of sloped height.
virtual void apply(float &point, int x, int z) const =0
Apply this modifier on a terrain segment.
ShapeTerrainMod(const Shape< 2 > &s)
Constructor.
SlopeTerrainMod(SlopeTerrainMod &)=delete
Copy constructor.
Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...
float m_dz
The rate of change of the height along Z.
Shape< 2 > m_shape
Shape of the modifier.
virtual void apply(float &point, int x, int z) const
Apply this modifier on a terrain segment.
void setFunction(effector_func f)
Change the function used to apply this mod to existing points.
float m_level
The height level of the crater center.
SlopeTerrainMod(float level, float dx, float dz, const Shape< 2 > &s)
Constructor.
Terrain modifier that defines an area of fixed height.
float m_level
The height of the centre point.
Device which effects a change in the terrain.
virtual void apply(float &point, int x, int z) const
Apply this modifier on a terrain segment.
Terrain modifier that defines an area of adjusted height.
LevelTerrainMod(LevelTerrainMod &)=delete
Copy constructor.
float m_dist
Adjustment to the height of all points affected.
LevelTerrainMod(float level, const Shape< 2 > &s)
Constructor.
CraterTerrainMod(float level, const Shape< 2 > &s)
Constructor.
Terrain modifier that defines a crater.
float m_level
The height level of all points affected.
AdjustTerrainMod(AdjustTerrainMod &)=delete
Copy constructor.
AdjustTerrainMod(float dist, const Shape< 2 > &s)
Constructor.
Terrain modifier which is defined by a shape variable.
Base class for modifiers to the procedurally generated terrain.
CraterTerrainMod(CraterTerrainMod &)=delete
Copy constructor.
float m_dx
The rate of change of the height along X.
effector_func m_function
Function used to apply this mod to existing points.