-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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 reflect impls for bevy_math curve structs #13348
Conversation
@@ -42,7 +42,8 @@ use thiserror::Error; | |||
/// ``` | |||
#[derive(Clone, Debug)] | |||
pub struct CubicBezier<P: VectorSpace> { | |||
control_points: Vec<[P; 4]>, | |||
/// The control points of the Bezier curve | |||
pub control_points: Vec<[P; 4]>, |
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.
I can't speak for bevy_math
folks, so I'll just ask: is there any reason we would want these to stay private?
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.
I can't see one. There's no invariants to uphold, and these math types don't have much room for implementation details to change. But happy to hear other thoughts.
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.
These are fine to be pub.
Objective
Fixes #13189
Solution
To add the reflect impls I needed to make all the struct fields pub. I don't think there's any harm for these types, but just a note for review.