tried making naming more uniform and implemented most of the opengl managers
This commit is contained in:
59
include/assets/file_parsers/kitti_loader.hpp
Normal file
59
include/assets/file_parsers/kitti_loader.hpp
Normal file
@@ -0,0 +1,59 @@
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
#include <vector>
|
||||
#include <span>
|
||||
|
||||
#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<std::size_t> 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<point_cloud_vertex_components::position> points,
|
||||
const glm::mat4& pose
|
||||
);
|
||||
|
||||
[[nodiscard]] static ztu::result<std::string_view> parent_directory(std::string_view path);
|
||||
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user