Closed mramato closed 9 years ago
@bagnell can you confirm please? I believe @mramato is right since when ear clipping polygons with holes by finding mutually visible vertices, the winding order needs to be consistent for the newly formed polygon, which would mean CCW outer and CW inner.
I can confirm that it should be COUNTER_CLOCKWISE
.
Are extruded polygons with holes considered opened or closed? Right now the DataSource layer sets them to closed, (which I assume is correct) but this results in interior walls being culled as in the below image:
My assumption is that this a bug in the geometry; specifically I think this line is flipped and should be
if (windingOrder === WindingOrder.COUNTER_CLOCKWISE)
If @pjcozzi or @bagnell can confirm either way, I'll open a fix (either in the Polygon code or the DataSource primitive batching code depending on the answer).