Mercator::AdjustTerrainMod< Shape > Class Template Reference

Terrain modifier that defines an area of adjusted height. More...

#include <TerrainMod.h>

Inheritance diagram for Mercator::AdjustTerrainMod< Shape >:

Mercator::ShapeTerrainMod< Shape > Mercator::TerrainMod

List of all members.

Public Member Functions

 AdjustTerrainMod (float dist, const Shape &s)
 Constructor.
virtual void apply (float &point, int x, int y) const
 Apply this modifier on a terrain segment.
virtual TerrainModclone () const
 Create a copy of this modifier.

Protected Attributes

float m_dist
 Adjustment to the height of all points affected.

Private Member Functions

 AdjustTerrainMod (AdjustTerrainMod &)
 Copy constructor.


Detailed Description

template<typename Shape>
class Mercator::AdjustTerrainMod< Shape >

Terrain modifier that defines an area of adjusted height.

This modifier changes the altitude of all points inside the shape by the same amount.


Constructor & Destructor Documentation

template<typename Shape>
Mercator::AdjustTerrainMod< Shape >::AdjustTerrainMod ( float  dist,
const Shape &  s 
) [inline]

Constructor.

Parameters:
dist adjustment to the height of all points affected.
s shape of the modifier.


Member Function Documentation

template<typename Shape>
void Mercator::AdjustTerrainMod< Shape >::apply ( float &  point,
int  x,
int  y 
) const [inline, 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 Mercator::AdjustTerrainMod< Shape >::m_dist, and Mercator::ShapeTerrainMod< Shape >::m_shape.


The documentation for this class was generated from the following files:

Generated for Mercator by  doxygen 1.5.6