bevy/crates
Matty 6c9ec88e54
Basic isometry types (#14269)
# Objective

Introduce isometry types for describing relative and absolute position
in mathematical contexts.

## Solution

For the time being, this is a very minimal implementation. This
implements the following faculties for two- and three-dimensional
isometry types:
- Identity transformations
- Creation from translations and/or rotations
- Inverses
- Multiplication (composition) of isometries with each other
- Application of isometries to points (as vectors)
- Conversion of isometries to affine transformations

There is obviously a lot more that could be added, so I erred on the
side of adding things that I knew would be useful, with the idea of
expanding this in the near future as needed.

(I also fixed some random doc problems in `bevy_math`.)

---

## Design

One point of interest here is the matter of if/when to use aligned
types. In the implementation of 3d isometries, I used `Vec3A` rather
than `Vec3` because it has no impact on size/alignment, but I'm still
not sure about that decision (although it is easily changed).

For 2d isometries — which are encoded by four floats — the idea of
shoving them into a single 128-bit buffer (`__m128` or whatever) sounds
kind of enticing, but it's more involved and would involve writing
unsafe code, so I didn't do that for now.

## Future work

- Expand the API to include shortcuts like `inverse_mul` and
`inverse_transform` for efficiency reasons.
- Include more convenience constructors and methods (e.g. `from_xy`,
`from_xyz`).
- Refactor `bevy_math::bounding` to use the isometry types.
- Add conversions to/from isometries for `Transform`/`GlobalTransform`
in `bevy_transform`.
2024-07-14 15:27:42 +00:00
..
bevy_a11y Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_animation Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_app Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
bevy_asset Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
bevy_audio Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_color Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
bevy_core Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_core_pipeline Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
bevy_derive Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_dev_tools Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_diagnostic Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_dylib Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_dynamic_plugin Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_ecs Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
bevy_encase_derive Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_gilrs Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_gizmos Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
bevy_gltf Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_hierarchy Fixed #14248 and other URL issues (#14276) 2024-07-11 12:01:49 +00:00
bevy_input Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_internal Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
bevy_log Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
bevy_macro_utils Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_math Basic isometry types (#14269) 2024-07-14 15:27:42 +00:00
bevy_mikktspace Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_pbr Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
bevy_picking Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
bevy_ptr Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_reflect Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
bevy_render Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
bevy_scene Created an EventMutator for when you want to mutate an event before reading (#13818) 2024-07-08 14:53:06 +00:00
bevy_sprite Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_state Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
bevy_tasks Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_text Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
bevy_time Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_transform Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
bevy_ui Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_utils Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_window Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
bevy_winit Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00