-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathView.h
59 lines (49 loc) · 1.29 KB
/
View.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
52
53
54
55
56
57
58
59
//
// Created by Ruud Andriessen on 10/05/2017.
//
#ifndef FLUIDS_VIEW_H
#define FLUIDS_VIEW_H
#include "System.h"
#include "SystemBuilder.h"
#include "forces/DirectionalForce.h"
class View {
public:
View(int width, int height, float dt, int N);
~View() { delete sys; };
// Event handlers
void onDisplay();
void onIdle(void);
void onMotionEvent(int x, int y);
void onReshape(int width, int height);
void onMouseEvent(int button, int state, int x, int y);
void onKeyPress(unsigned char key, int x, int y);
void initialize(SystemBuilder::AvailableSystems type);
private:
System* sys = NULL;
DirectionalForce* wind;
DirectionalForce* mouseDragForce;
Particle* mouseDragParticle;
int id;
int mx, my, omx, omy, hmx, hmy;
int initialMx, initialMy;
int width, height;
bool dumpFrames;
bool drawVelocity, drawConstraints, drawForces, drawMarchingCubes;
bool isSimulating, adaptive;
int rotate = 0;
int N;
int frameNumber;
float dt;
float camAngle = 0;
int frame;
float currenttime, timebase;
int mouse_down[3];
int mouse_release[3];
int mouse_shiftclick[3];
void getFromGUI();
void remapGUI();
// Display utility
void preDisplay3D();
void postDisplay();
};
#endif //FLUIDS_VIEW_H