|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
Assimp-backed loader for 3D model files. More...
#include <ModelReader.hpp>
Inheritance diagram for MayaFlux::IO::ModelReader:
Collaboration diagram for MayaFlux::IO::ModelReader:Classes | |
| struct | Impl |
Public Member Functions | |
| bool | can_read (const std::string &filepath) const override |
| Check if a file can be read by this reader. | |
| void | close () override |
| Close the currently open file. | |
| std::shared_ptr< Kakshya::SignalSourceContainer > | create_container () override |
| No-op. | |
| std::vector< std::shared_ptr< Buffers::MeshBuffer > > | create_mesh_buffers (const TextureResolver &resolver=nullptr) const |
| Construct one MeshBuffer per mesh in the currently loaded scene. | |
| std::shared_ptr< Nodes::Network::MeshNetwork > | create_mesh_network (const TextureResolver &resolver=nullptr) const |
| Construct a MeshNetwork from all meshes in the currently loaded scene. | |
| std::vector< Kakshya::MeshData > | extract_meshes () const |
| Load all meshes after open() has already been called. | |
| std::type_index | get_container_type () const override |
| Get the container type this reader creates. | |
| std::type_index | get_data_type () const override |
| Get the data type this reader produces. | |
| std::vector< uint64_t > | get_dimension_sizes () const override |
| Get size of each dimension in the file data. | |
| std::string | get_last_error () const override |
| Get the last error message. | |
| std::optional< FileMetadata > | get_metadata () const override |
| Get metadata from the open file. | |
| size_t | get_num_dimensions () const override |
| Get the dimensionality of the file data. | |
| uint64_t | get_preferred_chunk_size () const override |
| Get the preferred chunk size for streaming. | |
| std::vector< uint64_t > | get_read_position () const override |
| Get current read position in primary dimension. | |
| std::vector< FileRegion > | get_regions () const override |
| Get semantic regions from the file. | |
| std::vector< std::string > | get_supported_extensions () const override |
| Get supported file extensions for this reader. | |
| bool | is_open () const override |
| Check if a file is currently open. | |
| std::vector< Kakshya::MeshData > | load (const std::string &filepath) |
| Load all meshes from a file in one call. | |
| bool | load_into_container (std::shared_ptr< Kakshya::SignalSourceContainer > container) override |
| No-op. | |
| ModelReader () | |
| bool | open (const std::string &filepath, FileReadOptions options=FileReadOptions::ALL) override |
| Open a file for reading. | |
| std::vector< Kakshya::DataVariant > | read_all () override |
| Read all data from the file into memory. | |
| std::vector< Kakshya::DataVariant > | read_region (const FileRegion ®ion) override |
| Read a specific region of data. | |
| bool | seek (const std::vector< uint64_t > &position) override |
| Seek to a specific position in the file. | |
| bool | supports_streaming () const override |
| Check if streaming is supported for the current file. | |
| ~ModelReader () override | |
Public Member Functions inherited from MayaFlux::IO::FileReader | |
| virtual | ~FileReader ()=default |
Private Member Functions | |
| Kakshya::MeshData | extract_single_mesh (const void *ai_mesh, const void *ai_scene, std::string_view mesh_name, std::string_view material_name) const |
| void | set_error (std::string msg) const |
Private Attributes | |
| std::unique_ptr< Impl > | m_impl |
| bool | m_is_open { false } |
| std::string | m_last_error |
Additional Inherited Members | |
Static Public Member Functions inherited from MayaFlux::IO::FileReader | |
| static std::string | resolve_path (const std::string &filepath) |
| Resolve a filepath against the project source root if not found as-is. | |
Static Protected Member Functions inherited from MayaFlux::IO::FileReader | |
| static std::unordered_map< std::string, Kakshya::RegionGroup > | regions_to_groups (const std::vector< FileRegion > ®ions) |
| Convert file regions to region groups. | |
Assimp-backed loader for 3D model files.
Produces vector<Kakshya::MeshData> — one entry per assimp mesh in the imported scene. Each MeshData owns its vertex bytes (vector<uint8_t> in the canonical 60-byte interleaved MeshVertex format) and index array (vector<uint32_t>). Submesh identity is preserved in the single-entry case via MeshData::submeshes (a RegionGroup named "submeshes" with one Region). Multi-mesh files produce one MeshData per aiMesh, each with its own single-submesh RegionGroup.
Supported formats: glTF 2.0 (.glb, .gltf), OBJ, FBX, PLY, STL, DAE, and any other format Assimp supports on the target platform.
Post-processing applied unconditionally:
FileReader contract: create_container() and load_into_container() are no-ops for this reader; mesh data does not go through the SignalSourceContainer streaming path. Use load() or the IOManager::load_mesh() convenience wrapper instead.
Definition at line 57 of file ModelReader.hpp.