-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
1,226 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
#ifndef COSMONAUT_H | ||
#define COSMONAUT_H | ||
#include <sync.h> | ||
#include <string> | ||
#include <math.h> | ||
#include <list> | ||
#include <GL/gl.h> | ||
#include "Configuration.h" | ||
#define SYNC_PLAYER | ||
|
||
namespace DemoSystem { | ||
class Cosmonaut { | ||
public: | ||
Cosmonaut(); | ||
~Cosmonaut(); | ||
void initialize(double bpm, int rpb); | ||
bool connectPlayer(std::string host); | ||
void setFunctions(sync_cb* functions); | ||
void update(double row); | ||
void setTracks(std::list<DemoSystem::Track> tracks); | ||
|
||
double getRowRate(); | ||
void cleanUp(); | ||
|
||
struct SyncTrack { | ||
const sync_track* x; | ||
const sync_track* y; | ||
const sync_track* z; | ||
}; | ||
|
||
struct Vector3 { | ||
double x; | ||
double y; | ||
double z; | ||
}; | ||
|
||
struct Gateway { | ||
SyncTrack syncTrack; | ||
Vector3 value; | ||
DemoSystem::Track::TrackType type; | ||
std::string name; | ||
GLint uniform; | ||
}; | ||
|
||
std::list<Gateway> gateways; | ||
private: | ||
bool player; | ||
std::string host; | ||
double BPM; | ||
int RPB; | ||
double rowRate; | ||
|
||
sync_device* device; | ||
sync_cb* functions; | ||
|
||
|
||
}; | ||
} | ||
|
||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#ifndef SYNC_BASE_H | ||
#define SYNC_BASE_H | ||
|
||
#ifdef _MSC_VER | ||
#define _CRT_SECURE_NO_WARNINGS 1 | ||
#define _CRT_NONSTDC_NO_DEPRECATE 1 | ||
#endif | ||
|
||
#include <stddef.h> | ||
|
||
/* configure inline keyword */ | ||
#if (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L)) && !defined(__cplusplus) | ||
#if defined(_MSC_VER) || defined(__GNUC__) || defined(__SASC) | ||
#define inline __inline | ||
#else | ||
/* compiler does not support inline */ | ||
#define inline | ||
#endif | ||
#endif | ||
|
||
/* configure lacking CRT features */ | ||
#ifdef _MSC_VER | ||
#if _MSC_VER < 1900 | ||
#define snprintf _snprintf | ||
#endif | ||
/* int is 32-bit for both x86 and x64 */ | ||
typedef unsigned int uint32_t; | ||
#define UINT32_MAX UINT_MAX | ||
#elif defined(__GNUC__) | ||
#include <stdint.h> | ||
#elif defined(M68000) | ||
typedef unsigned int uint32_t; | ||
#endif | ||
|
||
#endif /* SYNC_BASE_H */ |
Oops, something went wrong.