holst-raytracer/src/simulation.h

22 lines
386 B
C++

#ifndef SIMULATION_H
#define SIMULATION_H
#include <vector>
#include <memory>
#include <mutex>
#include <atomic>
#include "vec3.h"
#include "ring_buffer.h"
struct SimulationState {
std::vector<Vec3> positions;
};
extern std::atomic<bool> running;
extern RingBuffer<Vec3> snapshot_buffer;
void simulation_loop(std::shared_ptr<SimulationState> state);
void render_loop();
#endif