Mercator
|
Terrain modifier which is defined by a shape variable. More...
#include <TerrainMod.h>
Public Member Functions | |
ShapeTerrainMod (const Shape< 2 > &s) | |
Constructor. More... | |
virtual bool | checkIntersects (const Segment &s) const |
void | setShape (const Shape< 2 > &s) |
![]() | |
int | addToSegment (Segment &) const |
void | updateToSegment (Segment &) const |
void | removeFromSegment (Segment &) const |
void | setFunction (effector_func f) |
Change the function used to apply this mod to existing points. | |
virtual void | apply (float &point, int x, int y) const =0 |
Apply this modifier on a terrain segment. More... | |
![]() | |
Context * | context () const |
void | setContext (Context *) |
const WFMath::AxisBox< 2 > & | bbox () const |
Accessor for the bounding box of the geometric shape. | |
Protected Attributes | |
Shape< 2 > | m_shape |
Shape of the modifier. | |
![]() | |
effector_func | m_function |
Function used to apply this mod to existing points. More... | |
![]() | |
WFMath::AxisBox< 2 > | m_box |
The bounding box of the geometric shape. | |
Context * | m_context |
The application context of this effector. | |
Additional Inherited Members | |
![]() | |
Effector () | |
Constructor. | |
Effector (const Effector &) | |
Copy constructor. | |
Effector & | operator= (const Effector &) |
Assignment. | |
Terrain modifier which is defined by a shape variable.
This template extends TerrainMod by adding the ability to query the bounding box of the shape that defines this modification to the terrain.
Mercator::ShapeTerrainMod< Shape >::ShapeTerrainMod | ( | const Shape< 2 > & | s | ) |
Constructor.
s | shape of the modifier. |
References Mercator::Segment::getRect(), Mercator::Effector::m_box, and Mercator::ShapeTerrainMod< Shape >::m_shape.