Mercator
Public Member Functions | Private Member Functions | Private Attributes
Mercator::AreaShader Class Reference

Shader for handling areas. More...

#include <AreaShader.h>

Inheritance diagram for Mercator::AreaShader:
Mercator::Shader

List of all members.

Public Member Functions

 AreaShader (int layer)
 Constructor.
virtual void shade (Surface &s) const
 Populate a Surface with data.
virtual bool checkIntersect (const Segment &) const
 Check whether this Shader has any effect on the given Segment.
- Public Member Functions inherited from Mercator::Shader
virtual ~Shader ()
 Destructor does nothing interesting.
bool getColor () const
 Accessor for color flag.
bool getAlpha () const
 Accessor for alpha flag.
SurfacenewSurface (const Segment &) const
 Create a new Surface which matches the requirements of this shader.

Private Member Functions

void shadeArea (Surface &s, const Area *const ar) const
 helper to shader a single area into the surface

Private Attributes

int m_layer
 The layer number.

Additional Inherited Members

- Public Types inherited from Mercator::Shader
typedef std::map< std::string,
float > 
Parameters
 STL map of parameter values for a shader constructor.
- Protected Member Functions inherited from Mercator::Shader
 Shader (bool color=false, bool alpha=true)
 Protected constructor for classes which inherit from this one.

Detailed Description

Shader for handling areas.


Constructor & Destructor Documentation

Mercator::AreaShader::AreaShader ( int  layer)

Constructor.

Parameters:
layerlayer number.

Member Function Documentation

bool Mercator::AreaShader::checkIntersect ( const Segment ) const
virtual

Check whether this Shader has any effect on the given Segment.

Returns:
true if the given Segment height range is within the range that this Shader uses. e.g. A high altitude snow shader will have no effect on low level terrain.

Implements Mercator::Shader.

References Mercator::Segment::getAreas(), and m_layer.


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