38 lines
629 B
C
38 lines
629 B
C
|
//
|
||
|
// Created by johan on 2025-01-25.
|
||
|
//
|
||
|
|
||
|
#ifndef SIMULATION_H
|
||
|
#define SIMULATION_H
|
||
|
namespace simulation
|
||
|
{
|
||
|
enum Fluid
|
||
|
{
|
||
|
VACUUM = 0,
|
||
|
WATER,
|
||
|
MERCURY
|
||
|
};
|
||
|
|
||
|
struct SimulationGrid
|
||
|
{
|
||
|
unsigned int* cells;
|
||
|
unsigned char x_max;
|
||
|
unsigned char y_max;
|
||
|
unsigned char z_max;
|
||
|
};
|
||
|
|
||
|
void step(
|
||
|
double millisecondsSinceLastStep,
|
||
|
SimulationGrid* input,
|
||
|
SimulationGrid* output);
|
||
|
|
||
|
unsigned int getCellOffset(
|
||
|
unsigned char x,
|
||
|
unsigned char y,
|
||
|
unsigned char z,
|
||
|
SimulationGrid* grid);
|
||
|
|
||
|
}
|
||
|
|
||
|
#endif //SIMULATION_H
|