#pragma once #include #include #include #include "assets/dynamic_data_store.hpp" #include "assets/components/point_cloud_vertex_components.hpp" #include "assets/data/point_cloud_data.hpp" #include "assets/data_stores/point_cloud_store.hpp" #include "assets/prefetch_lookup.hpp" #include "assets/prefetch_queue.hpp" #include "glm/mat4x4.hpp" #include "util/result.hpp" namespace assets { struct kitti_loader { static constexpr auto name = std::string_view("kitti"); [[nodiscard]] static std::error_code prefetch( const file_dir_list& paths, prefetch_queue& queue ); [[nodiscard]] static std::error_code load( point_cloud_data& buffer, const file_dir_list& paths, prefetch_lookup& id_lookup, shader_source_store& store, bool pedantic = false ); private: inline static constexpr auto frame_folder = "frames"; [[nodiscard]] static ztu::result frame_id_from_filename( std::string_view filename ); [[nodiscard]] static std::error_code load_point_file( const std::filesystem::path& filename, dynamic_point_cloud_buffer& point_cloud ); static void transform_point_cloud( std::span points, const glm::mat4& pose ); [[nodiscard]] static ztu::result parent_directory(std::string_view path); }; }