-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsimulation.h
More file actions
52 lines (49 loc) · 1.32 KB
/
simulation.h
File metadata and controls
52 lines (49 loc) · 1.32 KB
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
/***********************************************************************
* C++ File:
* Simulation
* Author:
* Emilio Ordonez and Austin Jesperson
* Summary:
* Handles running the simulation
************************************************************************/
#pragma once
#include "position.h"
#include "uiDraw.h"
#include "satellites.h"
#include "ship.h"
#include "bullet.h"
#include "piece.h"
#include "uiInteract.h"
#include <vector>
class Simulation
{
public:
Simulation();
void moveShip() { dreamChaser.move(pUI.isLeft(), pUI.isRight(), pUI.isDown()); }
void rotateEarth() { angleEarth += (-(2.0 * M_PI / 30.0) * (1440.0 / 86400.0)); }
void drawSatellites();
void drawBullets();
void checkCollision();
void run();
void addBullet();
void calculations(Position* pos, Position* vel, Position* acc = nullptr);
bool areColliding(Entity* entity1, Entity* entity2);
private:
Interface pUI;
ogstream gout;
Hubble hubble;
Sputnik sputnik;
Starlink starlink;
Dragon crewDragon;
Ship dreamChaser;
GPS firstGPS;
GPS secondGPS;
GPS thirdGPS;
GPS fourthGPS;
GPS fifthGPS;
GPS sixthGPS;
vector<Entity*> satellites;
vector<Bullet*> bullets;
double angleEarth;
Entity earth;
};