Mercator::LowShader Class Reference

Surface shader that defines the surface below a given level. More...

#include <ThresholdShader.h>

Inheritance diagram for Mercator::LowShader:

Mercator::Shader

List of all members.

Public Member Functions

 LowShader (float threshold=default_threshold)
 Constructor.
 LowShader (const Parameters &params)
 Constructor.
const float threshold () const
 Accessor for level below which the shader renders.
virtual bool checkIntersect (const Segment &) const
 Check whether this Shader has any effect on the given Segment.
virtual void shade (Surface &) const
 Populate a Surface with data.

Static Public Attributes

static const std::string key_threshold
 Key string used when specifying the threshold parameter.
static const float default_threshold = -1.f
 Default level below which the shader renders.

Private Attributes

float m_threshold
 The level below which the shader renders.


Detailed Description

Surface shader that defines the surface below a given level.

Constructor & Destructor Documentation

Mercator::LowShader::LowShader ( float  threshold = default_threshold  )  [explicit]

Constructor.

Parameters:
threshold level below which the shader renders.

Mercator::LowShader::LowShader ( const Parameters params  )  [explicit]

Constructor.

Parameters:
params a map of parameters for the shader.

References key_threshold, and m_threshold.


Member Function Documentation

bool Mercator::LowShader::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::getMin(), and m_threshold.


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

Generated for Mercator by  doxygen 1.5.6