oxideav-mesh3d 0.0.6

Pure-Rust 3D scene + mesh typed model — Decoder/Encoder traits for STL/OBJ/glTF/FBX/USD format crates
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! [`Mesh3DEncoder`] trait — [`Scene3D`]-in, bytes-out.
//!
//! Symmetric to [`Mesh3DDecoder`](crate::Mesh3DDecoder); same
//! lifecycle expectations.

use crate::{Result, Scene3D};

/// Serialise a [`Scene3D`] into a 3D-format byte buffer.
///
/// `&mut self` lets the encoder hold scratch buffers or output
/// options between calls.
pub trait Mesh3DEncoder {
    /// Serialise `scene` to bytes in the encoder's format.
    fn encode(&mut self, scene: &Scene3D) -> Result<Vec<u8>>;
}