Mercator
Public Member Functions | Protected Attributes | Private Member Functions
Mercator::CraterTerrainMod< Shape > Class Template Reference

Terrain modifier that defines a crater. More...

#include <TerrainMod.h>

Inheritance diagram for Mercator::CraterTerrainMod< Shape >:
Mercator::ShapeTerrainMod< Shape > Mercator::TerrainMod Mercator::Effector

List of all members.

Public Member Functions

 CraterTerrainMod (float level, const Shape< 2 > &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.
void setShape (float level, const Shape< 2 > &s)
- Public Member Functions inherited from Mercator::ShapeTerrainMod< Shape >
 ShapeTerrainMod (const Shape< 2 > &s)
 Constructor.
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
- 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_level
 The height level of the crater center.
- Protected Attributes inherited from Mercator::ShapeTerrainMod< Shape >
Shape< 2 > m_shape
 Shape of the modifier.

Private Member Functions

 CraterTerrainMod (CraterTerrainMod &)
 Copy constructor.

Detailed Description

template<template< int > class Shape>
class Mercator::CraterTerrainMod< Shape >

Terrain modifier that defines a crater.

This modifier creates an area where a sphere shaped volume has been subtracted from the terrain surface to create a spherical crater.


Constructor & Destructor Documentation

template<template< int > class Shape>
Mercator::CraterTerrainMod< Shape >::CraterTerrainMod ( float  level,
const Shape< 2 > &  s 
)
inline

Constructor.

Parameters:
sSphere that defines the shape of the crater.

Member Function Documentation

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


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