GlobeEngine
FeatureRange.h
Go to the documentation of this file.
1 
9 #ifndef GlobeEngine_FeatureRange_h
10 #define GlobeEngine_FeatureRange_h
11 
12 #include "OpenGL_Includes.h"
13 
14 namespace geGIS {
15 
16  template <class T> class FeatureRangeTemplate
17  {
18  public:
20  this->range[0] = 0;
21  this->range[1] = 0;
22  };
23 
24  FeatureRangeTemplate(int _start, int _end) {
25  this->range[0] = _start;
26  this->range[1] = _end;
27  };
28 
29  FeatureRangeTemplate(const std::shared_ptr<FeatureRangeTemplate> copy){
30  this->range[0] = copy.range[0];
31  this->range[1] = copy.range[1];
32  }
33 
34  /* is equal if range is equal */
35  bool operator==(const FeatureRangeTemplate &other)const {
36  return this->range[0] == other.range[0] && this->range[1] == other.range[1];
37  };
38 
40  return range[1] - range[0];
41  };
42 
43  void setStart(unsigned int _start) { this->range[0] = _start; }
44  T getStart() { return range[0]; };
45  void setEnd(unsigned int _end) { this->range[1] = _end; };
46  T getEnd() { return range[1]; };
47 
48  private:
49  T range[2];
50  };
51 
53 }
54 
55 #endif
Definition: ClusterGrid.h:17
FeatureRangeTemplate(const std::shared_ptr< FeatureRangeTemplate > copy)
Definition: FeatureRange.h:29
bool operator==(const FeatureRangeTemplate &other) const
Definition: FeatureRange.h:35
Definition: FeatureRange.h:16
FeatureRangeTemplate()
Definition: FeatureRange.h:19
void setStart(unsigned int _start)
Definition: FeatureRange.h:43
FeatureRangeTemplate(int _start, int _end)
Definition: FeatureRange.h:24
FeatureRangeTemplate< unsigned int > FeatureRange
Definition: FeatureRange.h:52
T getEnd()
Definition: FeatureRange.h:46
void setEnd(unsigned int _end)
Definition: FeatureRange.h:45
T getStart()
Definition: FeatureRange.h:44
T getAbsoluteDistance()
Definition: FeatureRange.h:39