jkuhlmann / cgltf

:diamond_shape_with_a_dot_inside: Single-file glTF 2.0 loader and writer written in C99
MIT License
1.42k stars 135 forks source link

Implement getter functions for indices of various objects #217

Closed zeux closed 1 year ago

zeux commented 1 year ago

This can be useful to recover the index from the pointer for cases when another cgltf data structure contains the pointer.

For animation samplers/channels, the channel references the sampler, but nothing references the channel; it felt inconsistent to only add the sampler function, even though the channel function is unlikely to be useful.

Fixes #202. Closes #206, closes #207, closes #208, closes #209, closes #210, closes #211, closes #212, closes #213

EasyIP2023 commented 1 year ago

@zeux Thanks :partying_face: :rocket: works for me!