CesiumGS / cesium-native

Apache License 2.0
414 stars 210 forks source link

Add support for other primitive modes in `IndicesForFaceFromAccessor` #790

Closed j9liu closed 7 months ago

j9liu commented 8 months ago

I noticed while working in Unity that IndicesForFaceFromAccessor made assumptions about the geometry -- it always assumed the mode was TRIANGLES. However, the math is completely different for TRIANGLE_FAN and TRIANGLE_STRIP modes. I'm opening this PR to add proper support for the other triangle types.

kring commented 7 months ago

Thanks @j9liu!