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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
//! # mesh-tools: A Rust library for exporting glTF/GLB files
//!
//! This library provides a high-level API for creating and exporting 3D models in the
//! [glTF](https://www.khronos.org/gltf/) (GL Transmission Format) standard, which is a
//! JSON-based format for 3D scenes and models, widely used for efficient transmission and loading
//! of 3D content.
//!
//! ## Key Features
//!
//! - Create and manipulate 3D geometry (vertices, normals, UVs, indices)
//! - Generate primitive shapes (boxes, spheres, planes, cylinders, etc.)
//! - Define materials with physically-based rendering (PBR) properties
//! - Support for textures and image data
//! - Create complex hierarchical scenes with node parent-child relationships
//! - Export models in both glTF (JSON+binary) and GLB (single binary) formats
//! - Lightweight math types via the mint crate
//!
//! ## Math Types
//!
//! This library uses the lightweight [mint](https://crates.io/crates/mint) crate for mathematical types.
//! A compatibility layer is provided in the `compat` module to make working with these types easy:
//!
//! ```rust
//! use mesh_tools::compat::{Point3, Vector2, Vector3};
//!
//! // Use constructor functions
//! let position = mesh_tools::compat::point3::new(1.0, 2.0, 3.0);
//! let normal = mesh_tools::compat::vector3::new(0.0, 1.0, 0.0);
//!
//! // Vector operations
//! let a = mesh_tools::compat::vector3::new(1.0, 0.0, 0.0);
//! let b = mesh_tools::compat::vector3::new(0.0, 1.0, 0.0);
//! let cross_product = mesh_tools::compat::cross(a, b);
//! ```
//!
//! ## Basic Usage
//!
//! ```rust
//! use mesh_tools::GltfBuilder;
//!
//! // Create a new glTF builder
//! let mut builder = GltfBuilder::new();
//!
//! // Create a simple box mesh
//! let box_mesh = builder.create_box(1.0);
//!
//! // Add a node referencing the mesh
//! let node = builder.add_node(
//! Some("Box".to_string()),
//! Some(box_mesh),
//! None, // Default position
//! None, // Default rotation
//! None, // Default scale
//! );
//!
//! // Create a scene containing the node
//! builder.add_scene(Some("Main Scene".to_string()), Some(vec![node]));
//!
//! // Export to GLB format
//! builder.export_glb("output.glb").unwrap();
//! ```
//!
//! See the examples directory for more complex usage scenarios.
// Public modules
// Texture and image handling
// Geometry generation primitives
// Error types and results
// glTF data model definitions
// glTF format constants
// Compatibility layer for mint math types
// Material creation and management
// Mesh creation and manipulation
// Main GltfBuilder implementation
// Internal implementation modules
// Implementations for primitive shape creation
// Implementations for texture handling
// Implementations for material handling
// Implementations for specular material handling
// Implementations for animation handling
// Re-exports
pub use ;
pub use *;
pub use GltfBuilder;
pub use Triangle;
// Constants re-exports
pub use accessor_type;
pub use buffer_view_target;
pub use component_type;
pub use sampler_filter;
pub use sampler_wrap;
pub use alpha_mode;
pub use primitive_mode;
pub use ;