Skip to content
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

Merged
merged 3 commits into from
May 16, 2024

Conversation

aristaeus
Copy link
Contributor

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.

@MrGVSV MrGVSV added C-Usability A simple quality-of-life change that makes Bevy easier to use A-Reflection Runtime information about types A-Math Fundamental domain-agnostic mathematical operations S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels May 13, 2024
@@ -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]>,
Copy link
Member

@MrGVSV MrGVSV May 13, 2024

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?

Copy link
Contributor Author

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.

Copy link
Member

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.

crates/bevy_reflect/src/impls/math/cubic_splines.rs Outdated Show resolved Hide resolved
@alice-i-cecile alice-i-cecile added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels May 16, 2024
@alice-i-cecile alice-i-cecile added this pull request to the merge queue May 16, 2024
Merged via the queue into bevyengine:main with commit be03ba1 May 16, 2024
28 checks passed
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 A-Reflection Runtime information about types C-Usability A simple quality-of-life change that makes Bevy easier to use S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cleanup: Reflect on bevy_math's curve structs
3 participants