-
Notifications
You must be signed in to change notification settings - Fork 0
/
Planet.h
55 lines (46 loc) · 1.14 KB
/
Planet.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
#ifndef PLANET_H_
#define PLANET_H_
#include "Display.h"
#include <Box2D/Box2D.h>
#include <stdint.h>
class StationInterface;
class Planet {
public:
Planet();
~Planet();
void SetSeed(long int seed);
double Mass();
void SetPosition(double x, double y);
void SetAngle(double value);
void SetAngularVelocity(double value);
void SetRadius(double value);
void SetCoreRadius(double value);
void SetColor(float r, float g, float b);
void SetStation();
b2Vec2 GetGravityAcceleration(b2Vec2 pos);
b2Vec2 GetDistance(double x, double y);
double GetSpanAngle(double x, double y);
void Init(b2World * world);
void Update();
void Render();
private:
long int seed_;
const float kDefaultSurfaceFriction;
double x_;
double y_;
double angle_;
double angular_velocity_;
double density_;
double radius_;
double core_radius_;
float color_[3];
StationInterface* station_;
GLuint DL_surface_index_;
GLuint DL_core_index_;
b2World * world_;
b2Body * physics_body_;
private:
static uint32_t counter_;
uint32_t identifier_;
};
#endif // PLANET_H_