Mercator  0.4.0
Public Member Functions | Static Public Attributes | List of all members
Mercator::BandShader Class Reference

Surface shader that defines the surface between two levels. More...

#include <ThresholdShader.h>

Inheritance diagram for Mercator::BandShader:
Mercator::Shader

Public Member Functions

 BandShader (float low_threshold=default_lowThreshold, float high_threshold=default_highThreshold)
 Constructor. More...
 
 BandShader (const Parameters &params)
 Constructor. More...
 
float lowThreshold () const
 Accessor for the level above which the shader renders.
 
float highThreshold () const
 Accessor for the level below which the shader renders.
 
bool checkIntersect (const Segment &) const override
 Check whether this Shader has any effect on the given Segment. More...
 
void shade (Surface &) const override
 Populate a Surface with data.
 
- 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. More...
 

Static Public Attributes

static const std::string key_lowThreshold
 Key string used when specifying the low threshold parameter.
 
static const std::string key_highThreshold
 Key string used when specifying the high threshold parameter.
 
static const float default_lowThreshold = -1.f
 Default level above which the shader renders.
 
static const float default_highThreshold = 1.f
 Default level below which the shader renders.
 

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

Detailed Description

Surface shader that defines the surface between two levels.

Constructor & Destructor Documentation

Mercator::BandShader::BandShader ( float  low_threshold = default_lowThreshold,
float  high_threshold = default_highThreshold 
)
explicit

Constructor.

Parameters
low_thresholdlevel above which the shader renders.
high_thresholdlevel below which the shader renders.
Mercator::BandShader::BandShader ( const Parameters params)
explicit

Constructor.

Parameters
paramsa map of parameters for the shader.

Member Function Documentation

bool Mercator::BandShader::checkIntersect ( const Segment ) const
overridevirtual

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.


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