summaryrefslogtreecommitdiff
path: root/src/simulation/Air.h
blob: 0fc6b4f6aa108f5f184e7129f4eddf2aa25d491a (plain)
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
#ifndef AIR_H
#define AIR_H
#include "Config.h"

class Simulation;

class Air
{
public:
	Simulation & sim;
	int airMode;
	float ambientAirTemp;
	//Arrays from the simulation
	unsigned char (*bmap)[XRES/CELL];
	unsigned char (*emap)[XRES/CELL];
	float (*fvx)[XRES/CELL];
	float (*fvy)[XRES/CELL];
	//
	float vx[YRES/CELL][XRES/CELL];
	float ovx[YRES/CELL][XRES/CELL];
	float vy[YRES/CELL][XRES/CELL];
	float ovy[YRES/CELL][XRES/CELL];
	float pv[YRES/CELL][XRES/CELL];
	float opv[YRES/CELL][XRES/CELL];
	float hv[YRES/CELL][XRES/CELL];
	float ohv[YRES/CELL][XRES/CELL]; // Ambient Heat
	unsigned char bmap_blockair[YRES/CELL][XRES/CELL];
	unsigned char bmap_blockairh[YRES/CELL][XRES/CELL];
	float kernel[9];
	void make_kernel(void);
	void update_airh(void);
	void update_air(void);
	void Clear();
	void ClearAirH();
	void Invert();
	Air(Simulation & sim);
};

#endif