Mercator
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
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 Mercator::Effector

Public Member Functions

 AdjustTerrainMod (float dist, const Shape< 2 > &s)
 Constructor. More...
 
virtual void apply (float &point, int x, int y) const
 Apply this modifier on a terrain segment. More...
 
void setShape (float dist, const Shape< 2 > &s)
 
- Public Member Functions inherited from Mercator::ShapeTerrainMod< Shape >
 ShapeTerrainMod (const Shape< 2 > &s)
 Constructor. More...
 
virtual bool checkIntersects (const Segment &s) const
 
void setShape (const Shape< 2 > &s)
 
- Public Member Functions inherited from Mercator::TerrainMod
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.
 
- Public Member Functions inherited from Mercator::Effector
Contextcontext () const
 
void setContext (Context *)
 
const WFMath::AxisBox< 2 > & bbox () const
 Accessor for the bounding box of the geometric shape.
 

Protected Attributes

float m_dist
 Adjustment to the height of all points affected.
 
- Protected Attributes inherited from Mercator::ShapeTerrainMod< Shape >
Shape< 2 > m_shape
 Shape of the modifier.
 
- Protected Attributes inherited from Mercator::TerrainMod
effector_func m_function
 Function used to apply this mod to existing points. More...
 
- Protected Attributes inherited from Mercator::Effector
WFMath::AxisBox< 2 > m_box
 The bounding box of the geometric shape.
 
Contextm_context
 The application context of this effector.
 

Private Member Functions

 AdjustTerrainMod (AdjustTerrainMod &)
 Copy constructor.
 

Additional Inherited Members

- Protected Member Functions inherited from Mercator::Effector
 Effector ()
 Constructor.
 
 Effector (const Effector &)
 Copy constructor.
 
Effectoroperator= (const Effector &)
 Assignment.
 

Detailed Description

template<template< int > class 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<template< int > class Shape>
Mercator::AdjustTerrainMod< Shape >::AdjustTerrainMod ( float  dist,
const Shape< 2 > &  s 
)
inline

Constructor.

Parameters
distadjustment to the height of all points affected.
sshape of the modifier.

References Mercator::TerrainMod::apply().

Member Function Documentation

template<template< int > class Shape>
void Mercator::AdjustTerrainMod< Shape >::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 Mercator::ShapeTerrainMod< Shape >::m_shape.


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