forked from mrkite/minutor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
entity.h
31 lines (23 loc) · 660 Bytes
/
entity.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/** Copyright 2014 EtlamGit */
#ifndef ENTITY_H_
#define ENTITY_H_
#include <QSharedPointer>
#include "./overlayitem.h"
class Tag;
class Entity: public OverlayItem {
public:
static QSharedPointer<OverlayItem> TryParse(const Tag* tag);
virtual bool intersects(const Point& min, const Point& max) const;
virtual void draw(double offsetX, double offsetZ, double scale,
QPainter *canvas) const;
virtual Point midpoint() const;
void setExtraColor(const QColor& c) {extraColor = c;}
static const int RADIUS = 5;
protected:
Entity() {}
private:
QColor extraColor;
Point pos;
QString display;
};
#endif // ENTITY_H_