Expand description
Pure-Rust parser for Autodesk 3D Studio binary (.3ds) files.
§Quick start
use ds3::parse;
let scene = parse(&std::fs::read("model.3ds").unwrap()).unwrap();
for mesh in &scene.meshes {
println!("{}: {} vertices, {} faces", mesh.name, mesh.vertices.len(), mesh.faces.len());
}§Coordinate system
3DS stores vertices in right-handed Y-up (the same convention used by glTF and Bevy). No axis
permutation is needed. The Mesh3ds::transform matrix is also Y-up.
Some exporters write Z-up data regardless of the spec; callers that know their
source is Z-up should swap Y/Z themselves after calling parse.
Structs§
- Mesh3ds
- A single triangle mesh extracted from a
.3dsfile. - Mesh
Buffers - Buffers produced by
Mesh3ds::to_flat_buffersorMesh3ds::to_smooth_buffers. - Scene3ds
- A complete scene read from a
.3dsfile.
Enums§
- Error3ds
- Errors that can occur while parsing a
.3dsfile.
Functions§
- parse
- Parse a
.3dsfile from a byte slice.
Type Aliases§
- Mat4x3
- Row-major 4×3 local-to-world transform matrix.