5 #ifndef MERCATOR_TERRAIN_MOD_IMPL_H 6 #define MERCATOR_TERRAIN_MOD_IMPL_H 8 #include "TerrainMod.h" 14 template <
template <
int>
class Shape>
23 template <
template <
int>
class Shape>
30 template <
template <
int>
class Shape>
39 template <
template <
int>
class Shape>
42 if (Contains(this->
m_shape,WFMath::Point<2>(x,z),
true)) {
47 template <
template <
int>
class Shape>
56 template <
template <
int>
class Shape>
59 if (Contains(this->
m_shape,WFMath::Point<2>(x,z),
true)) {
64 template <
template <
int>
class Shape>
73 template <
template <
int>
class Shape>
76 if (Contains(this->
m_shape,WFMath::Point<2>(x,z),
true)) {
77 float level = m_level + (this->
m_shape.getCenter()[0] - x) * m_dx
78 + (this->
m_shape.getCenter()[1] - z) * m_dz;
83 template <
template <
int>
class Shape>
95 template <
template <
int>
class Shape>
98 if (Contains(this->
m_shape,WFMath::Point<2>(x,z),
true)) {
103 template <
template <
int>
class Shape>
113 #endif // MERCATOR_TERRAIN_MOD_IMPL_H 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.
WFMath::AxisBox< 2 > getRect() const
The 2d area covered by this segment.
effector_func m_function
Function used to apply this mod to existing points.
Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...
Shape< 2 > m_shape
Shape of the modifier.
ShapeTerrainMod(const Shape< 2 > &s)
Constructor.
Terrain modifier that defines a crater.
WFMath::AxisBox< 2 > m_box
The bounding box of the geometric shape.
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 adjusted height.
Terrain modifier that defines an area of fixed height.
virtual void apply(float &point, int x, int z) const
Apply this modifier on a terrain segment.
Terrain modifier which is defined by a shape variable.