Finality Engine
Loading...
Searching...
No Matches
FINALITY::ModelAsset Class Reference

Loads imported model data and instantiates preserved model hierarchies. More...

#include <ModelAsset.h>

Static Public Member Functions

static void Configure (const std::filesystem::path &engineAssets, const ModelImportOptions &options={})
static std::shared_ptr< ModelData > Load (const std::string &reference, bool force=false)
static bool Import (const std::filesystem::path &source, const std::filesystem::path &target)
static void MakePortable (const std::filesystem::path &path, const std::filesystem::path &sourceDirectory={})
static std::shared_ptr< Mesh > LoadMesh (const std::string &reference)
static Entity Instantiate (Scene &scene, const std::string &reference)
static std::vector< RenderPacket > BuildPreview (const std::string &reference)
static void Clear ()
static bool Supports (const std::filesystem::path &path)
static ModelImportOptions GetImportOptions (const std::string &reference)
static bool SaveImportOptions (const std::string &reference, const ModelImportOptions &options, std::string &error)
static bool ExtractMaterials (const std::string &reference, const std::filesystem::path &directory, std::string &error)

Detailed Description

Loads imported model data and instantiates preserved model hierarchies.

ModelData retains nodes, submeshes, material slots, dependencies, diagnostics and bounds. ModelAsset applies import settings and supplies both scene instantiation and preview render packets.

Usage
Configure engine assets first. Load a model reference, inspect diagnostics, then Instantiate into a scene. SaveImportOptions persists per-model adjustments; ExtractMaterials writes editable material assets.

Definition at line 74 of file ModelAsset.h.

Member Function Documentation

◆ Configure()

void FINALITY::ModelAsset::Configure ( const std::filesystem::path & engineAssets,
const ModelImportOptions & options = {} )
static

◆ Load()

std::shared_ptr< ModelData > FINALITY::ModelAsset::Load ( const std::string & reference,
bool force = false )
static

◆ Import()

bool FINALITY::ModelAsset::Import ( const std::filesystem::path & source,
const std::filesystem::path & target )
static

◆ MakePortable()

void FINALITY::ModelAsset::MakePortable ( const std::filesystem::path & path,
const std::filesystem::path & sourceDirectory = {} )
static

◆ LoadMesh()

std::shared_ptr< Mesh > FINALITY::ModelAsset::LoadMesh ( const std::string & reference)
static

◆ Instantiate()

Entity FINALITY::ModelAsset::Instantiate ( Scene & scene,
const std::string & reference )
static

◆ BuildPreview()

std::vector< RenderPacket > FINALITY::ModelAsset::BuildPreview ( const std::string & reference)
static

◆ Clear()

void FINALITY::ModelAsset::Clear ( )
static

◆ Supports()

bool FINALITY::ModelAsset::Supports ( const std::filesystem::path & path)
static

◆ GetImportOptions()

ModelImportOptions FINALITY::ModelAsset::GetImportOptions ( const std::string & reference)
static

◆ SaveImportOptions()

bool FINALITY::ModelAsset::SaveImportOptions ( const std::string & reference,
const ModelImportOptions & options,
std::string & error )
static

◆ ExtractMaterials()

bool FINALITY::ModelAsset::ExtractMaterials ( const std::string & reference,
const std::filesystem::path & directory,
std::string & error )
static

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