]> Shamusworld >> Repos - architektonas/blob - src/base/rs_infoarea.h
Scrubbed out all references to RS2::qtToRsButton(). Gone!
[architektonas] / src / base / rs_infoarea.h
1 #ifndef RS_INFOAREA_H
2 #define RS_INFOAREA_H
3
4 #include <QtCore>
5 #include "vector.h"
6
7 /**
8  * Class for getting information about an area.
9  *
10  * @author Andrew Mustun
11  */
12 class RS_InfoArea
13 {
14         public:
15                 RS_InfoArea();
16                 ~RS_InfoArea();
17
18                 void reset();
19                 void addPoint(const Vector & p);
20                 void calculate();
21                 void close();
22                 bool isValid();
23                 bool isClosed();
24                 double getArea();
25                 double getCircumference();
26                 int count();
27
28         private:
29                 double calcSubArea(const Vector & p1, const Vector & p2);
30
31 //              Q3ValueVector<Vector> thePoints;
32                 QVector<Vector> thePoints;
33                 double baseY;
34                 double area;
35                 double circumference;
36 };
37
38 #endif