Conversation
alice-i-cecile
left a comment
There was a problem hiding this comment.
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>
mweatherley
left a comment
There was a problem hiding this comment.
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
Measured2dandMeasured3dtraits for getting the perimeter/area or area/volume of shapes. This allows implementing.volume()and.area()for all extrusionsExtrusion<T: Primitive2d + Measured2d>withinbevy_mathMeasured2dandMeasured3d0.should be equivalent in everything but name to the base shapeCaviats
Extrusion<T>could also bePrism<T>and theMeasuredNdcould also be something likeMeasuredPrimitiveNd. If you have any other suggestions, please fell free to share them :)Future work
This PR adds a basic
Extrusionshape and does not implement a lot of things you might want it to. Some of the future possibilities include: