bevy/crates/bevy_math
Matty 8bcda3d2e8
Basic integration of cubic spline curves with the Curve API (#15469)
# Objective

We introduced the fancy Curve API earlier in this version. The goal of
this PR is to provide a level of integration between that API and the
existing spline constructions in `bevy_math`.

Note that this PR only covers the integration of position-sampling via
the `Curve` API. Other (substantially more complex) planned work will
introduce general facilities for handling derivatives.

## Solution

`CubicSegment`, `CubicCurve`, `RationalSegment`, and `RationalCurve` all
now implement `Curve`, using their `position` function to sample the
output.

Additionally, some documentation has been updated/corrected, and
`Serialize`/`Deserialize` derives have been added for all the curve
structs. (Note that there are some barriers to automatic registration of
`ReflectSerialize`/`ReflectSerialize` involving generics that have not
been resolved in this PR.)

---

## Migration Guide

The `RationalCurve::domain` method has been renamed to
`RationalCurve::length`. Calling `.domain()` on a `RationalCurve` now
returns its entire domain as an `Interval`.
2024-09-30 17:52:07 +00:00
..
src Basic integration of cubic spline curves with the Curve API (#15469) 2024-09-30 17:52:07 +00:00
Cargo.toml Update `glam to 0.29, encase` to 0.10. (#15249) 2024-09-23 19:44:02 +00:00
clippy.toml Make bevy_math's libm feature use libm for all f32methods with unspecified precision (#14693) 2024-08-12 16:13:36 +00:00
README.md Add README.md to all crates (#13184) 2024-05-02 18:56:00 +00:00

Bevy Math

License Crates.io Downloads Docs Discord