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

◆ Effector() [1/2]

Mercator::Effector::Effector ( )
protecteddefault

Constructor.

◆ Effector() [2/2]

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

Copy constructor.

Definition at line 20 of file Effector.cpp.

Member Function Documentation

◆ bbox()

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 m_box.

Referenced by Mercator::Forest::populate().

◆ operator=()

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

Assignment.

Definition at line 25 of file Effector.cpp.

References m_box, and m_context.

Member Data Documentation

◆ m_box

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().

◆ m_context

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: