|
| 1 | +## v0.31.0 (09 Jan. 2026) |
| 2 | + |
| 3 | +### Modified |
| 4 | + |
| 5 | +- **Breaking:** Migrate math types from nalgebra to glam (via parry). The main type aliases are now: |
| 6 | + - `Isometry<Real>` → `Pose` (glamx `Pose2/3`) |
| 7 | + - `Point<Real>` → `Vector` for world-space positions (parry no longer distinguishes Point from Vector) |
| 8 | + - `Rotation<Real>` → `Rotation` (glamx `Rot2` or `Quat`) |
| 9 | + - `Translation<Real>` → removed, use `Pose::from_translation()` |
| 10 | + - nalgebra is still used internally for SIMD code and multibody Jacobians (via `SimdVector<N>`, `SimdPose<N>`, `DVector`, `DMatrix`). |
| 11 | +- **Breaking:** Several getters now return by value instead of by reference: |
| 12 | + - `RigidBody::linvel()` returns `Vector` instead of `&Vector<Real>` |
| 13 | + - `RigidBody::angvel()` returns `AngVector` instead of `&Vector<Real>` (3D) or `Real` (2D) |
| 14 | + - `RigidBody::center_of_mass()` returns `Vector` instead of `&Point<Real>` |
| 15 | + - `RigidBody::local_center_of_mass()` returns `Vector` instead of `&Point<Real>` |
| 16 | + - `Collider::translation()` returns `Vector` instead of `&Vector<Real>` |
| 17 | + - `Collider::rotation()` returns `Rotation` instead of `&Rotation<Real>` |
| 18 | +- **Breaking:** `DebugRenderBackend::draw_line` signature changed: takes `Vector` instead of `Point<Real>` for line endpoints. |
| 19 | +- **Breaking:** `DebugRenderBackend::draw_polyline` and `draw_line_strip` now take `&Pose` and `Vector` instead of `&Isometry<Real>` and `&Vector<Real>`. |
| 20 | +- Testbed migrated from Bevy to kiss3d for lighter dependencies and simpler maintenance. |
| 21 | +- Removed `benchmarks2d` and `benchmarks3d` crates (merged with `examples2d` and `examples3d`). |
| 22 | + |
| 23 | +### Migration guide |
| 24 | + |
| 25 | +If your codebase currently relies on `nalgebra`, note that `nalgebra` and `glamx` provide type conversion. Enable the |
| 26 | +corresponding features: |
| 27 | +- `nalgebra = { version = "0.34", features = [ "convert-glam030" ] }` |
| 28 | +- `glamx = { version = "0.1", features = ["nalgebra"] }` |
| 29 | +then you can convert between `glam` and `nalgebra` types using `.into()`. |
| 30 | + |
| 31 | +1. **Type changes:** Replace `Isometry<Real>` with `Pose`, and `Point<Real>` with `Vector` for positions. |
| 32 | +2. **Pose construction:** |
| 33 | + - `Isometry::identity()` → `Pose::IDENTITY` |
| 34 | + - `Isometry::translation(x, y, z)` → `Pose::from_translation(Vector::new(x, y, z))` |
| 35 | + - `Isometry::rotation(axis_angle)` → `Pose::from_rotation(Rotation::from_scaled_axis(axis_angle))` |
| 36 | + - `isometry.translation.vector` → `pose.translation` |
| 37 | + - `isometry.rotation.scaled_axis()` → `pose.rotation.to_scaled_axis()` |
| 38 | +3. **Getter usage:** Remove `&` or `.clone()` when using `linvel()`, `angvel()`, `center_of_mass()`, `translation()`, `rotation()` since they now return by value. |
| 39 | +4. **Debug renderer:** Update `DebugRenderBackend` implementations to use `Vector` instead of `Point<Real>`. |
| 40 | +5. **glam access:** The `glamx` crate is re-exported as `rapier::glamx` for direct glam type access if needed. |
| 41 | + |
1 | 42 | ## v0.31.0 (21 Nov. 2025) |
2 | 43 |
|
3 | 44 | - `InteractionGroups` struct now contains `InteractionTestMode`. |
|
0 commit comments