#pragma once #include "../render/buffer/Abstract.hpp" #include "../data/geometry/Frustum.hpp" #include "../data/geometry/Faces.hpp" #include "../world/forward.h" /// Mesh creation namespace contouring { /// Generating mesh from world data class Abstract { public: Abstract() { } virtual ~Abstract() { } /// Each frame ping. /// Mostly used for cleanup and to flush buffers data using main thread virtual void update(const voxel_pos &pos, const world::area_map &areas) = 0; /// Chunk data change /// @param offset priority position offset virtual void onUpdate(const area_ &pos, const chunk_pos &offset, const world::ChunkContainer &data, geometry::Faces neighbors) = 0; /// Chunk existante ping /// @note notify for chunks entering view while moving virtual void onNotify(const area_ &pos, const chunk_pos &offset, const world::ChunkContainer &data) = 0; /// Display ImGui config virtual void onGui() = 0; /// Get options virtual std::string getOptions() const = 0; // Get camera recommended far range virtual std::pair getFarRange() const = 0; /// Get buffers in frustum with model matrices /// @note buffers invalidated after update virtual void getModels(std::vector> &buffers, const std::optional& frustum, const glm::llvec3& offset, int density) = 0; }; }