nalgebra/geometry/
isometry_alias.rs

1use crate::geometry::{Isometry, Rotation2, Rotation3, UnitComplex, UnitQuaternion};
2
3/// A 2-dimensional direct isometry using a unit complex number for its rotational part.
4///
5/// **Because this is an alias, not all its methods are listed here. See the [`Isometry`](crate::Isometry) type too.**
6///
7/// Also known as a 2D rigid-body motion, or as an element of SE(2).
8pub type Isometry2<T> = Isometry<T, UnitComplex<T>, 2>;
9
10/// A 3-dimensional direct isometry using a unit quaternion for its rotational part.
11///
12/// **Because this is an alias, not all its methods are listed here. See the [`Isometry`](crate::Isometry) type too.**
13///
14/// Also known as a rigid-body motion, or as an element of SE(3).
15pub type Isometry3<T> = Isometry<T, UnitQuaternion<T>, 3>;
16
17/// A 2-dimensional direct isometry using a rotation matrix for its rotational part.
18///
19/// **Because this is an alias, not all its methods are listed here. See the [`Isometry`](crate::Isometry) type too.**
20///
21/// Also known as a rigid-body motion, or as an element of SE(2).
22pub type IsometryMatrix2<T> = Isometry<T, Rotation2<T>, 2>;
23
24/// A 3-dimensional direct isometry using a rotation matrix for its rotational part.
25///
26/// **Because this is an alias, not all its methods are listed here. See the [`Isometry`](crate::Isometry) type too.**
27///
28/// Also known as a rigid-body motion, or as an element of SE(3).
29pub type IsometryMatrix3<T> = Isometry<T, Rotation3<T>, 3>;
30
31// This tests that the types correctly implement `Copy`, without having to run tests
32// (when targeting no-std for example).
33#[allow(dead_code)]
34fn ensure_copy() {
35    fn is_copy<T: Copy>() {}
36
37    is_copy::<IsometryMatrix2<f32>>();
38    is_copy::<IsometryMatrix3<f32>>();
39    is_copy::<Isometry2<f32>>();
40    is_copy::<Isometry3<f32>>();
41}