44 lines
892 B
C++
44 lines
892 B
C++
#pragma once
|
|
|
|
#include <filesystem>
|
|
|
|
#include "assets/prefetch_lookup.hpp"
|
|
#include "assets/prefetch_queue.hpp"
|
|
#include "assets/data/pose_data.hpp"
|
|
#include "util/result.hpp"
|
|
#include "assets/prefetch_lookups/pose_prefetch_lookup.hpp"
|
|
|
|
namespace assets
|
|
{
|
|
|
|
struct threedtk_pose_loader
|
|
{
|
|
static constexpr auto name = std::string_view("3dtk_pose");
|
|
|
|
[[nodiscard]] static std::error_code prefetch(
|
|
const file_dir_list& paths,
|
|
prefetch_queue& queue
|
|
);
|
|
|
|
[[nodiscard]] static std::error_code load(
|
|
pose_data& buffer,
|
|
const file_dir_list& paths,
|
|
prefetch_lookup& id_lookup,
|
|
shader_source_store& store,
|
|
bool pedantic = false
|
|
);
|
|
|
|
protected:
|
|
static std::error_code parse_transform_info(
|
|
std::ifstream& in,
|
|
std::string& line,
|
|
std::array<glm::vec3, 2>& transform_info
|
|
);
|
|
|
|
static ztu::result<pose_prefetch_lookup::index_type> parse_index(
|
|
std::string_view filename
|
|
);
|
|
};
|
|
|
|
}
|