Skip to content

Add segments to ExtrusionBuilder#13719

Merged
alice-i-cecile merged 2 commits intobevyengine:mainfrom
lynn-lumen:extrusion-segments
Jun 10, 2024
Merged

Add segments to ExtrusionBuilder#13719
alice-i-cecile merged 2 commits intobevyengine:mainfrom
lynn-lumen:extrusion-segments

Conversation

@lynn-lumen
Copy link
Contributor

Objective

  • Add support for segments for extrusion-meshes, akin to what is possible with cylinders

Solution

  • Added a .segments(segments: usize) function to ExtrusionBuilder.
  • Implemented support for segments in the meshing algorithm.
  • If you set .segments(0), the meshing will fail, just like it does with cylinders.

Additional information

Here is a wireframe of some extrusions with 1, 2, 3, etc. segments:
image_2024-06-06_233205114

@alice-i-cecile alice-i-cecile added C-Feature A new feature, making something new possible A-Math Fundamental domain-agnostic mathematical operations X-Uncontroversial This work is generally agreed upon D-Straightforward Simple bug fixes and API improvements, docs, test and examples labels Jun 6, 2024
@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Jun 8, 2024
@alice-i-cecile alice-i-cecile added this to the 0.14 milestone Jun 10, 2024
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Jun 10, 2024
Merged via the queue into bevyengine:main with commit 1196186 Jun 10, 2024
mockersf pushed a commit that referenced this pull request Jun 10, 2024
# Objective

- Add support for `segments` for extrusion-meshes, akin to what is
possible with cylinders

## Solution

- Added a `.segments(segments: usize)` function to `ExtrusionBuilder`.
- Implemented support for segments in the meshing algorithm.
- If you set `.segments(0)`, the meshing will fail, just like it does
with cylinders.

## Additional information

Here is a wireframe of some extrusions with 1, 2, 3, etc. segments:

![image_2024-06-06_233205114](https://github.com/bevyengine/bevy/assets/62256001/358081e2-172d-407b-8bdb-9cda88eb4664)

---------

Co-authored-by: Lynn Büttgenbach <62256001+solis-lumine-vorago@users.noreply.github.com>
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 C-Feature A new feature, making something new possible D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it X-Uncontroversial This work is generally agreed upon

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants