#pragma once #include #include "opengl/handles/point_cloud_handle.hpp" #include "opengl/handles/matrix_handles.hpp" #include #include "geometry/aabb.hpp" #include class point_cloud_batch { public: using id_type = ztu::u32; point_cloud_batch() = default; inline id_type add( const zgl::point_cloud_handle& point_cloud, const aabb& bounding_box, const zgl::model_matrix_handle& transform ); inline std::optional bounding_box(id_type id); inline bool remove(id_type id); [[nodiscard]] inline std::span point_clouds() const; [[nodiscard]] inline std::span transforms() const; [[nodiscard]] inline std::span bounding_boxes() const; private: std::vector m_point_clouds{}; std::vector m_transforms{}; std::vector m_bounding_boxes{}; std::vector m_id_lookup{}; id_type m_next_id{ 0 }; }; #define INCLUDE_POINT_CLOUD_BATCH_IMPLEMENTATION #include "rendering/batches/point_cloud_batch.ipp" #undef INCLUDE_POINT_CLOUD_BATCH_IMPLEMENTATION