1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
//! `draco-oxide` is a high-performance Draco codec written in pure Rust,
//! targeting the current Draco bitstreams: 2.2 for triangular meshes and 2.3
//! for point clouds.
//!
//! [`encode::Encoder`] compresses a [`Mesh`] or a [`PointCloud`] into a Draco
//! stream under an [`encode::Config`] or [`encode::PointCloudConfig`]; the free
//! [`encode::encode_mesh`] and [`encode::encode_point_cloud`] functions are
//! one-shot wrappers. Behind the default `decoder` feature, the decoder crate
//! is re-exported as [`decode`]. The [`io`] module loads and writes OBJ files
//! and transcodes glTF/GLB assets with Draco-compressed mesh primitives.
//!
//! Streams are interoperable with the reference C++ implementation in both
//! directions.
//!
//! Decode-only consumers (e.g. WASM viewers) should depend on the
//! `draco-oxide-decoder` crate directly, which never links the encoder.
/// Re-export of the shared core crate (`draco-oxide-core`): the geometry/attribute
/// data model, numeric primitives (`core::types`), and the codec algorithms shared
/// between encoder and decoder (`core::codec`). Reachable as `draco_oxide::core`.
pub use draco_oxide_core as core;
// Re-export the core data-model types a caller needs to drive the encoder, so
// depending on `draco-oxide` alone is enough, no separate `draco-oxide-core`
// import just to name a `Mesh`, build one, or reach `Config::default()`. The full
// surface remains available under `draco_oxide::core`.
/// The geometry container the encoder consumes, and the builder used to
/// assemble one.
///
/// Everything needed to drive the encoder is reachable from `draco_oxide` alone:
///
/// ```
/// use draco_oxide::{
/// Attribute, AttributeDomain, AttributeType, ComponentDataType, ConfigType, Mesh,
/// MeshBuilder, NdVector,
/// };
/// use draco_oxide::encode::Config;
///
/// let _builder = MeshBuilder::new();
/// let _cfg = <Config as ConfigType>::default();
/// let _ty = AttributeType::Position;
/// let _dom = AttributeDomain::Position;
/// let _ct = ComponentDataType::F32;
/// fn _drives(_m: Mesh, _a: Attribute, _v: NdVector<3, f32>) {}
/// ```
pub use ;
/// The point cloud container the encoder consumes.
pub use PointCloud;
/// The attribute data model: a vertex attribute and the enums describing it.
pub use ;
/// Numeric primitive for attribute values, and the trait exposing `default()` on
/// the encoder configs.
pub use ;
/// Contains the interface between `Mesh` object and 3D geometry files
/// such as obj and gltf.
/// Defines the mesh encoder.
/// The decoder crate (`draco-oxide-decoder`), re-exported behind the default
/// `decoder` feature. Reachable as `draco_oxide::decode`.
pub use draco_oxide_decoder as decode;
// White-box tests over crate-private encoder internals (data structures,
// traversal, entropy, connectivity); black-box integration tests live in the
// `tests` crate.