-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFluid.h
More file actions
70 lines (54 loc) · 1.32 KB
/
Copy pathFluid.h
File metadata and controls
70 lines (54 loc) · 1.32 KB
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
60
61
62
63
64
65
66
67
68
69
70
#pragma once
#include "utils.h"
using namespace std;
using namespace sf;
class Fluid
{
public:
Fluid();
Fluid(float, float, float, float, float, float, float);
void update(float);
void reset();
Sprite get_speed_sprite();
Sprite get_density_sprite();
Sprite get_pressure_sprite();
Sprite get_wall_sprite();
Sprite get3DSprite();
void add_density(Vector2f, float const&, float const&);
void set_wall(Vector2f const&, float const&, int);
void add_pressure(Vector2f const&, float const&, float const&);
void add_speed(Vector2f, Vector2f, Vector2f);
void draw_speed_field(RenderWindow &, float const&, Color const&) const;
Sprite get_temperature_sprite();
void add_temperature(Vector2f, float const&, float const&);
private:
int width;
int height;
float scale;
float rho;
float k;
float buoyancy_fctr;
float L;
float ambient_tpr;
Matrix u;
Matrix u_pred;
Matrix v;
Matrix v_pred;
Matrix pressure;
Matrix walls;
Matrix density;
Matrix density_pred;
Matrix temperature;
Matrix temperature_pred;
Image image;
Texture texture;
Sprite sprite;
Image posPressureColor;
Image negPressureColor;
Image temperatureColor;
Image speedColor;
Image densityColor;
float pressure_scale;
float viscosity_scale;
float temperature_scale;
};