-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Extrusion #13270
Extrusion #13270
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some small doc improvements, but I'm fundamentally on board with this. I really like how straightforward and clean the extrusion type is, and the new traits are a very natural abstraction.
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! My only misgiving with this is that the way that traits work makes some of the docs worse, but there's not really anything you can do about that.
Thank you to everyone involved with the authoring or reviewing of this PR! This work is relatively important and needs release notes! Head over to bevyengine/bevy-website#1312 if you'd like to help out. |
I think it would make a lot of sense to merge either #13478 or #13346 first, because as it stands you really cannot do anything with extrusions |
Objective
Extrusion<T: Primitive2d>
shape, suggestion of Tracking Issue: Primitive Shapes #10572Solution
Measured2d
andMeasured3d
traits for getting the perimeter/area or area/volume of shapes. This allows implementing.volume()
and.area()
for all extrusionsExtrusion<T: Primitive2d + Measured2d>
withinbevy_math
Measured2d
andMeasured3d
0.
should be equivalent in everything but name to the base shapeCaviats
Extrusion<T>
could also bePrism<T>
and theMeasuredNd
could also be something likeMeasuredPrimitiveNd
. If you have any other suggestions, please fell free to share them :)Future work
This PR adds a basic
Extrusion
shape and does not implement a lot of things you might want it to. Some of the future possibilities include: