NHDT->ANH, nethack->anethack, nhdat->anhdat
[aNetHack.git] / include / qt_clust.h
blob142d7cb0de4087dc54d7087c1fd5b661643cc8d2
1 /* aNetHack 0.0.1 qt_clust.h $ANH-Date: 1432512779 2015/05/25 00:12:59 $ $ANH-Branch: master $:$ANH-Revision: 1.8 $ */
2 /* Copyright (c) Warwick Allison, 1999. */
3 /* aNetHack may be freely redistributed. See license for details. */
5 #ifndef clusterizer_H
6 #define clusterizer_H
8 #include <qrect.h>
10 class Clusterizer
12 public:
13 Clusterizer(int maxclusters);
14 ~Clusterizer();
16 void add(int x, int y); // 1x1 rectangle (point)
17 void add(int x, int y, int w, int h);
18 void add(const QRect &rect);
20 void clear();
21 int
22 clusters()
24 return count;
26 const QRect &operator[](int i);
28 private:
29 QRect *cluster;
30 int count;
31 const int max;
34 #endif