LatheGeometry: Change index order. #23291
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
LatheGeometry() produces bands of quads, each of which are further subdivided into an upper-right (blue) and a lower-left(green) triangle. The two triangles which are the result of quad subdivision, although different in shape and size, share common properties: Both comprise a horizontal edge, a slanted edge and a (shared) diagonal edge. The vertices of each triangle are specified in a CCW orientation.
To facilitate further processing in an i.e. custom shader, it would be advantageous, if 1st and 2nd index always specify the horizontal edge, and 1st and 3rd vertex always specify the slanted edge. This is currently not the case.
My proposed change involves a cyclical CCW rotation by one position of the indices of the upper-right triangle, in order to match the order already specified in the lower-left triangle. ==> b, c, d becomes c, d, b
Note that the one-letter vertex "names" in the sketch match the variable names in source code.