oxihuman_export/lib.rs
1// Copyright (C) 2026 COOLJAPAN OU (Team KitaSan)
2// SPDX-License-Identifier: Apache-2.0
3
4//! Export pipeline for OxiHuman — 50+ geometry, animation, and texture formats.
5//!
6//! This crate translates [`oxihuman_mesh::MeshBuffers`] into a wide array of
7//! output formats. The primary entry point for most users is
8//! [`export_auto`], which infers the format from the file extension. For batch
9//! pipelines use [`batch_export`] or the async-friendly [`ExportJobQueue`].
10//!
11//! # Supported format families
12//!
13//! | Family | Key functions |
14//! |---|---|
15//! | glTF/GLB | [`export_glb`], [`export_gltf_sep`], [`export_glb_blend_shapes`] |
16//! | OBJ / MTL | [`export_obj`], [`export_obj_mtl`] |
17//! | COLLADA | [`export_collada`], [`export_collada_scene`] |
18//! | STL | [`export_stl_binary`], [`export_stl_ascii`] |
19//! | USD / USDZ | [`export_usda`], [`package_usdz`] |
20//! | Alembic | [`AlembicWriter`] (Ogawa-compatible binary writer) |
21//! | Point cache | [`export_pc2`], [`export_mdd`], [`export_point_cache`] |
22//! | VRM | [`build_vrm_extensions_json`] |
23//! | 3MF | [`export_3mf`] |
24//! | Streaming | [`stream_mesh_positions`] |
25//!
26//! # Quick start
27//!
28//! ```rust,no_run
29//! use oxihuman_export::export_auto;
30//! use oxihuman_mesh::MeshBuffers;
31//! use std::path::Path;
32//!
33//! fn export_human(mesh: &MeshBuffers) -> anyhow::Result<()> {
34//! export_auto(mesh, Path::new("/tmp/human.glb"))
35//! }
36//! ```
37
38// Part 1: Core 3D formats — glTF/GLB, OBJ, COLLADA, STL, USD, Alembic,
39// point-cache, streaming, texture/material helpers, misc geometry I/O.
40include!("_export_part1.rs");
41
42// Part 2: Rigging, deformation & material/texture-map exports
43// (blend_mask → geo_modifier, ~88 modules).
44include!("_export_part2.rs");
45
46// Part 3: More deformation, collision, curve, animation exports
47// (geo_modifier → svg_path, ~88 modules).
48include!("_export_part3.rs");
49
50// Part 4: Web/streaming/shader/serialisation formats
51// (svg_path → avro/parquet/arrow/wav, ~88 modules).
52include!("_export_part4.rs");
53
54// Part 5: Protocol & audio exports — MIDI, OSC, DMX, ROS, geo-data formats,
55// image formats, rendering-related exports (~88 modules).
56include!("_export_part5.rs");
57
58// Part 6: Body, biometric, skin, ML-model & biomechanics exports
59// (galvanic → opensim_ik, ~87 modules).
60include!("_export_part6.rs");