Source:NetHack 3.6.0/include/qt clust.h

From NetHackWiki
Revision as of 16:12, 10 December 2015 by Nooodl (talk | contribs) (Created page with "__MIXEDSYNTAXHIGHLIGHT__ Below is the full text to '''qt_clust.h''' from the source code of NetHack 3.6.0. To link to a particular line, writ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Below is the full text to qt_clust.h from the source code of NetHack 3.6.0. To link to a particular line, write [[Source:NetHack 3.6.0/include/qt_clust.h#line123]], for example.

The NetHack General Public License applies to screenshots, source code and other content from NetHack.

This content was modified from the original NetHack source code distribution (by splitting up NetHack content between wiki pages, and possibly further editing). See the page history for a list of who changed it, and on what dates.

/* NetHack 3.6	qt_clust.h	$NHDT-Date: 1432512779 2015/05/25 00:12:59 $  $NHDT-Branch: master $:$NHDT-Revision: 1.8 $ */
/* Copyright (c) Warwick Allison, 1999. */
/* NetHack may be freely redistributed.  See license for details. */

#ifndef clusterizer_H
#define clusterizer_H

#include <qrect.h>

class Clusterizer
{
public:
Clusterizer(int maxclusters);
~Clusterizer();

void add(int x, int y); // 1x1 rectangle (point)
void add(int x, int y, int w, int h);
void add(const QRect &rect);

void clear();
int
clusters()
{
return count;
}
const QRect &operator[](int i);

private:
QRect *cluster;
int count;
const int max;
};

#endif