VoxelSim/simulation.h

40 lines
667 B
C
Raw Normal View History

2025-01-26 07:38:56 +01:00
//
// Created by johan on 2025-01-25.
//
#ifndef SIMULATION_H
#define SIMULATION_H
namespace simulation
{
enum Fluid
{
VACUUM = 0,
WATER,
MERCURY
};
struct SimulationGrid
{
2025-01-26 20:07:57 +01:00
unsigned int* in;
unsigned int* out;
2025-01-26 07:38:56 +01:00
unsigned char x_max;
unsigned char y_max;
unsigned char z_max;
};
void step(
double millisecondsSinceLastStep,
2025-01-27 20:29:50 +01:00
SimulationGrid* grid
2025-01-26 20:07:57 +01:00
);
2025-01-26 07:38:56 +01:00
2025-01-27 20:29:50 +01:00
int getCellOffset(
2025-01-26 07:38:56 +01:00
unsigned char x,
unsigned char y,
unsigned char z,
2025-01-27 20:29:50 +01:00
SimulationGrid* grid);
2025-01-26 07:38:56 +01:00
2025-01-27 20:29:50 +01:00
void prepareForNextStep(SimulationGrid* grid);
2025-01-26 07:38:56 +01:00
}
#endif //SIMULATION_H