Files
Destrum/destrum/include/destrum/Assets/ModelFile.h
T

24 lines
706 B
C++

#ifndef DESTRUM_MODELFILE_H
#define DESTRUM_MODELFILE_H
#include <cstdint>
#include <filesystem>
#include <span>
#include <string_view>
#include <vector>
#include <destrum/Util/ModelDoc.h>
namespace ModelFile {
inline constexpr std::uint32_t Version = 1;
inline constexpr std::string_view Extension = ".dmodel";
[[nodiscard]] std::vector<std::uint8_t> Write(const ModelDoc::ModelAsset& model);
[[nodiscard]] ModelDoc::ModelAsset Read(std::span<const std::uint8_t> bytes);
void WriteToFile(const ModelDoc::ModelAsset& model, const std::filesystem::path& path);
[[nodiscard]] ModelDoc::ModelAsset ReadFromFile(const std::filesystem::path& path);
}
#endif // DESTRUM_MODELFILE_H