Add machine workshop, typed logic, mechanics and sensor-driven ECUs
This commit is contained in:
21
include/FluidSim/Desktop/MachineRenderer3D.hpp
Normal file
21
include/FluidSim/Desktop/MachineRenderer3D.hpp
Normal 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_;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user