Twinklebear / tobj

Tiny OBJ Loader in Rust
MIT License
233 stars 47 forks source link

Add support for smoothing groups #35

Open virtualritz opened 3 years ago

virtualritz commented 3 years ago

Add support for reading smoothing groups. Just another index with length num_face_indices (aka number of faces of the mesh). Each entry is the number of the smoothing group that the face belongs to.

Another option is to have a Vec<Vec<u32>>. Where the second level represents the individual groups. But that seems to be against the philosophy of this lib to store everything in flat buffers (e.g. one could also combine indices & num_face_indices into a single Vec<Vec<u32>>, otherwise).