fixes
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
#include <unordered_map>
|
||||
#include "assets/dynamic_data_stores/dynamic_material_library_store.hpp"
|
||||
|
||||
using material_library_prefetch_lookup = std::unordered_map<std::filesystem::path, dynamic_material_library_store::id_type>;
|
||||
@@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
#include <unordered_map>
|
||||
#include "assets/dynamic_data_stores/dynamic_material_store.hpp"
|
||||
|
||||
using material_prefetch_lookup = std::unordered_map<std::filesystem::path, dynamic_material_store::id_type>;
|
||||
7
include/assets/prefetch_lookups/mesh_prefetch_lookup.hpp
Normal file
7
include/assets/prefetch_lookups/mesh_prefetch_lookup.hpp
Normal file
@@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
#include <unordered_map>
|
||||
#include "assets/dynamic_data_stores/dynamic_mesh_store.hpp"
|
||||
|
||||
using mesh_prefetch_lookup = std::unordered_map<std::filesystem::path, dynamic_mesh_store::id_type>;
|
||||
@@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
#include <unordered_map>
|
||||
#include "assets/dynamic_data_stores/dynamic_point_cloud_store.hpp"
|
||||
|
||||
using point_cloud_prefetch_lookup = std::unordered_map<std::filesystem::path, dynamic_point_cloud_store::id_type>;
|
||||
58
include/assets/prefetch_lookups/pose_prefetch_lookup.hpp
Normal file
58
include/assets/prefetch_lookups/pose_prefetch_lookup.hpp
Normal file
@@ -0,0 +1,58 @@
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "assets/dynamic_data_stores/dynamic_pose_store.hpp"
|
||||
#include "util/uix.hpp"
|
||||
|
||||
class pose_prefetch_lookup {
|
||||
public:
|
||||
using index_type = ztu::u32;
|
||||
using directory_lookup = std::unordered_map<std::filesystem::path, index_type>;
|
||||
using directory_iterator = std::pair<directory_lookup::iterator, index_type>;
|
||||
using index_lookup = std::vector<index_type>;
|
||||
using index_iterator = index_lookup::iterator;
|
||||
using lookup_type = std::vector<dynamic_pose_store::id_type>;
|
||||
using iterator = lookup_type::iterator;
|
||||
|
||||
void emplace(
|
||||
const std::filesystem::path& directory,
|
||||
index_type index,
|
||||
dynamic_pose_store::id_type id
|
||||
);
|
||||
|
||||
void emplace_hint_dir(
|
||||
directory_iterator directory_it,
|
||||
const std::filesystem::path& directory,
|
||||
index_type index,
|
||||
dynamic_pose_store::id_type id
|
||||
);
|
||||
|
||||
void emplace_hint_dir_index(
|
||||
directory_iterator directory_it,
|
||||
index_iterator index_it,
|
||||
index_type index,
|
||||
dynamic_pose_store::id_type id
|
||||
);
|
||||
|
||||
std::pair<directory_iterator, bool> find_directory(
|
||||
const std::filesystem::path& directory
|
||||
);
|
||||
|
||||
std::pair<index_iterator, dynamic_pose_store::id_type> find_index(
|
||||
directory_iterator directory_it,
|
||||
index_type index
|
||||
);
|
||||
|
||||
protected:
|
||||
directory_iterator emplace_dir(
|
||||
directory_iterator directory_it,
|
||||
const std::filesystem::path& directory
|
||||
);
|
||||
|
||||
private:
|
||||
directory_lookup m_directory_lookup;
|
||||
index_lookup m_directory_indices; // count before indices, indices sorted per dir
|
||||
lookup_type m_pose_ids; // offset by 1
|
||||
};
|
||||
@@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
#include <unordered_map>
|
||||
#include "assets/dynamic_data_stores/dynamic_shader_st
|
||||
|
||||
using texture_prefetch_lookup = std::unordered_map<std::filesystem::path, dynamic_texture_store::id_type>;
|
||||
@@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
#include <unordered_map>
|
||||
#include "assets/dynamic_data_stores/dynamic_texture_store.hpp"
|
||||
|
||||
using texture_prefetch_lookup = std::unordered_map<std::filesystem::path, dynamic_texture_store::id_type>;
|
||||
Reference in New Issue
Block a user