00001 #ifndef _FACETS_PARAMS_HPP_
00002 #define _FACETS_PARAMS_HPP_
00003
00004 #define D_PARAM_VAR(type, name) \
00005 private: \
00006 type m_##name;
00007
00008 #define D_PARAM_GETTER(type, name) \
00009 public: \
00010 inline type name() const { return m_##name; }
00011
00012 #define D_PARAM_SETTER(type, name, settername ) \
00013 public: \
00014 inline void settername(type v) { m_##name = v; }
00015
00016 #define D_PARAM( type, name, settername ) \
00017 D_PARAM_GETTER(type, name) \
00018 D_PARAM_SETTER(type, name, settername ) \
00019 D_PARAM_VAR(type,name)
00020
00021 namespace jafar {
00022 namespace facetsmap {
00023
00024 class FacetsParams {
00025 public:
00026 FacetsParams();
00027
00028 D_PARAM(double, halfSizeFacetMeter, setHalfSizeFacetMeter)
00029 D_PARAM(int, halfSizeFacetPixel, setHalfSizeFacetPixel)
00030 D_PARAM(double, amerRadius, setAmerRadius)
00031 public:
00032 double imageResolution() const { return sizeFacetMeter() / sizeFacetPixel(); }
00033 double sizeFacetMeter() const { return 2.0 * halfSizeFacetMeter(); }
00034 int sizeFacetPixel() const {
00035 return 2 * halfSizeFacetPixel() + 1;
00036 }
00037 };
00038
00039 }
00040 }
00041
00042 #endif