Skip to main content

SceneReader

Trait SceneReader 

Source
pub trait SceneReader: Reader {
    // Required method
    fn read_scene(&mut self) -> Result<Scene>;

    // Provided method
    fn read_scenes(&mut self) -> Result<Vec<Scene>> { ... }
}
Available on crate feature scene only.
Expand description

Trait for readers that can return full scene information (meshes + metadata).

This is a capability extension over the base Reader trait and is only implemented by formats that natively carry a scene graph (glTF, FBX). Flat formats deliberately do not implement it; use flatten_to_scene instead.

Required Methods§

Source

fn read_scene(&mut self) -> Result<Scene>

Read a single scene from the source/file.

Provided Methods§

Source

fn read_scenes(&mut self) -> Result<Vec<Scene>>

Read all scenes (default: single scene wrapper).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl SceneReader for FbxReader<BufReader<File>>

Available on crate feature fbx-reader only.
Source§

impl SceneReader for GltfReader

Available on crate feature gltf-reader only.