-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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 AnnularSector primitive shape #17928
base: main
Are you sure you want to change the base?
Conversation
My gut reaction is that this should probably not be its own primitive shape, but rather the (Personally, I kinda feel like the circular segment, circular sector, and rhombus types are already a bit too niche. The circular sector is also kind of annoying for collision detection and other geometric queries since it can be concave, like this annular sector.) |
Can you explain what you're hoping to use this for? |
This might just be me, but this reminds me of the ARINC 661 widget "crown". It's essentially used as a wide arc in different parts of the heads-up display that show angles, particularly roll. I'd personally vouch for this being generally useful, and specifically useful in that it can't be constructed with the other primitive shapes. Additionally, this could effectively be the primitive for circles, arcs, and annuluses/annuli, if such consolidation is needed. |
We should avoid this consolidation in general for our primitives: these are often performance critical, and wasted memory will have measurable impacts. |
I'm using an annular sector mesh for markers for things in stable circular orbits. I don't need the primitive shape for that, i just assemble the mesh. I added the primitive shape because I was copying the approach used by I could change this to just be a feature of Seems a bit arbitrary to have a circular sector primitive but not an annular sector, given circle and annulus exist. Concave shapes being a pain for physics is a good reason though, too bad CircularSector already exists. |
Adds an
AnnularSector
primitive 2d shape.(a pie-slice of an annulus, which is the 2d-donut)
Solution
half_angle
defined and oriented the same way asCircularSector
.Testing
2d_shapes
and3d_shapes
examples to inspect it.AnnularSector::closest_point
is correct, is there an example that visualizes this?Showcase
2d_shapes example

3d_shapes example

gratuitous screenshot
