-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathscene.h
45 lines (40 loc) · 1 KB
/
scene.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
#ifndef SCENE_H__
#define SCENE_H__
#include "../Eigen/Core"
#include <vector>
class ParticleSystem;
class Scene {
public:
Scene();
void InitTime();
void EndOfFrame();
void RecalculateFps();
double GetTimestep();
void SetLimitFps(bool enable);
void ToggleLimitFps();
double GetFps();
void DrawScene(ParticleSystem* m, double strainSize, bool drawPoints);
void DrawGrid(int gridSize, double groundLevel);
void Update(double timestep);
void GetCameraRay(double x, double y, Eigen::Vector3d* origin, Eigen::Vector3d* ray);
bool walkForward, walkBack, walkRight, walkLeft, walkUp, walkDown;
int drawMode;
bool slowMode;
int groundMode;
bool prevMode;
bool limitFps;
std::vector<float> fpsVec;
private:
int frames;
int GridFloor(double x, int mpG);
std::vector<float> gridpoints;
std::vector<float> gridcolors;
double timestart;
double curTime;
double timeAhead;
double prevTime;
double secondsPerFrame;
double xpos, ypos, zpos;
double xtarg, ytarg, ztarg;
};
#endif