Bike-X  0.8
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Unity.h
Go to the documentation of this file.
1 #ifndef UNITY_H
2 #define UNITY_H
3 
4 #include <fstream>
5 
6 #define CURRENT_UNITY_BUILD "unity/currentBuild"
7 
8 #define UNITY_INFO_FILE "files/unity_info.txt"
9 #define UNITY_ALTITUDE_FILE "files/unity_altitude.txt"
10 #define UNITY_ROTATION_FILE "files/unity_rotation.txt"
11 #define UNITY_POSITION_FILE "files/unity_position.txt"
12 
13 #define INFO_SIZE 256
14 
15 class Unity
16 {
17 
18 public:
23  int buildPid;
24 
28  std::ifstream altitudeFile;
29  std::ofstream infoFile;
30  std::ofstream rotationFile;
31  std::ofstream positionFile;
32 
33  Unity();
34  ~Unity();
35 
39  void init();
40 
44  void initBuild();
45 
46  // ********************* Methods declared in UML *************************
47 
51  int getPlayerAltitude();
52 
56  void setPlayerPosition(double x, double z);
57 
61  void setPlayerRotation(double x, double y, double z);
62 
66  void setInfo(const char * info, int chars_written);
67 
71  void render();
72 };
73 
74 #endif
int buildPid
Definition: Unity.h:23
void render()
Definition: Unity.cpp:195
void init()
Definition: Unity.cpp:74
std::ifstream altitudeFile
Definition: Unity.h:28
Definition: Unity.h:15
void initBuild()
Definition: Unity.cpp:45
std::ofstream positionFile
Definition: Unity.h:31
Unity()
Definition: Unity.cpp:16
std::ofstream rotationFile
Definition: Unity.h:30
void setPlayerRotation(double x, double y, double z)
Definition: Unity.cpp:161
std::ofstream infoFile
Definition: Unity.h:29
void setInfo(const char *info, int chars_written)
Definition: Unity.cpp:178
~Unity()
Definition: Unity.cpp:22
void setPlayerPosition(double x, double z)
Definition: Unity.cpp:144
int getPlayerAltitude()
Definition: Unity.cpp:92