Loading...
Searching...
No Matches
hellfire::ModelSerializer Class Reference

Serializes the ImportResult to a .hfmodel file. More...

#include <ModelSerializer.h>

Collaboration diagram for hellfire::ModelSerializer:

Static Public Member Functions

static bool save (const std::filesystem::path &filepath, const ImportResult &result)
 
static std::optional< ImportResultload (const std::filesystem::path &filepath)
 
static bool save_json (const std::filesystem::path &filepath, const ImportResult &result)
 
static std::optional< ImportResultload_json (const std::filesystem::path &filepath)
 

Static Public Attributes

static constexpr uint32_t MAGIC = 0x4C444F4D
 
static constexpr uint32_t VERSION = 1
 

Detailed Description

Serializes the ImportResult to a .hfmodel file.

This captures the hierarchy and asset references for instantiation

Definition at line 18 of file ModelSerializer.h.

Member Function Documentation

◆ load()

std::optional< ImportResult > hellfire::ModelSerializer::load ( const std::filesystem::path &  filepath)
static

Definition at line 70 of file ModelSerializer.cpp.

◆ load_json()

std::optional< ImportResult > hellfire::ModelSerializer::load_json ( const std::filesystem::path &  filepath)
static

Definition at line 175 of file ModelSerializer.cpp.

◆ save()

bool hellfire::ModelSerializer::save ( const std::filesystem::path &  filepath,
const ImportResult result 
)
static

Definition at line 14 of file ModelSerializer.cpp.

◆ save_json()

bool hellfire::ModelSerializer::save_json ( const std::filesystem::path &  filepath,
const ImportResult result 
)
static

Definition at line 138 of file ModelSerializer.cpp.

Member Data Documentation

◆ MAGIC

constexpr uint32_t hellfire::ModelSerializer::MAGIC = 0x4C444F4D
staticconstexpr

Definition at line 20 of file ModelSerializer.h.

◆ VERSION

constexpr uint32_t hellfire::ModelSerializer::VERSION = 1
staticconstexpr

Definition at line 21 of file ModelSerializer.h.


The documentation for this class was generated from the following files: