mercator  0.4.0
A terrain generation library for the Worldforge system.
Mercator::Effector Class Referenceabstract

Device which effects a change in the terrain. More...

#include <Effector.h>

Inheritance diagram for Mercator::Effector:
Collaboration diagram for Mercator::Effector:

Classes

struct  Context
 

Public Member Functions

Contextcontext () const
 
void setContext (std::unique_ptr< Context > context)
 
const WFMath::AxisBox< 2 > & bbox () const
 Accessor for the bounding box of the geometric shape. More...
 
virtual bool checkIntersects (const Segment &s) const =0
 

Protected Member Functions

 Effector ()
 Constructor. More...
 
 Effector (const Effector &)
 Copy constructor. More...
 
Effectoroperator= (const Effector &)
 Assignment. More...
 

Protected Attributes

WFMath::AxisBox< 2 > m_box
 The bounding box of the geometric shape. More...
 
std::unique_ptr< Contextm_context
 The application context of this effector. More...
 

Detailed Description

Device which effects a change in the terrain.

Classes which inherit from this interface change the terrain in some way within the region given by the box member. The exact shape of the area affected and the nature of the change depends on the subclass.

Definition at line 25 of file Effector.h.

Constructor & Destructor Documentation

Mercator::Effector::Effector ( )
protecteddefault

Constructor.

Referenced by bbox().

Mercator::Effector::Effector ( const Effector o)
protected

Copy constructor.

Definition at line 20 of file Effector.cpp.

Member Function Documentation

const WFMath::AxisBox<2>& Mercator::Effector::bbox ( ) const
inline

Accessor for the bounding box of the geometric shape.

Definition at line 37 of file Effector.h.

References Effector(), m_box, and operator=().

Referenced by Mercator::Segment::clearMods(), and Mercator::Forest::populate().

Effector & Mercator::Effector::operator= ( const Effector rhs)
protected

Assignment.

Definition at line 25 of file Effector.cpp.

References m_box, and m_context.

Referenced by bbox().

Member Data Documentation

WFMath::AxisBox<2> Mercator::Effector::m_box
protected

The bounding box of the geometric shape.

Definition at line 57 of file Effector.h.

Referenced by bbox(), Mercator::Area::contains(), operator=(), Mercator::Area::setShape(), and Mercator::ShapeTerrainMod< Shape >::ShapeTerrainMod().

std::unique_ptr<Context> Mercator::Effector::m_context
protected

The application context of this effector.

Definition at line 60 of file Effector.h.

Referenced by operator=().


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