/
TGInterface.h
51 lines (41 loc) · 931 Bytes
/
TGInterface.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
#ifndef TGINTERFACE_H_
#define TGINTERFACE_H_
#include "core/TGDef.h"
#include "SDL/SDL.h"
#include <pthread.h>
struct SimParams
{
static pthread_mutex_t Lock;
SimParams()
{
DriftSpeed = 0.05;
c = 10;
mu = 0.1;
NewHeight = 1;
Shape = 100;
Scale = 1;
Color = 20;
Reset = false;
Shaded = false;
Zoom = false;
}
real DriftSpeed;
real c;
real mu;
real NewHeight;
real Shape;
real Scale;
real Color;
bool Reset;
bool Shaded;
bool Zoom;
};
SimParams &Initialize();
void Create(const char *vs, const char *fs, const char *bl, const char *envvs, const char *envfs, const char *colvs, const char *colfs,
const char *cvs, const char *cfs);
void Draw();
void ChangeSize(int width, int height);
void Orbit(float dx, float dy);
void Zoom(float factor);
void Touch(float x, float y);
#endif