Add machine workshop, typed logic, mechanics and sensor-driven ECUs

This commit is contained in:
max
2026-11-02 07:27:13 +01:00
parent eb2b6366c2
commit abfcce0f46
99 changed files with 28835 additions and 145 deletions

View File

@@ -0,0 +1,21 @@
#pragma once
#include "FluidSim/Machine.hpp"
#include "FluidSim/Desktop/OrbitCamera.hpp"
#include <SFML/Graphics.hpp>
#include <memory>
namespace fluidsim::port::desktop {
struct MachineRenderStats {std::uint64_t pipe_mesh_builds{},icon_atlas_builds{};std::size_t cached_pipes{};};
class MachineRenderer3D {
public:
MachineRenderer3D();
~MachineRenderer3D();
MachineRenderer3D(const MachineRenderer3D&)=delete;
MachineRenderer3D& operator=(const MachineRenderer3D&)=delete;
void draw(sf::RenderWindow&,const MachineDocument&,const MachineSnapshot*,sf::FloatRect,const OrbitCamera&,std::uint32_t selected,const MachinePart* ghost=nullptr,const std::vector<std::uint32_t>& selection={});
void draw_icon(sf::RenderWindow&,MachinePartKind,sf::FloatRect);
MachineRenderStats stats()const;
private:
struct Impl;
std::unique_ptr<Impl> impl_;
};
}