-
Notifications
You must be signed in to change notification settings - Fork 0
/
Celestial.h
61 lines (48 loc) · 1.3 KB
/
Celestial.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#ifndef CELESTIAL_H
#define CELESTIAL_H
#include "celestialagentmodel.h"
#include "Body.h"
class Celestial
{
public:
Celestial();
double getMass();
double getXPos();
double getYPos();
double getXAcc();
double getYAcc();
CelestialKind getType();
void setMass(double newMass);
void setXPos(double newXPos);
void setYPos(double newYPos);
void setXVel(double newXVel);
void setYVel(double newYVel);
void setXAcc(double newXAcc);
void setYAcc(double newYAcc);
void setType(CelestialKind newType);
Celestial * getPNext();
void setPNext(Celestial *newPNext);
int getMarker();
void setMarker(int newMarker);
int getDestroyed();
void setDestroyed(int newDestroyed);
void calculate(Celestial * other);
void move();
Body * getBuddy();
void setBuddy(Body * newBuddy);
protected:
//mass, velocity, and acceleration values
double mass;
double xPos;
double yPos;
double xVel;
double yVel;
double xAcc;
double yAcc;
Celestial *pNext; //pointer to next Celestial object in the linked list
int marker;
CelestialKind type; //Celestial object enumerated type
int destroyed; //value to check if Celestial Object should be destroyed
Body * buddy; //pointer to the graphical widget associated with each Celestial ojbect in the system
};
#endif