MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ load()

std::vector< Kakshya::MeshData > MayaFlux::IO::ModelReader::load ( const std::string &  filepath)

Load all meshes from a file in one call.

Opens, imports, extracts, and closes in a single synchronous operation. Returns an empty vector on failure; check get_last_error().

Parameters
filepathPath to the model file.
Returns
One MeshData per aiMesh in the scene, in scene order.

Definition at line 63 of file ModelReader.cpp.

64{
65 if (!open(filepath)) {
66 return {};
67 }
68 auto result = extract_meshes();
69 close();
70 return result;
71}
std::vector< Kakshya::MeshData > extract_meshes() const
Load all meshes after open() has already been called.
void close() override
Close the currently open file.
bool open(const std::string &filepath, FileReadOptions options=FileReadOptions::ALL) override
Open a file for reading.

References close(), extract_meshes(), and open().

+ Here is the call graph for this function: