5 #ifndef MERCATOR_TERRAIN_MOD_IMPL_H 6 #define MERCATOR_TERRAIN_MOD_IMPL_H 8 #include "TerrainMod.h" 14 template <
template <
int>
class Shape>
25 template <
template <
int>
class Shape>
32 template <
template <
int>
class Shape>
43 template <
template <
int>
class Shape>
46 if (Contains(this->
m_shape,WFMath::Point<2>(x,z),
true)) {
51 template <
template <
int>
class Shape>
62 template <
template <
int>
class Shape>
65 if (Contains(this->
m_shape,WFMath::Point<2>(x,z),
true)) {
70 template <
template <
int>
class Shape>
81 template <
template <
int>
class Shape>
84 if (Contains(this->
m_shape,WFMath::Point<2>(x,z),
true)) {
85 float level = m_level + (this->
m_shape.getCenter()[0] - x) * m_dx
86 + (this->
m_shape.getCenter()[1] - z) * m_dz;
91 template <
template <
int>
class Shape>
105 template <
template <
int>
class Shape>
108 if (Contains(this->
m_shape,WFMath::Point<2>(x,z),
true)) {
113 template <
template <
int>
class Shape>
123 #endif // MERCATOR_TERRAIN_MOD_IMPL_H virtual void apply(float &point, int x, int z) const
Apply this modifier on a terrain segment.
Definition: TerrainMod_impl.h:63
Terrain modifier that defines an area of sloped height.
Definition: TerrainMod.h:134
WFMath::AxisBox< 2 > getRect() const
The 2d area covered by this segment.
Definition: Segment.cpp:395
effector_func m_function
Function used to apply this mod to existing points.
Definition: TerrainMod.h:29
Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...
Definition: Segment.h:36
Shape< 2 > m_shape
Shape of the modifier.
Definition: TerrainMod.h:67
ShapeTerrainMod(const Shape< 2 > &s)
Constructor.
Definition: TerrainMod_impl.h:15
Terrain modifier that defines a crater.
Definition: TerrainMod.h:170
WFMath::AxisBox< 2 > m_box
The bounding box of the geometric shape.
Definition: Effector.h:66
virtual void apply(float &point, int x, int z) const
Apply this modifier on a terrain segment.
Definition: TerrainMod_impl.h:82
virtual void apply(float &point, int x, int z) const
Apply this modifier on a terrain segment.
Definition: TerrainMod_impl.h:106
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
virtual void apply(float &point, int x, int z) const
Apply this modifier on a terrain segment.
Definition: TerrainMod_impl.h:44
Terrain modifier which is defined by a shape variable.
Definition: TerrainMod.h:52