bevy/crates/bevy_math/src
Joona Aalto 9f376df2d5
Add inverse_mul and inverse_transform_point for isometries (#14311)
# Objective

The isometry types added in #14269 support transforming other isometries
and points, as well as computing the inverse of an isometry using
`inverse`.

However, transformations like `iso1.inverse() * iso2` and `iso.inverse()
* point` can be optimized for single-shot cases using custom methods
that avoid an extra rotation operation.

## Solution

Add `inverse_mul` and `inverse_transform_point` for `Isometry2d` and
`Isometry3d`. Note that these methods are only faster when the isometry
can't be reused for multiple transformations.

## Testing

All of the methods have a test, similarly to the existing transformation
operations.
2024-07-14 19:53:40 +00:00
..
bounding Basic isometry types (#14269) 2024-07-14 15:27:42 +00:00
primitives Updated descriptions for some geometric primitives to include more detail (#13937) 2024-06-20 12:16:27 +00:00
rects Move bevy_math Reflect impls (#13520) 2024-05-27 14:15:22 +00:00
sampling Uniform mesh sampling (#14071) 2024-07-08 00:57:08 +00:00
affine3.rs Implemented Reflect for (almost) all bevy_math types (#13537) 2024-05-27 18:18:10 +00:00
aspect_ratio.rs Implemented Reflect for (almost) all bevy_math types (#13537) 2024-05-27 18:18:10 +00:00
common_traits.rs Make bevy_math::common_traits public (#14245) 2024-07-09 17:16:47 +00:00
compass.rs Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
cubic_splines.rs Fix a few "repeated word" typos (#13955) 2024-06-20 21:35:20 +00:00
direction.rs Fix swapped docs for Rot2::rotation_to/from_y (#14307) 2024-07-14 17:00:41 +00:00
float_ord.rs Implemented Reflect for (almost) all bevy_math types (#13537) 2024-05-27 18:18:10 +00:00
isometry.rs Add inverse_mul and inverse_transform_point for isometries (#14311) 2024-07-14 19:53:40 +00:00
lib.rs Basic isometry types (#14269) 2024-07-14 15:27:42 +00:00
ray.rs Implemented Reflect for (almost) all bevy_math types (#13537) 2024-05-27 18:18:10 +00:00
rotation2d.rs Rename Rotation2d to Rot2 (#13694) 2024-06-05 21:51:13 +00:00