-
Notifications
You must be signed in to change notification settings - Fork 1
/
circle.h
39 lines (36 loc) · 805 Bytes
/
circle.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
32
33
34
35
36
37
38
39
#ifndef CIRCLE_H
#define CIRCLE_H
#include <QTime>
class Circle
{
public:
Circle();
Circle(double x, double y);
Circle(double x, double y, double r);
void SetXY(double x, double y);
double GetX();
double GetY();
void SetRadius(double r);
double GetRadius();
void SetSpeedXY(double vx, double vy);
double GetSpeedX();
double GetSpeedY();
void SetMass(double m);
double GetMass();
void SetForce(double fx, double fy);
double GetForceX();
double GetForceY();
void LockByMouse(bool b);
bool IsLockedByMouse();
private:
double x;
double y;
double radius = 25;
double mass = 1000;
double speedX = 0;
double speedY = 0;
double forceX = 0;
double forceY = 0;
bool locked = false;
};
#endif // CIRCLE_H