#include <TerrainMod.h>
Public Member Functions | |
CraterTerrainMod (const WFMath::Ball< 3 > &s) | |
Constructor. | |
virtual WFMath::AxisBox< 2 > | bbox () const |
Get the boundingbox of the modifier. | |
virtual void | apply (float &point, int x, int y) const |
Apply this modifier on a terrain segment. | |
virtual TerrainMod * | clone () const |
Create a copy of this modifier. | |
Private Member Functions | |
CraterTerrainMod (CraterTerrainMod &) | |
Copy constructor. | |
Private Attributes | |
WFMath::Ball< 3 > | m_shape |
Sphere that defines the shape of the crater. | |
WFMath::AxisBox< 2 > | ab |
Box containing this modification. |
This modifier creates an area where a sphere shaped volume has been subtracted from the terrain surface to create a spherical crater.
Mercator::CraterTerrainMod::CraterTerrainMod | ( | const WFMath::Ball< 3 > & | s | ) | [inline] |
void Mercator::CraterTerrainMod::apply | ( | float & | point, | |
int | x, | |||
int | y | |||
) | const [virtual] |
Apply this modifier on a terrain segment.
The segment is at x,y in local coordinates. Output is placed into point.
Implements Mercator::TerrainMod.
References m_shape.