00001
00002
00003 #include <vector>
00004
00005 typedef struct _RangeEntry {
00006 float min, max;
00007 } RangeEntry;
00008
00009 class RangeList {
00010 public:
00011 RangeEntry *ranges;
00012 int numRanges, rangesSize;
00013
00014 public:
00015 RangeList(float min, float max);
00016 ~RangeList();
00017
00018 void reset(float min, float max);
00019
00020 void print();
00021
00022 void subtract(float min, float max);
00023
00024 private:
00025 void deleteRange(int pos);
00026 void insertRange(int pos, float min, float max);
00027 };