-
-
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
A Curve trait for general interoperation — Part I #14630
A Curve trait for general interoperation — Part I #14630
Conversation
5cd06ca
to
2594516
Compare
2594516
to
48a5ecc
Compare
|
||
/// Get the start of this interval. | ||
#[inline] | ||
pub fn start(self) -> f32 { |
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 think I prefer left/right naming for these fields, which would make these consistent with the other methods.
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.
It should at least consistently use the terminology of start
/end
everywhere now. Hopefully that's a little better at least. (This is kind of a choice between metaphors, since start and end evoke time, while left and right are more like geometry on the real line)
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.
it's been a long time since i last read the RFC, so take this as a layman's review. i think this is generally really solid!
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
I think with the most recent round of changes, I've addressed the existing comments to my satisfaction. Of course, more are always welcome. :) |
# Objective Finish what we started in #14630. The Curve RFC is [here](https://github.com/bevyengine/rfcs/blob/main/rfcs/80-curve-trait.md). ## Solution This contains the rest of the library from my branch. The main things added here are: - Bulk sampling / resampling methods on `Curve` itself - Data structures supporting the above - The `cores` submodule that those data structures use to encapsulate sample interpolation The weirdest thing in here is probably `ChunkedUnevenCore` in `cores`, which is not used by anything in the Curve library itself but which is required for efficient storage of glTF animation curves. (See #13105.) We can move it into a different PR if we want to; I don't have strong feelings either way. ## Testing New tests related to resampling are included. As I write this, I realize we could use some tests in `cores` itself, so I will add some on this branch before too long. --------- Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com> Co-authored-by: Robert Walter <26892280+RobWalt@users.noreply.github.com>
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#1669 if you'd like to help out. |
Objective
This PR implements part of the Curve RFC. See that document for motivation, objectives, etc.
Solution
For purposes of reviewability, this PR excludes the entire part of the RFC related to taking multiple samples, resampling, and interpolation generally. (This means the entire
cores
submodule is also excluded.) On the other hand, the entireInterval
type and all of the functionalCurve
adaptors are included.Testing
Test modules are included and can be run locally (but they are also included in CI).