#pragma once #include #include #include #include "glm/mat4x4.hpp" #include "util/result.hpp" #include "util/string_list.hpp" #include "assets/prefetch_queue.hpp" #include "../../read_buffers" #include "../../data_stores" #include "assets/prefetch_lookup.hpp" template struct generic_3dtk_loader { [[nodiscard]] static std::error_code prefetch( const ztu::string_list& filenames, prefetch_queue& queue ); [[nodiscard]] static std::error_code load( dynamic_point_cloud_buffer& buffer, const file_dir_list& paths, dynamic_point_cloud_store& store, prefetch_lookup& id_lookup, bool pedantic = false ); protected: [[nodiscard]] static ztu::result parse_index( std::string_view filename ); ztu::result> analyze_component_format( std::string_view line ); void transform_point_cloud( std::span points, const glm::mat4& pose ); private: std::error_code read_point_file( const std::filesystem::path& filename, dynamic_point_cloud_buffer& point_cloud ); }; #define INCLUDE_GENERIC_3DTK_LOADER_IMPLEMENTATION #include "../../data_parsers" #undef INCLUDE_GENERIC_3DTK_LOADER_IMPLEMENTATION