|
MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
|
Abstract base for 3D model format writers. More...
#include <ModelWriter.hpp>
Inheritance diagram for MayaFlux::IO::ModelWriter:
Collaboration diagram for MayaFlux::IO::ModelWriter:Public Member Functions | |
| virtual bool | can_write (const std::string &filepath) const =0 |
| Check whether this writer handles the given filepath. | |
| virtual std::string | get_last_error () const =0 |
| Last error message or empty string. | |
| virtual std::vector< std::string > | get_supported_extensions () const =0 |
| File extensions handled by this writer (without dot). | |
| virtual bool | write (const std::string &filepath, const std::vector< Kakshya::MeshData > &meshes, const ModelWriteOptions &options={})=0 |
| Write one or more meshes to disk as a single scene. | |
| virtual | ~ModelWriter ()=default |
Abstract base for 3D model format writers.
Parallels ImageWriter/VolumeWriter. A writer accepts one or more Kakshya::MeshData (one per aiMesh in the exported scene, mirroring how ModelReader produces one MeshData per aiMesh on import) and is responsible for validating that the target format can express what it's given: a format with no non-triangle primitive support rejects point/line data rather than silently dropping it. See AssimpModelWriter's own doc for the concrete list of formats verified safe for which topology.
Writers are single-shot: one call to write() produces one file. MeshData is always CPU-authoritative in this codebase (see MeshBuffer's mutation path), so no GPU download step belongs here. A caller with GPU-only mesh state (ComputeMeshBuffer) downloads to MeshData first via IO::download_compute_mesh, then calls write() like any other source.
Definition at line 53 of file ModelWriter.hpp.