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

Prepare a mesh for a given geometry. #9

Merged
merged 13 commits into from
Jul 1, 2023

Conversation

gibbz00
Copy link
Contributor

@gibbz00 gibbz00 commented Jun 24, 2023

Summary of the biggest changes in this PR:

  • Each geometry has a <geometry>_to_mesh() method. Return signature depends on the geometry.
  • build_bevy_meshes and its respective traits are hidden from the public API.
  • PreparedMesh (now called GeometryMesh) is only returned by geometry_to_mesh or geometry_collection_to_mesh.

Depends on: #8

Being able to ask geo-bevy to prepare a mesh for a given geometry means that one doesn't have to loop over an iterator and match on PreparedMesh when the user knows that only one mesh is returned and which variant it is.
This was made possible in #8 due to how line string meshes representing the polygon's exterior and interiors rings are in that PR passed with the PreparedMesh::Polygon variant.

@gibbz00 gibbz00 changed the title Build mesh for a given geometry. Prepare a mesh for a given geometry. Jun 24, 2023
Cargo.toml Outdated Show resolved Hide resolved
@frewsxcv frewsxcv merged commit d163547 into frewsxcv:main Jul 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants