BasePoint.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 Damien McGinnes, Alistair Riddoch
00004 
00005 #ifndef MERCATOR_BASE_POINT_H
00006 #define MERCATOR_BASE_POINT_H
00007 
00008 #include <iostream>
00009 
00010 namespace Mercator { 
00011 
00012 class BasePoint {
00013   private:
00014     float m_height;
00015     float m_roughness;
00016     float m_falloff;
00017 
00018   public:
00019     static const float HEIGHT;
00020     static const float ROUGHNESS;
00021     static const float FALLOFF;
00022 
00023     explicit BasePoint(float h = HEIGHT, float r = ROUGHNESS, float f = FALLOFF) :
00024                  m_height(h), m_roughness(r), m_falloff(f) {}
00025 
00026     const float height() const { return m_height; }
00027     float & height() { return m_height; }
00028 
00029     const float roughness() const { return m_roughness; }
00030     float & roughness() { return m_roughness; }
00031 
00032     const float falloff() const { return m_falloff; }
00033     float & falloff() { return m_falloff; }
00034 
00035     unsigned int seed() const { return (unsigned int)(m_height * 1000.0);}
00036 };
00037 
00038 } //namespace Mercator
00039 
00040 #endif // MERCATOR_BASE_POINT_H

Generated on Mon Aug 20 15:36:04 2007 for Mercator by  doxygen 1.5.2