DepthShader.h

00001 // This file may be redistributed and modified only under the terms of
00002 // the GNU General Public License (See COPYING for details).
00003 // Copyright (C) 2003 Alistair Riddoch
00004 
00005 #ifndef MERCATOR_FILL_DEPTH_SHADER_H
00006 #define MERCATOR_FILL_DEPTH_SHADER_H
00007 
00008 #include <Mercator/Shader.h>
00009 
00010 namespace Mercator {
00011 
00012 class DepthShader : public Shader {
00013   private:
00014     float m_waterLevel;
00015     float m_murkyDepth;
00016   public:
00017     static const std::string key_waterLevel;
00018     static const std::string key_murkyDepth;
00019 
00020     static const float default_waterLevel;
00021     static const float default_murkyDepth;
00022 
00023     explicit DepthShader(float waterLevel = default_waterLevel,
00024                          float murkyDepth = default_murkyDepth);
00025     explicit DepthShader(const Parameters & params);
00026     virtual ~DepthShader();
00027 
00028     const float waterLevel() const { return m_waterLevel; }
00029     const float murkyDepth() const { return m_murkyDepth; }
00030 
00031     virtual bool checkIntersect(const Segment &) const;
00032     virtual void shade(Surface &) const;
00033 };
00034 
00035 } // namespace Mercator
00036 
00037 #endif // MERCATOR_FILL_DEPTH_SHADER_H

Generated on Sun Aug 27 21:42:29 2006 for Mercator by  doxygen 1.4.7