Skip to main content

Crate oxideav_obj

Crate oxideav_obj 

Source
Expand description

Pure-Rust Wavefront OBJ + MTL 3D mesh codec.

Implements oxideav_mesh3d::Mesh3DDecoder and oxideav_mesh3d::Mesh3DEncoder for the polygonal subset of the OBJ format published by Wavefront Technologies in the early 1990s (Appendix B of the Advanced Visualizer manual). Companion MTL material files are parsed/serialised by the same crate so a decoded Scene3D carries its full material set.

§Modules

  • obj — line-oriented parser and serialiser for the geometry format itself (v / vt / vn / f / l / o / g / s / usemtl / mtllib).
  • mtl — line-oriented parser and serialiser for the material library (newmtl / Ka / Kd / Ks / Ns / Ni / d / Tr / illum / map_* and the Wavefront-PBR extension Pr / Pm / Pc / Ps / map_Pr / map_Pm).
  • decoderObjDecoder type wired to the Mesh3DDecoder trait.
  • encoderObjEncoder type wired to the Mesh3DEncoder trait.

§Standalone build

Drop the registry feature for a free-standing build:

oxideav-obj = { version = "0.0", default-features = false }

This compiles out the register helper and the oxideav-core dependency; the ObjDecoder and ObjEncoder types remain usable directly through the standalone Mesh3DDecoder / Mesh3DEncoder traits.

Re-exports§

pub use decoder::ObjDecoder;
pub use encoder::ObjEncoder;

Modules§

decoder
Mesh3DDecoder adaptors for OBJ + standalone MTL inputs.
encoder
Mesh3DEncoder adaptors for OBJ + standalone MTL outputs.
mtl
Wavefront MTL (material library) ASCII parser + serialiser.
obj
Wavefront OBJ ASCII parser + serialiser.

Functions§

register
Register OBJ + MTL decoders and encoders with a Mesh3DRegistry.