00001
00002
00003
00004
00005 #ifndef MERCATOR_FILL_THRESHOLD_SHADER_H
00006 #define MERCATOR_FILL_THRESHOLD_SHADER_H
00007
00008 #include <Mercator/Shader.h>
00009
00010 namespace Mercator {
00011
00012 class HighShader : public Shader {
00013 private:
00014 float m_threshold;
00015 public:
00016 static const std::string key_threshold;
00017
00018 static const float default_threshold;
00019
00020 explicit HighShader(float threshold = default_threshold);
00021 explicit HighShader(const Parameters & params);
00022 virtual ~HighShader();
00023
00024 const float threshold() const { return m_threshold; }
00025
00026 virtual bool checkIntersect(const Segment &) const;
00027 virtual void shade(Surface &) const;
00028 };
00029
00030 class LowShader : public Shader {
00031 private:
00032 float m_threshold;
00033 public:
00034 static const std::string key_threshold;
00035
00036 static const float default_threshold;
00037
00038 explicit LowShader(float threshold = default_threshold);
00039 explicit LowShader(const Parameters & params);
00040 virtual ~LowShader();
00041
00042 const float threshold() const { return m_threshold; }
00043
00044 virtual bool checkIntersect(const Segment &) const;
00045 virtual void shade(Surface &) const;
00046 };
00047
00048 class BandShader : public Shader {
00049 private:
00050 float m_lowThreshold;
00051 float m_highThreshold;
00052 public:
00053 static const std::string key_lowThreshold;
00054 static const std::string key_highThreshold;
00055
00056 static const float default_lowThreshold;
00057 static const float default_highThreshold;
00058
00059 explicit BandShader(float low_threshold = default_lowThreshold,
00060 float high_threshold = default_highThreshold);
00061 explicit BandShader(const Parameters & params);
00062 virtual ~BandShader();
00063
00064 const float lowThreshold() const { return m_lowThreshold; }
00065 const float highThreshold() const { return m_highThreshold; }
00066
00067 virtual bool checkIntersect(const Segment &) const;
00068 virtual void shade(Surface &) const;
00069 };
00070
00071 }
00072
00073 #endif // MERCATOR_FILL_THRESHOLD_SHADER_H