Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a test for Mesh::triangles and fix for TriangleStrip #16026

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

stepancheg
Copy link
Contributor

Objective

  • Illustrate behavior with a test
  • Fix a bug revealed by a test

Solution

  • Add a test and fix

Testing

Test added.

@alice-i-cecile alice-i-cecile added C-Bug An unexpected or incorrect behavior A-Rendering Drawing game state to the screen C-Code-Quality A section of code that is hard to understand or change A-Math Fundamental domain-agnostic mathematical operations S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Oct 20, 2024
} else {
indices_to_triangle(
vertices,
&[indices[1], indices[0], indices[2]],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In bevy_math, we currently reverse the orientation of Triangle3d by swapping the first and last vertices; maybe these should be consistent with that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I followed documentation for PrimitiveTopology::TriangleStrip which says:

Vertices 0 1 2 3 4 5 create four triangles 0 1 2, 2 1 3, 2 3 4, and 4 3 5

@alice-i-cecile alice-i-cecile added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Oct 21, 2024
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Oct 21, 2024
Merged via the queue into bevyengine:main with commit d0af199 Oct 21, 2024
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Math Fundamental domain-agnostic mathematical operations A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior C-Code-Quality A section of code that is hard to understand or change S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants