forked from OpenDDS/OpenDDS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ShapeDynamics.hpp
43 lines (32 loc) · 864 Bytes
/
ShapeDynamics.hpp
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
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef _SHAPEDYNAMICS_HPP
#define _SHAPEDYNAMICS_HPP
// Tell GCC to ignore implicitly declared copy methods as long as
// Qt is not compliant.
#ifdef __GNUC__
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wdeprecated-copy"
#endif
#include <QtCore/QRect>
#include <QtCore/QPoint>
#ifdef __GNUC__
# pragma GCC diagnostic pop
#endif
#include <vector>
class ShapeDynamics {
public:
ShapeDynamics(int x0, int y0);
ShapeDynamics(int x0, int y0, const QRect& constraint);
virtual ~ShapeDynamics();
public:
virtual QPoint getPosition();
virtual std::vector<QPoint> getPositionList();
virtual void setConstraint(const QRect& rect);
virtual void simulate() = 0;
private:
ShapeDynamics(const ShapeDynamics& orig);
protected:
QPoint pos_;
std::vector<QPoint> plist_;
QRect constraint_;
};
#endif /* _SHAPEDYNAMICS_HPP */