Type Alias oxygengine_physics_2d::prelude::nalgebra::Rotation3
source · pub type Rotation3<T> = Rotation<T, 3>;
Expand description
A 3-dimensional rotation matrix.
Because this is an alias, not all its methods are listed here. See the Rotation
type too.
Aliased Type§
struct Rotation3<T> { /* private fields */ }
Implementations§
source§impl<T, const D: usize> Rotation<T, D>
impl<T, const D: usize> Rotation<T, D>
sourcepub const fn from_matrix_unchecked(
matrix: Matrix<T, Const<D>, Const<D>, ArrayStorage<T, D, D>>
) -> Rotation<T, D>
pub const fn from_matrix_unchecked( matrix: Matrix<T, Const<D>, Const<D>, ArrayStorage<T, D, D>> ) -> Rotation<T, D>
Creates a new rotation from the given square matrix.
The matrix orthonormality is not checked.
Example
let mat = Matrix3::new(0.8660254, -0.5, 0.0,
0.5, 0.8660254, 0.0,
0.0, 0.0, 1.0);
let rot = Rotation3::from_matrix_unchecked(mat);
assert_eq!(*rot.matrix(), mat);
let mat = Matrix2::new(0.8660254, -0.5,
0.5, 0.8660254);
let rot = Rotation2::from_matrix_unchecked(mat);
assert_eq!(*rot.matrix(), mat);
source§impl<T, const D: usize> Rotation<T, D>where
T: Scalar,
impl<T, const D: usize> Rotation<T, D>where T: Scalar,
sourcepub fn matrix(&self) -> &Matrix<T, Const<D>, Const<D>, ArrayStorage<T, D, D>>
pub fn matrix(&self) -> &Matrix<T, Const<D>, Const<D>, ArrayStorage<T, D, D>>
A reference to the underlying matrix representation of this rotation.
Example
let rot = Rotation3::from_axis_angle(&Vector3::z_axis(), f32::consts::FRAC_PI_6);
let expected = Matrix3::new(0.8660254, -0.5, 0.0,
0.5, 0.8660254, 0.0,
0.0, 0.0, 1.0);
assert_eq!(*rot.matrix(), expected);
let rot = Rotation2::new(f32::consts::FRAC_PI_6);
let expected = Matrix2::new(0.8660254, -0.5,
0.5, 0.8660254);
assert_eq!(*rot.matrix(), expected);
sourcepub unsafe fn matrix_mut(
&mut self
) -> &mut Matrix<T, Const<D>, Const<D>, ArrayStorage<T, D, D>>
👎Deprecated: Use .matrix_mut_unchecked()
instead.
pub unsafe fn matrix_mut( &mut self ) -> &mut Matrix<T, Const<D>, Const<D>, ArrayStorage<T, D, D>>
.matrix_mut_unchecked()
instead.A mutable reference to the underlying matrix representation of this rotation.
sourcepub fn matrix_mut_unchecked(
&mut self
) -> &mut Matrix<T, Const<D>, Const<D>, ArrayStorage<T, D, D>>
pub fn matrix_mut_unchecked( &mut self ) -> &mut Matrix<T, Const<D>, Const<D>, ArrayStorage<T, D, D>>
A mutable reference to the underlying matrix representation of this rotation.
This is suffixed by “_unchecked” because this allows the user to replace the matrix by another one that is non-inversible or non-orthonormal. If one of those properties is broken, subsequent method calls may return bogus results.
sourcepub fn into_inner(self) -> Matrix<T, Const<D>, Const<D>, ArrayStorage<T, D, D>>
pub fn into_inner(self) -> Matrix<T, Const<D>, Const<D>, ArrayStorage<T, D, D>>
Unwraps the underlying matrix.
Example
let rot = Rotation3::from_axis_angle(&Vector3::z_axis(), f32::consts::FRAC_PI_6);
let mat = rot.into_inner();
let expected = Matrix3::new(0.8660254, -0.5, 0.0,
0.5, 0.8660254, 0.0,
0.0, 0.0, 1.0);
assert_eq!(mat, expected);
let rot = Rotation2::new(f32::consts::FRAC_PI_6);
let mat = rot.into_inner();
let expected = Matrix2::new(0.8660254, -0.5,
0.5, 0.8660254);
assert_eq!(mat, expected);
sourcepub fn unwrap(self) -> Matrix<T, Const<D>, Const<D>, ArrayStorage<T, D, D>>
👎Deprecated: use .into_inner()
instead
pub fn unwrap(self) -> Matrix<T, Const<D>, Const<D>, ArrayStorage<T, D, D>>
.into_inner()
insteadUnwraps the underlying matrix.
Deprecated: Use Rotation::into_inner
instead.
sourcepub fn to_homogeneous(
&self
) -> Matrix<T, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>where
T: Zero + One,
Const<D>: DimNameAdd<Const<1>>,
DefaultAllocator: Allocator<T, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>,
pub fn to_homogeneous( &self ) -> Matrix<T, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>where T: Zero + One, Const<D>: DimNameAdd<Const<1>>, DefaultAllocator: Allocator<T, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>,
Converts this rotation into its equivalent homogeneous transformation matrix.
This is the same as self.into()
.
Example
let rot = Rotation3::from_axis_angle(&Vector3::z_axis(), f32::consts::FRAC_PI_6);
let expected = Matrix4::new(0.8660254, -0.5, 0.0, 0.0,
0.5, 0.8660254, 0.0, 0.0,
0.0, 0.0, 1.0, 0.0,
0.0, 0.0, 0.0, 1.0);
assert_eq!(rot.to_homogeneous(), expected);
let rot = Rotation2::new(f32::consts::FRAC_PI_6);
let expected = Matrix3::new(0.8660254, -0.5, 0.0,
0.5, 0.8660254, 0.0,
0.0, 0.0, 1.0);
assert_eq!(rot.to_homogeneous(), expected);
source§impl<T, const D: usize> Rotation<T, D>where
T: Scalar,
impl<T, const D: usize> Rotation<T, D>where T: Scalar,
sourcepub fn transpose(&self) -> Rotation<T, D>
pub fn transpose(&self) -> Rotation<T, D>
Transposes self
.
Same as .inverse()
because the inverse of a rotation matrix is its transform.
Example
let rot = Rotation3::new(Vector3::new(1.0, 2.0, 3.0));
let tr_rot = rot.transpose();
assert_relative_eq!(rot * tr_rot, Rotation3::identity(), epsilon = 1.0e-6);
assert_relative_eq!(tr_rot * rot, Rotation3::identity(), epsilon = 1.0e-6);
let rot = Rotation2::new(1.2);
let tr_rot = rot.transpose();
assert_relative_eq!(rot * tr_rot, Rotation2::identity(), epsilon = 1.0e-6);
assert_relative_eq!(tr_rot * rot, Rotation2::identity(), epsilon = 1.0e-6);
sourcepub fn inverse(&self) -> Rotation<T, D>
pub fn inverse(&self) -> Rotation<T, D>
Inverts self
.
Same as .transpose()
because the inverse of a rotation matrix is its transform.
Example
let rot = Rotation3::new(Vector3::new(1.0, 2.0, 3.0));
let inv = rot.inverse();
assert_relative_eq!(rot * inv, Rotation3::identity(), epsilon = 1.0e-6);
assert_relative_eq!(inv * rot, Rotation3::identity(), epsilon = 1.0e-6);
let rot = Rotation2::new(1.2);
let inv = rot.inverse();
assert_relative_eq!(rot * inv, Rotation2::identity(), epsilon = 1.0e-6);
assert_relative_eq!(inv * rot, Rotation2::identity(), epsilon = 1.0e-6);
sourcepub fn transpose_mut(&mut self)
pub fn transpose_mut(&mut self)
Transposes self
in-place.
Same as .inverse_mut()
because the inverse of a rotation matrix is its transform.
Example
let rot = Rotation3::new(Vector3::new(1.0, 2.0, 3.0));
let mut tr_rot = Rotation3::new(Vector3::new(1.0, 2.0, 3.0));
tr_rot.transpose_mut();
assert_relative_eq!(rot * tr_rot, Rotation3::identity(), epsilon = 1.0e-6);
assert_relative_eq!(tr_rot * rot, Rotation3::identity(), epsilon = 1.0e-6);
let rot = Rotation2::new(1.2);
let mut tr_rot = Rotation2::new(1.2);
tr_rot.transpose_mut();
assert_relative_eq!(rot * tr_rot, Rotation2::identity(), epsilon = 1.0e-6);
assert_relative_eq!(tr_rot * rot, Rotation2::identity(), epsilon = 1.0e-6);
sourcepub fn inverse_mut(&mut self)
pub fn inverse_mut(&mut self)
Inverts self
in-place.
Same as .transpose_mut()
because the inverse of a rotation matrix is its transform.
Example
let rot = Rotation3::new(Vector3::new(1.0, 2.0, 3.0));
let mut inv = Rotation3::new(Vector3::new(1.0, 2.0, 3.0));
inv.inverse_mut();
assert_relative_eq!(rot * inv, Rotation3::identity(), epsilon = 1.0e-6);
assert_relative_eq!(inv * rot, Rotation3::identity(), epsilon = 1.0e-6);
let rot = Rotation2::new(1.2);
let mut inv = Rotation2::new(1.2);
inv.inverse_mut();
assert_relative_eq!(rot * inv, Rotation2::identity(), epsilon = 1.0e-6);
assert_relative_eq!(inv * rot, Rotation2::identity(), epsilon = 1.0e-6);
source§impl<T, const D: usize> Rotation<T, D>where
T: SimdRealField,
<T as SimdValue>::Element: SimdRealField,
impl<T, const D: usize> Rotation<T, D>where T: SimdRealField, <T as SimdValue>::Element: SimdRealField,
sourcepub fn transform_point(&self, pt: &OPoint<T, Const<D>>) -> OPoint<T, Const<D>>
pub fn transform_point(&self, pt: &OPoint<T, Const<D>>) -> OPoint<T, Const<D>>
Rotate the given point.
This is the same as the multiplication self * pt
.
Example
let rot = Rotation3::new(Vector3::y() * f32::consts::FRAC_PI_2);
let transformed_point = rot.transform_point(&Point3::new(1.0, 2.0, 3.0));
assert_relative_eq!(transformed_point, Point3::new(3.0, 2.0, -1.0), epsilon = 1.0e-6);
sourcepub fn transform_vector(
&self,
v: &Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>
) -> Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>
pub fn transform_vector( &self, v: &Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>> ) -> Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>
Rotate the given vector.
This is the same as the multiplication self * v
.
Example
let rot = Rotation3::new(Vector3::y() * f32::consts::FRAC_PI_2);
let transformed_vector = rot.transform_vector(&Vector3::new(1.0, 2.0, 3.0));
assert_relative_eq!(transformed_vector, Vector3::new(3.0, 2.0, -1.0), epsilon = 1.0e-6);
sourcepub fn inverse_transform_point(
&self,
pt: &OPoint<T, Const<D>>
) -> OPoint<T, Const<D>>
pub fn inverse_transform_point( &self, pt: &OPoint<T, Const<D>> ) -> OPoint<T, Const<D>>
Rotate the given point by the inverse of this rotation. This may be cheaper than inverting the rotation and then transforming the given point.
Example
let rot = Rotation3::new(Vector3::y() * f32::consts::FRAC_PI_2);
let transformed_point = rot.inverse_transform_point(&Point3::new(1.0, 2.0, 3.0));
assert_relative_eq!(transformed_point, Point3::new(-3.0, 2.0, 1.0), epsilon = 1.0e-6);
sourcepub fn inverse_transform_vector(
&self,
v: &Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>
) -> Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>
pub fn inverse_transform_vector( &self, v: &Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>> ) -> Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>
Rotate the given vector by the inverse of this rotation. This may be cheaper than inverting the rotation and then transforming the given vector.
Example
let rot = Rotation3::new(Vector3::y() * f32::consts::FRAC_PI_2);
let transformed_vector = rot.inverse_transform_vector(&Vector3::new(1.0, 2.0, 3.0));
assert_relative_eq!(transformed_vector, Vector3::new(-3.0, 2.0, 1.0), epsilon = 1.0e-6);
sourcepub fn inverse_transform_unit_vector(
&self,
v: &Unit<Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>>
) -> Unit<Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>>
pub fn inverse_transform_unit_vector( &self, v: &Unit<Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>> ) -> Unit<Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>>
Rotate the given vector by the inverse of this rotation. This may be cheaper than inverting the rotation and then transforming the given vector.
Example
let rot = Rotation3::new(Vector3::z() * f32::consts::FRAC_PI_2);
let transformed_vector = rot.inverse_transform_unit_vector(&Vector3::x_axis());
assert_relative_eq!(transformed_vector, -Vector3::y_axis(), epsilon = 1.0e-6);
source§impl<T> Rotation<T, 3>where
T: SimdRealField,
impl<T> Rotation<T, 3>where T: SimdRealField,
sourcepub fn slerp(&self, other: &Rotation<T, 3>, t: T) -> Rotation<T, 3>where
T: RealField,
pub fn slerp(&self, other: &Rotation<T, 3>, t: T) -> Rotation<T, 3>where T: RealField,
Spherical linear interpolation between two rotation matrices.
Panics if the angle between both rotations is 180 degrees (in which case the interpolation
is not well-defined). Use .try_slerp
instead to avoid the panic.
Examples:
let q1 = Rotation3::from_euler_angles(std::f32::consts::FRAC_PI_4, 0.0, 0.0);
let q2 = Rotation3::from_euler_angles(-std::f32::consts::PI, 0.0, 0.0);
let q = q1.slerp(&q2, 1.0 / 3.0);
assert_eq!(q.euler_angles(), (std::f32::consts::FRAC_PI_2, 0.0, 0.0));
sourcepub fn try_slerp(
&self,
other: &Rotation<T, 3>,
t: T,
epsilon: T
) -> Option<Rotation<T, 3>>where
T: RealField,
pub fn try_slerp( &self, other: &Rotation<T, 3>, t: T, epsilon: T ) -> Option<Rotation<T, 3>>where T: RealField,
Computes the spherical linear interpolation between two rotation matrices or returns None
if both rotations are approximately 180 degrees apart (in which case the interpolation is
not well-defined).
Arguments
self
: the first rotation to interpolate from.other
: the second rotation to interpolate toward.t
: the interpolation parameter. Should be between 0 and 1.epsilon
: the value below which the sinus of the angle separating both rotations must be to returnNone
.
source§impl<T> Rotation<T, 3>where
T: SimdRealField,
<T as SimdValue>::Element: SimdRealField,
impl<T> Rotation<T, 3>where T: SimdRealField, <T as SimdValue>::Element: SimdRealField,
sourcepub fn new<SB>(
axisangle: Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, SB>
) -> Rotation<T, 3>where
SB: Storage<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>>,
pub fn new<SB>( axisangle: Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, SB> ) -> Rotation<T, 3>where SB: Storage<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>>,
Builds a 3 dimensional rotation matrix from an axis and an angle.
Arguments
axisangle
- A vector representing the rotation. Its magnitude is the amount of rotation in radian. Its direction is the axis of rotation.
Example
let axisangle = Vector3::y() * f32::consts::FRAC_PI_2;
// Point and vector being transformed in the tests.
let pt = Point3::new(4.0, 5.0, 6.0);
let vec = Vector3::new(4.0, 5.0, 6.0);
let rot = Rotation3::new(axisangle);
assert_relative_eq!(rot * pt, Point3::new(6.0, 5.0, -4.0), epsilon = 1.0e-6);
assert_relative_eq!(rot * vec, Vector3::new(6.0, 5.0, -4.0), epsilon = 1.0e-6);
// A zero vector yields an identity.
assert_eq!(Rotation3::new(Vector3::<f32>::zeros()), Rotation3::identity());
sourcepub fn from_scaled_axis<SB>(
axisangle: Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, SB>
) -> Rotation<T, 3>where
SB: Storage<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>>,
pub fn from_scaled_axis<SB>( axisangle: Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, SB> ) -> Rotation<T, 3>where SB: Storage<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>>,
Builds a 3D rotation matrix from an axis scaled by the rotation angle.
This is the same as Self::new(axisangle)
.
Example
let axisangle = Vector3::y() * f32::consts::FRAC_PI_2;
// Point and vector being transformed in the tests.
let pt = Point3::new(4.0, 5.0, 6.0);
let vec = Vector3::new(4.0, 5.0, 6.0);
let rot = Rotation3::new(axisangle);
assert_relative_eq!(rot * pt, Point3::new(6.0, 5.0, -4.0), epsilon = 1.0e-6);
assert_relative_eq!(rot * vec, Vector3::new(6.0, 5.0, -4.0), epsilon = 1.0e-6);
// A zero vector yields an identity.
assert_eq!(Rotation3::from_scaled_axis(Vector3::<f32>::zeros()), Rotation3::identity());
sourcepub fn from_axis_angle<SB>(
axis: &Unit<Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, SB>>,
angle: T
) -> Rotation<T, 3>where
SB: Storage<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>>,
pub fn from_axis_angle<SB>( axis: &Unit<Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, SB>>, angle: T ) -> Rotation<T, 3>where SB: Storage<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>>,
Builds a 3D rotation matrix from an axis and a rotation angle.
Example
let axis = Vector3::y_axis();
let angle = f32::consts::FRAC_PI_2;
// Point and vector being transformed in the tests.
let pt = Point3::new(4.0, 5.0, 6.0);
let vec = Vector3::new(4.0, 5.0, 6.0);
let rot = Rotation3::from_axis_angle(&axis, angle);
assert_eq!(rot.axis().unwrap(), axis);
assert_eq!(rot.angle(), angle);
assert_relative_eq!(rot * pt, Point3::new(6.0, 5.0, -4.0), epsilon = 1.0e-6);
assert_relative_eq!(rot * vec, Vector3::new(6.0, 5.0, -4.0), epsilon = 1.0e-6);
// A zero vector yields an identity.
assert_eq!(Rotation3::from_scaled_axis(Vector3::<f32>::zeros()), Rotation3::identity());
sourcepub fn from_euler_angles(roll: T, pitch: T, yaw: T) -> Rotation<T, 3>
pub fn from_euler_angles(roll: T, pitch: T, yaw: T) -> Rotation<T, 3>
Creates a new rotation from Euler angles.
The primitive rotations are applied in order: 1 roll − 2 pitch − 3 yaw.
Example
let rot = Rotation3::from_euler_angles(0.1, 0.2, 0.3);
let euler = rot.euler_angles();
assert_relative_eq!(euler.0, 0.1, epsilon = 1.0e-6);
assert_relative_eq!(euler.1, 0.2, epsilon = 1.0e-6);
assert_relative_eq!(euler.2, 0.3, epsilon = 1.0e-6);
source§impl<T> Rotation<T, 3>where
T: SimdRealField,
<T as SimdValue>::Element: SimdRealField,
impl<T> Rotation<T, 3>where T: SimdRealField, <T as SimdValue>::Element: SimdRealField,
sourcepub fn face_towards<SB, SC>(
dir: &Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, SB>,
up: &Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, SC>
) -> Rotation<T, 3>where
SB: Storage<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>>,
SC: Storage<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>>,
pub fn face_towards<SB, SC>( dir: &Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, SB>, up: &Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, SC> ) -> Rotation<T, 3>where SB: Storage<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>>, SC: Storage<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>>,
Creates a rotation that corresponds to the local frame of an observer standing at the
origin and looking toward dir
.
It maps the z
axis to the direction dir
.
Arguments
- dir - The look direction, that is, direction the matrix
z
axis will be aligned with. - up - The vertical direction. The only requirement of this parameter is to not be
collinear to
dir
. Non-collinearity is not checked.
Example
let dir = Vector3::new(1.0, 2.0, 3.0);
let up = Vector3::y();
let rot = Rotation3::face_towards(&dir, &up);
assert_relative_eq!(rot * Vector3::z(), dir.normalize());
sourcepub fn new_observer_frames<SB, SC>(
dir: &Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, SB>,
up: &Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, SC>
) -> Rotation<T, 3>where
SB: Storage<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>>,
SC: Storage<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>>,
👎Deprecated: renamed to face_towards
pub fn new_observer_frames<SB, SC>( dir: &Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, SB>, up: &Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, SC> ) -> Rotation<T, 3>where SB: Storage<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>>, SC: Storage<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>>,
face_towards
Deprecated: Use Rotation3::face_towards
instead.
sourcepub fn look_at_rh<SB, SC>(
dir: &Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, SB>,
up: &Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, SC>
) -> Rotation<T, 3>where
SB: Storage<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>>,
SC: Storage<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>>,
pub fn look_at_rh<SB, SC>( dir: &Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, SB>, up: &Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, SC> ) -> Rotation<T, 3>where SB: Storage<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>>, SC: Storage<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>>,
Builds a right-handed look-at view matrix without translation.
It maps the view direction dir
to the negative z
axis.
This conforms to the common notion of right handed look-at matrix from the computer
graphics community.
Arguments
- dir - The direction toward which the camera looks.
- up - A vector approximately aligned with required the vertical axis. The only
requirement of this parameter is to not be collinear to
dir
.
Example
let dir = Vector3::new(1.0, 2.0, 3.0);
let up = Vector3::y();
let rot = Rotation3::look_at_rh(&dir, &up);
assert_relative_eq!(rot * dir.normalize(), -Vector3::z());
sourcepub fn look_at_lh<SB, SC>(
dir: &Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, SB>,
up: &Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, SC>
) -> Rotation<T, 3>where
SB: Storage<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>>,
SC: Storage<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>>,
pub fn look_at_lh<SB, SC>( dir: &Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, SB>, up: &Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, SC> ) -> Rotation<T, 3>where SB: Storage<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>>, SC: Storage<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>>,
Builds a left-handed look-at view matrix without translation.
It maps the view direction dir
to the positive z
axis.
This conforms to the common notion of left handed look-at matrix from the computer
graphics community.
Arguments
- dir - The direction toward which the camera looks.
- up - A vector approximately aligned with required the vertical axis. The only
requirement of this parameter is to not be collinear to
dir
.
Example
let dir = Vector3::new(1.0, 2.0, 3.0);
let up = Vector3::y();
let rot = Rotation3::look_at_lh(&dir, &up);
assert_relative_eq!(rot * dir.normalize(), Vector3::z());
source§impl<T> Rotation<T, 3>where
T: SimdRealField,
<T as SimdValue>::Element: SimdRealField,
impl<T> Rotation<T, 3>where T: SimdRealField, <T as SimdValue>::Element: SimdRealField,
sourcepub fn rotation_between<SB, SC>(
a: &Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, SB>,
b: &Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, SC>
) -> Option<Rotation<T, 3>>where
T: RealField,
SB: Storage<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>>,
SC: Storage<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>>,
pub fn rotation_between<SB, SC>( a: &Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, SB>, b: &Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, SC> ) -> Option<Rotation<T, 3>>where T: RealField, SB: Storage<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>>, SC: Storage<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>>,
The rotation matrix required to align a
and b
but with its angle.
This is the rotation R
such that (R * a).angle(b) == 0 && (R * a).dot(b).is_positive()
.
Example
let a = Vector3::new(1.0, 2.0, 3.0);
let b = Vector3::new(3.0, 1.0, 2.0);
let rot = Rotation3::rotation_between(&a, &b).unwrap();
assert_relative_eq!(rot * a, b, epsilon = 1.0e-6);
assert_relative_eq!(rot.inverse() * b, a, epsilon = 1.0e-6);
sourcepub fn scaled_rotation_between<SB, SC>(
a: &Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, SB>,
b: &Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, SC>,
n: T
) -> Option<Rotation<T, 3>>where
T: RealField,
SB: Storage<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>>,
SC: Storage<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>>,
pub fn scaled_rotation_between<SB, SC>( a: &Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, SB>, b: &Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, SC>, n: T ) -> Option<Rotation<T, 3>>where T: RealField, SB: Storage<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>>, SC: Storage<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>>,
The smallest rotation needed to make a
and b
collinear and point toward the same
direction, raised to the power s
.
Example
let a = Vector3::new(1.0, 2.0, 3.0);
let b = Vector3::new(3.0, 1.0, 2.0);
let rot2 = Rotation3::scaled_rotation_between(&a, &b, 0.2).unwrap();
let rot5 = Rotation3::scaled_rotation_between(&a, &b, 0.5).unwrap();
assert_relative_eq!(rot2 * rot2 * rot2 * rot2 * rot2 * a, b, epsilon = 1.0e-6);
assert_relative_eq!(rot5 * rot5 * a, b, epsilon = 1.0e-6);
sourcepub fn rotation_to(&self, other: &Rotation<T, 3>) -> Rotation<T, 3>
pub fn rotation_to(&self, other: &Rotation<T, 3>) -> Rotation<T, 3>
The rotation matrix needed to make self
and other
coincide.
The result is such that: self.rotation_to(other) * self == other
.
Example
let rot1 = Rotation3::from_axis_angle(&Vector3::y_axis(), 1.0);
let rot2 = Rotation3::from_axis_angle(&Vector3::x_axis(), 0.1);
let rot_to = rot1.rotation_to(&rot2);
assert_relative_eq!(rot_to * rot1, rot2, epsilon = 1.0e-6);
sourcepub fn powf(&self, n: T) -> Rotation<T, 3>where
T: RealField,
pub fn powf(&self, n: T) -> Rotation<T, 3>where T: RealField,
Raise the quaternion to a given floating power, i.e., returns the rotation with the same
axis as self
and an angle equal to self.angle()
multiplied by n
.
Example
let axis = Unit::new_normalize(Vector3::new(1.0, 2.0, 3.0));
let angle = 1.2;
let rot = Rotation3::from_axis_angle(&axis, angle);
let pow = rot.powf(2.0);
assert_relative_eq!(pow.axis().unwrap(), axis, epsilon = 1.0e-6);
assert_eq!(pow.angle(), 2.4);
sourcepub fn from_basis_unchecked(
basis: &[Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, ArrayStorage<T, 3, 1>>; 3]
) -> Rotation<T, 3>
pub fn from_basis_unchecked( basis: &[Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, ArrayStorage<T, 3, 1>>; 3] ) -> Rotation<T, 3>
Builds a rotation from a basis assumed to be orthonormal.
In order to get a valid unit-quaternion, the input must be an orthonormal basis, i.e., all vectors are normalized, and the are all orthogonal to each other. These invariants are not checked by this method.
sourcepub fn from_matrix(
m: &Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<nalgebra::::base::dimension::U3::{constant#0}>, ArrayStorage<T, 3, 3>>
) -> Rotation<T, 3>where
T: RealField,
pub fn from_matrix( m: &Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<nalgebra::::base::dimension::U3::{constant#0}>, ArrayStorage<T, 3, 3>> ) -> Rotation<T, 3>where T: RealField,
Builds a rotation matrix by extracting the rotation part of the given transformation m
.
This is an iterative method. See .from_matrix_eps
to provide mover
convergence parameters and starting solution.
This implements “A Robust Method to Extract the Rotational Part of Deformations” by Müller et al.
sourcepub fn from_matrix_eps(
m: &Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<nalgebra::::base::dimension::U3::{constant#0}>, ArrayStorage<T, 3, 3>>,
eps: T,
max_iter: usize,
guess: Rotation<T, 3>
) -> Rotation<T, 3>where
T: RealField,
pub fn from_matrix_eps( m: &Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<nalgebra::::base::dimension::U3::{constant#0}>, ArrayStorage<T, 3, 3>>, eps: T, max_iter: usize, guess: Rotation<T, 3> ) -> Rotation<T, 3>where T: RealField,
Builds a rotation matrix by extracting the rotation part of the given transformation m
.
This implements “A Robust Method to Extract the Rotational Part of Deformations” by Müller et al.
Parameters
m
: the matrix from which the rotational part is to be extracted.eps
: the angular errors tolerated between the current rotation and the optimal one.max_iter
: the maximum number of iterations. Loops indefinitely until convergence if set to0
.guess
: a guess of the solution. Convergence will be significantly faster if an initial solution close to the actual solution is provided. Can be set toRotation3::identity()
if no other guesses come to mind.
sourcepub fn renormalize(&mut self)where
T: RealField,
pub fn renormalize(&mut self)where T: RealField,
Ensure this rotation is an orthonormal rotation matrix. This is useful when repeated computations might cause the matrix from progressively not being orthonormal anymore.
source§impl<T> Rotation<T, 3>where
T: SimdRealField,
impl<T> Rotation<T, 3>where T: SimdRealField,
sourcepub fn angle(&self) -> T
pub fn angle(&self) -> T
The rotation angle in [0; pi].
Example
let axis = Unit::new_normalize(Vector3::new(1.0, 2.0, 3.0));
let rot = Rotation3::from_axis_angle(&axis, 1.78);
assert_relative_eq!(rot.angle(), 1.78);
sourcepub fn axis(
&self
) -> Option<Unit<Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, ArrayStorage<T, 3, 1>>>>where
T: RealField,
pub fn axis( &self ) -> Option<Unit<Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, ArrayStorage<T, 3, 1>>>>where T: RealField,
The rotation axis. Returns None
if the rotation angle is zero or PI.
Example
let axis = Unit::new_normalize(Vector3::new(1.0, 2.0, 3.0));
let angle = 1.2;
let rot = Rotation3::from_axis_angle(&axis, angle);
assert_relative_eq!(rot.axis().unwrap(), axis);
// Case with a zero angle.
let rot = Rotation3::from_axis_angle(&axis, 0.0);
assert!(rot.axis().is_none());
sourcepub fn scaled_axis(
&self
) -> Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, ArrayStorage<T, 3, 1>>where
T: RealField,
pub fn scaled_axis( &self ) -> Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, ArrayStorage<T, 3, 1>>where T: RealField,
The rotation axis multiplied by the rotation angle.
Example
let axisangle = Vector3::new(0.1, 0.2, 0.3);
let rot = Rotation3::new(axisangle);
assert_relative_eq!(rot.scaled_axis(), axisangle, epsilon = 1.0e-6);
sourcepub fn axis_angle(
&self
) -> Option<(Unit<Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, ArrayStorage<T, 3, 1>>>, T)>where
T: RealField,
pub fn axis_angle( &self ) -> Option<(Unit<Matrix<T, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, ArrayStorage<T, 3, 1>>>, T)>where T: RealField,
The rotation axis and angle in ]0, pi] of this unit quaternion.
Returns None
if the angle is zero.
Example
let axis = Unit::new_normalize(Vector3::new(1.0, 2.0, 3.0));
let angle = 1.2;
let rot = Rotation3::from_axis_angle(&axis, angle);
let axis_angle = rot.axis_angle().unwrap();
assert_relative_eq!(axis_angle.0, axis);
assert_relative_eq!(axis_angle.1, angle);
// Case with a zero angle.
let rot = Rotation3::from_axis_angle(&axis, 0.0);
assert!(rot.axis_angle().is_none());
sourcepub fn angle_to(&self, other: &Rotation<T, 3>) -> Twhere
<T as SimdValue>::Element: SimdRealField,
pub fn angle_to(&self, other: &Rotation<T, 3>) -> Twhere <T as SimdValue>::Element: SimdRealField,
The rotation angle needed to make self
and other
coincide.
Example
let rot1 = Rotation3::from_axis_angle(&Vector3::y_axis(), 1.0);
let rot2 = Rotation3::from_axis_angle(&Vector3::x_axis(), 0.1);
assert_relative_eq!(rot1.angle_to(&rot2), 1.0045657, epsilon = 1.0e-6);
sourcepub fn to_euler_angles(self) -> (T, T, T)where
T: RealField,
👎Deprecated: This is renamed to use .euler_angles()
.
pub fn to_euler_angles(self) -> (T, T, T)where T: RealField,
.euler_angles()
.Creates Euler angles from a rotation.
The angles are produced in the form (roll, pitch, yaw).
sourcepub fn euler_angles(&self) -> (T, T, T)where
T: RealField,
pub fn euler_angles(&self) -> (T, T, T)where T: RealField,
Euler angles corresponding to this rotation from a rotation.
The angles are produced in the form (roll, pitch, yaw).
Example
let rot = Rotation3::from_euler_angles(0.1, 0.2, 0.3);
let euler = rot.euler_angles();
assert_relative_eq!(euler.0, 0.1, epsilon = 1.0e-6);
assert_relative_eq!(euler.1, 0.2, epsilon = 1.0e-6);
assert_relative_eq!(euler.2, 0.3, epsilon = 1.0e-6);
Trait Implementations§
source§impl<T, const D: usize> AbsDiffEq<Rotation<T, D>> for Rotation<T, D>where
T: Scalar + AbsDiffEq<T>,
<T as AbsDiffEq<T>>::Epsilon: Clone,
impl<T, const D: usize> AbsDiffEq<Rotation<T, D>> for Rotation<T, D>where T: Scalar + AbsDiffEq<T>, <T as AbsDiffEq<T>>::Epsilon: Clone,
source§fn default_epsilon() -> <Rotation<T, D> as AbsDiffEq<Rotation<T, D>>>::Epsilon
fn default_epsilon() -> <Rotation<T, D> as AbsDiffEq<Rotation<T, D>>>::Epsilon
source§fn abs_diff_eq(
&self,
other: &Rotation<T, D>,
epsilon: <Rotation<T, D> as AbsDiffEq<Rotation<T, D>>>::Epsilon
) -> bool
fn abs_diff_eq( &self, other: &Rotation<T, D>, epsilon: <Rotation<T, D> as AbsDiffEq<Rotation<T, D>>>::Epsilon ) -> bool
§fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
AbsDiffEq::abs_diff_eq
].source§impl<T, const D: usize> AbstractRotation<T, D> for Rotation<T, D>where
T: SimdRealField,
<T as SimdValue>::Element: SimdRealField,
impl<T, const D: usize> AbstractRotation<T, D> for Rotation<T, D>where T: SimdRealField, <T as SimdValue>::Element: SimdRealField,
source§fn inverse_mut(&mut self)
fn inverse_mut(&mut self)
self
to its inverse.source§fn transform_vector(
&self,
v: &Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>
) -> Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>
fn transform_vector( &self, v: &Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>> ) -> Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>
source§fn transform_point(&self, p: &OPoint<T, Const<D>>) -> OPoint<T, Const<D>>
fn transform_point(&self, p: &OPoint<T, Const<D>>) -> OPoint<T, Const<D>>
source§fn inverse_transform_vector(
&self,
v: &Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>
) -> Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>
fn inverse_transform_vector( &self, v: &Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>> ) -> Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>
source§fn inverse_transform_unit_vector(
&self,
v: &Unit<Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>>
) -> Unit<Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>>
fn inverse_transform_unit_vector( &self, v: &Unit<Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>> ) -> Unit<Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>>
source§impl<T, const D: usize> Clone for Rotation<T, D>where
T: Scalar,
<DefaultAllocator as Allocator<T, Const<D>, Const<D>>>::Buffer: Clone,
impl<T, const D: usize> Clone for Rotation<T, D>where T: Scalar, <DefaultAllocator as Allocator<T, Const<D>, Const<D>>>::Buffer: Clone,
source§impl<'a, T, const D: usize> Deserialize<'a> for Rotation<T, D>where
T: Scalar,
<DefaultAllocator as Allocator<T, Const<D>, Const<D>>>::Buffer: Deserialize<'a>,
impl<'a, T, const D: usize> Deserialize<'a> for Rotation<T, D>where T: Scalar, <DefaultAllocator as Allocator<T, Const<D>, Const<D>>>::Buffer: Deserialize<'a>,
source§fn deserialize<Des>(
deserializer: Des
) -> Result<Rotation<T, D>, <Des as Deserializer<'a>>::Error>where
Des: Deserializer<'a>,
fn deserialize<Des>( deserializer: Des ) -> Result<Rotation<T, D>, <Des as Deserializer<'a>>::Error>where Des: Deserializer<'a>,
source§impl<'b, T, const D: usize> Div<&'b Isometry<T, Rotation<T, D>, D>> for Rotation<T, D>where
T: SimdRealField,
<T as SimdValue>::Element: SimdRealField,
impl<'b, T, const D: usize> Div<&'b Isometry<T, Rotation<T, D>, D>> for Rotation<T, D>where T: SimdRealField, <T as SimdValue>::Element: SimdRealField,
source§impl<'b, T, const D: usize> Div<&'b Rotation<T, D>> for Rotation<T, D>where
T: Scalar + Zero + One + ClosedAdd<T> + ClosedMul<T>,
impl<'b, T, const D: usize> Div<&'b Rotation<T, D>> for Rotation<T, D>where T: Scalar + Zero + One + ClosedAdd<T> + ClosedMul<T>,
source§impl<'b, T, const D: usize> Div<&'b Similarity<T, Rotation<T, D>, D>> for Rotation<T, D>where
T: SimdRealField,
<T as SimdValue>::Element: SimdRealField,
impl<'b, T, const D: usize> Div<&'b Similarity<T, Rotation<T, D>, D>> for Rotation<T, D>where T: SimdRealField, <T as SimdValue>::Element: SimdRealField,
§type Output = Similarity<T, Rotation<T, D>, D>
type Output = Similarity<T, Rotation<T, D>, D>
/
operator.source§impl<'b, T, C, const D: usize> Div<&'b Transform<T, C, D>> for Rotation<T, D>where
T: Scalar + Zero + One + ClosedAdd<T> + ClosedMul<T> + RealField,
Const<D>: DimNameAdd<Const<1>>,
C: TCategoryMul<TAffine>,
DefaultAllocator: Allocator<T, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>,
impl<'b, T, C, const D: usize> Div<&'b Transform<T, C, D>> for Rotation<T, D>where T: Scalar + Zero + One + ClosedAdd<T> + ClosedMul<T> + RealField, Const<D>: DimNameAdd<Const<1>>, C: TCategoryMul<TAffine>, DefaultAllocator: Allocator<T, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>,
source§impl<'b, T> Div<&'b Unit<Quaternion<T>>> for Rotation<T, 3>where
T: SimdRealField,
<T as SimdValue>::Element: SimdRealField,
impl<'b, T> Div<&'b Unit<Quaternion<T>>> for Rotation<T, 3>where T: SimdRealField, <T as SimdValue>::Element: SimdRealField,
§type Output = Unit<Quaternion<T>>
type Output = Unit<Quaternion<T>>
/
operator.source§impl<T, const D: usize> Div<Isometry<T, Rotation<T, D>, D>> for Rotation<T, D>where
T: SimdRealField,
<T as SimdValue>::Element: SimdRealField,
impl<T, const D: usize> Div<Isometry<T, Rotation<T, D>, D>> for Rotation<T, D>where T: SimdRealField, <T as SimdValue>::Element: SimdRealField,
source§impl<T, const D: usize> Div<Rotation<T, D>> for Rotation<T, D>where
T: Scalar + Zero + One + ClosedAdd<T> + ClosedMul<T>,
impl<T, const D: usize> Div<Rotation<T, D>> for Rotation<T, D>where T: Scalar + Zero + One + ClosedAdd<T> + ClosedMul<T>,
source§impl<T, const D: usize> Div<Similarity<T, Rotation<T, D>, D>> for Rotation<T, D>where
T: SimdRealField,
<T as SimdValue>::Element: SimdRealField,
impl<T, const D: usize> Div<Similarity<T, Rotation<T, D>, D>> for Rotation<T, D>where T: SimdRealField, <T as SimdValue>::Element: SimdRealField,
§type Output = Similarity<T, Rotation<T, D>, D>
type Output = Similarity<T, Rotation<T, D>, D>
/
operator.source§impl<T, C, const D: usize> Div<Transform<T, C, D>> for Rotation<T, D>where
T: Scalar + Zero + One + ClosedAdd<T> + ClosedMul<T> + RealField,
Const<D>: DimNameAdd<Const<1>>,
C: TCategoryMul<TAffine>,
DefaultAllocator: Allocator<T, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>,
impl<T, C, const D: usize> Div<Transform<T, C, D>> for Rotation<T, D>where T: Scalar + Zero + One + ClosedAdd<T> + ClosedMul<T> + RealField, Const<D>: DimNameAdd<Const<1>>, C: TCategoryMul<TAffine>, DefaultAllocator: Allocator<T, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>,
source§impl<T> Div<Unit<Quaternion<T>>> for Rotation<T, 3>where
T: SimdRealField,
<T as SimdValue>::Element: SimdRealField,
impl<T> Div<Unit<Quaternion<T>>> for Rotation<T, 3>where T: SimdRealField, <T as SimdValue>::Element: SimdRealField,
§type Output = Unit<Quaternion<T>>
type Output = Unit<Quaternion<T>>
/
operator.source§impl<'b, T, const D: usize> DivAssign<&'b Rotation<T, D>> for Rotation<T, D>where
T: Scalar + Zero + One + ClosedAdd<T> + ClosedMul<T>,
impl<'b, T, const D: usize> DivAssign<&'b Rotation<T, D>> for Rotation<T, D>where T: Scalar + Zero + One + ClosedAdd<T> + ClosedMul<T>,
source§fn div_assign(&mut self, right: &'b Rotation<T, D>)
fn div_assign(&mut self, right: &'b Rotation<T, D>)
/=
operation. Read moresource§impl<T, const D: usize> DivAssign<Rotation<T, D>> for Rotation<T, D>where
T: Scalar + Zero + One + ClosedAdd<T> + ClosedMul<T>,
impl<T, const D: usize> DivAssign<Rotation<T, D>> for Rotation<T, D>where T: Scalar + Zero + One + ClosedAdd<T> + ClosedMul<T>,
source§fn div_assign(&mut self, right: Rotation<T, D>)
fn div_assign(&mut self, right: Rotation<T, D>)
/=
operation. Read moresource§impl<T, const D: usize> From<[Rotation<<T as SimdValue>::Element, D>; 16]> for Rotation<T, D>where
T: Scalar + PrimitiveSimdValue + From<[<T as SimdValue>::Element; 16]>,
<T as SimdValue>::Element: Scalar + Copy,
impl<T, const D: usize> From<[Rotation<<T as SimdValue>::Element, D>; 16]> for Rotation<T, D>where T: Scalar + PrimitiveSimdValue + From<[<T as SimdValue>::Element; 16]>, <T as SimdValue>::Element: Scalar + Copy,
source§impl<T, const D: usize> From<[Rotation<<T as SimdValue>::Element, D>; 2]> for Rotation<T, D>where
T: Scalar + PrimitiveSimdValue + From<[<T as SimdValue>::Element; 2]>,
<T as SimdValue>::Element: Scalar + Copy,
impl<T, const D: usize> From<[Rotation<<T as SimdValue>::Element, D>; 2]> for Rotation<T, D>where T: Scalar + PrimitiveSimdValue + From<[<T as SimdValue>::Element; 2]>, <T as SimdValue>::Element: Scalar + Copy,
source§impl<T, const D: usize> From<[Rotation<<T as SimdValue>::Element, D>; 4]> for Rotation<T, D>where
T: Scalar + PrimitiveSimdValue + From<[<T as SimdValue>::Element; 4]>,
<T as SimdValue>::Element: Scalar + Copy,
impl<T, const D: usize> From<[Rotation<<T as SimdValue>::Element, D>; 4]> for Rotation<T, D>where T: Scalar + PrimitiveSimdValue + From<[<T as SimdValue>::Element; 4]>, <T as SimdValue>::Element: Scalar + Copy,
source§impl<T, const D: usize> From<[Rotation<<T as SimdValue>::Element, D>; 8]> for Rotation<T, D>where
T: Scalar + PrimitiveSimdValue + From<[<T as SimdValue>::Element; 8]>,
<T as SimdValue>::Element: Scalar + Copy,
impl<T, const D: usize> From<[Rotation<<T as SimdValue>::Element, D>; 8]> for Rotation<T, D>where T: Scalar + PrimitiveSimdValue + From<[<T as SimdValue>::Element; 8]>, <T as SimdValue>::Element: Scalar + Copy,
source§impl<T> From<Unit<Quaternion<T>>> for Rotation<T, 3>where
T: SimdRealField,
<T as SimdValue>::Element: SimdRealField,
impl<T> From<Unit<Quaternion<T>>> for Rotation<T, 3>where T: SimdRealField, <T as SimdValue>::Element: SimdRealField,
source§impl<T, const D: usize> Hash for Rotation<T, D>where
T: Scalar + Hash,
<DefaultAllocator as Allocator<T, Const<D>, Const<D>>>::Buffer: Hash,
impl<T, const D: usize> Hash for Rotation<T, D>where T: Scalar + Hash, <DefaultAllocator as Allocator<T, Const<D>, Const<D>>>::Buffer: Hash,
source§impl<'b, T, const D: usize> Mul<&'b Isometry<T, Rotation<T, D>, D>> for Rotation<T, D>where
T: SimdRealField,
<T as SimdValue>::Element: SimdRealField,
impl<'b, T, const D: usize> Mul<&'b Isometry<T, Rotation<T, D>, D>> for Rotation<T, D>where T: SimdRealField, <T as SimdValue>::Element: SimdRealField,
source§impl<'b, T, R2, C2, SB, const D1: usize> Mul<&'b Matrix<T, R2, C2, SB>> for Rotation<T, D1>where
T: Scalar + Zero + One + ClosedAdd<T> + ClosedMul<T>,
R2: Dim,
C2: Dim,
SB: Storage<T, R2, C2>,
DefaultAllocator: Allocator<T, Const<D1>, C2>,
ShapeConstraint: AreMultipliable<Const<D1>, Const<D1>, R2, C2>,
impl<'b, T, R2, C2, SB, const D1: usize> Mul<&'b Matrix<T, R2, C2, SB>> for Rotation<T, D1>where T: Scalar + Zero + One + ClosedAdd<T> + ClosedMul<T>, R2: Dim, C2: Dim, SB: Storage<T, R2, C2>, DefaultAllocator: Allocator<T, Const<D1>, C2>, ShapeConstraint: AreMultipliable<Const<D1>, Const<D1>, R2, C2>,
source§impl<'b, T, const D: usize> Mul<&'b OPoint<T, Const<D>>> for Rotation<T, D>where
T: Scalar + Zero + One + ClosedAdd<T> + ClosedMul<T>,
ShapeConstraint: AreMultipliable<Const<D>, Const<D>, Const<D>, Const<1>>,
impl<'b, T, const D: usize> Mul<&'b OPoint<T, Const<D>>> for Rotation<T, D>where T: Scalar + Zero + One + ClosedAdd<T> + ClosedMul<T>, ShapeConstraint: AreMultipliable<Const<D>, Const<D>, Const<D>, Const<1>>,
source§impl<'b, T, const D: usize> Mul<&'b Rotation<T, D>> for Rotation<T, D>where
T: Scalar + Zero + One + ClosedAdd<T> + ClosedMul<T>,
impl<'b, T, const D: usize> Mul<&'b Rotation<T, D>> for Rotation<T, D>where T: Scalar + Zero + One + ClosedAdd<T> + ClosedMul<T>,
source§impl<'b, T, const D: usize> Mul<&'b Similarity<T, Rotation<T, D>, D>> for Rotation<T, D>where
T: SimdRealField,
<T as SimdValue>::Element: SimdRealField,
impl<'b, T, const D: usize> Mul<&'b Similarity<T, Rotation<T, D>, D>> for Rotation<T, D>where T: SimdRealField, <T as SimdValue>::Element: SimdRealField,
§type Output = Similarity<T, Rotation<T, D>, D>
type Output = Similarity<T, Rotation<T, D>, D>
*
operator.source§impl<'b, T, C, const D: usize> Mul<&'b Transform<T, C, D>> for Rotation<T, D>where
T: Scalar + Zero + One + ClosedAdd<T> + ClosedMul<T> + RealField,
Const<D>: DimNameAdd<Const<1>>,
C: TCategoryMul<TAffine>,
DefaultAllocator: Allocator<T, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>,
impl<'b, T, C, const D: usize> Mul<&'b Transform<T, C, D>> for Rotation<T, D>where T: Scalar + Zero + One + ClosedAdd<T> + ClosedMul<T> + RealField, Const<D>: DimNameAdd<Const<1>>, C: TCategoryMul<TAffine>, DefaultAllocator: Allocator<T, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>,
source§impl<'b, T, const D: usize> Mul<&'b Translation<T, D>> for Rotation<T, D>where
T: SimdRealField,
<T as SimdValue>::Element: SimdRealField,
impl<'b, T, const D: usize> Mul<&'b Translation<T, D>> for Rotation<T, D>where T: SimdRealField, <T as SimdValue>::Element: SimdRealField,
source§impl<'b, T, S, const D: usize> Mul<&'b Unit<Matrix<T, Const<D>, Const<1>, S>>> for Rotation<T, D>where
T: Scalar + Zero + One + ClosedAdd<T> + ClosedMul<T>,
S: Storage<T, Const<D>, Const<1>>,
ShapeConstraint: AreMultipliable<Const<D>, Const<D>, Const<D>, Const<1>>,
impl<'b, T, S, const D: usize> Mul<&'b Unit<Matrix<T, Const<D>, Const<1>, S>>> for Rotation<T, D>where T: Scalar + Zero + One + ClosedAdd<T> + ClosedMul<T>, S: Storage<T, Const<D>, Const<1>>, ShapeConstraint: AreMultipliable<Const<D>, Const<D>, Const<D>, Const<1>>,
source§impl<'b, T> Mul<&'b Unit<Quaternion<T>>> for Rotation<T, 3>where
T: SimdRealField,
<T as SimdValue>::Element: SimdRealField,
impl<'b, T> Mul<&'b Unit<Quaternion<T>>> for Rotation<T, 3>where T: SimdRealField, <T as SimdValue>::Element: SimdRealField,
§type Output = Unit<Quaternion<T>>
type Output = Unit<Quaternion<T>>
*
operator.source§impl<T, const D: usize> Mul<Isometry<T, Rotation<T, D>, D>> for Rotation<T, D>where
T: SimdRealField,
<T as SimdValue>::Element: SimdRealField,
impl<T, const D: usize> Mul<Isometry<T, Rotation<T, D>, D>> for Rotation<T, D>where T: SimdRealField, <T as SimdValue>::Element: SimdRealField,
source§impl<T, R2, C2, SB, const D1: usize> Mul<Matrix<T, R2, C2, SB>> for Rotation<T, D1>where
T: Scalar + Zero + One + ClosedAdd<T> + ClosedMul<T>,
R2: Dim,
C2: Dim,
SB: Storage<T, R2, C2>,
DefaultAllocator: Allocator<T, Const<D1>, C2>,
ShapeConstraint: AreMultipliable<Const<D1>, Const<D1>, R2, C2>,
impl<T, R2, C2, SB, const D1: usize> Mul<Matrix<T, R2, C2, SB>> for Rotation<T, D1>where T: Scalar + Zero + One + ClosedAdd<T> + ClosedMul<T>, R2: Dim, C2: Dim, SB: Storage<T, R2, C2>, DefaultAllocator: Allocator<T, Const<D1>, C2>, ShapeConstraint: AreMultipliable<Const<D1>, Const<D1>, R2, C2>,
source§impl<T, const D: usize> Mul<OPoint<T, Const<D>>> for Rotation<T, D>where
T: Scalar + Zero + One + ClosedAdd<T> + ClosedMul<T>,
ShapeConstraint: AreMultipliable<Const<D>, Const<D>, Const<D>, Const<1>>,
impl<T, const D: usize> Mul<OPoint<T, Const<D>>> for Rotation<T, D>where T: Scalar + Zero + One + ClosedAdd<T> + ClosedMul<T>, ShapeConstraint: AreMultipliable<Const<D>, Const<D>, Const<D>, Const<1>>,
source§impl<T, const D: usize> Mul<Rotation<T, D>> for Rotation<T, D>where
T: Scalar + Zero + One + ClosedAdd<T> + ClosedMul<T>,
impl<T, const D: usize> Mul<Rotation<T, D>> for Rotation<T, D>where T: Scalar + Zero + One + ClosedAdd<T> + ClosedMul<T>,
source§impl<T, const D: usize> Mul<Similarity<T, Rotation<T, D>, D>> for Rotation<T, D>where
T: SimdRealField,
<T as SimdValue>::Element: SimdRealField,
impl<T, const D: usize> Mul<Similarity<T, Rotation<T, D>, D>> for Rotation<T, D>where T: SimdRealField, <T as SimdValue>::Element: SimdRealField,
§type Output = Similarity<T, Rotation<T, D>, D>
type Output = Similarity<T, Rotation<T, D>, D>
*
operator.source§impl<T, C, const D: usize> Mul<Transform<T, C, D>> for Rotation<T, D>where
T: Scalar + Zero + One + ClosedAdd<T> + ClosedMul<T> + RealField,
Const<D>: DimNameAdd<Const<1>>,
C: TCategoryMul<TAffine>,
DefaultAllocator: Allocator<T, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>,
impl<T, C, const D: usize> Mul<Transform<T, C, D>> for Rotation<T, D>where T: Scalar + Zero + One + ClosedAdd<T> + ClosedMul<T> + RealField, Const<D>: DimNameAdd<Const<1>>, C: TCategoryMul<TAffine>, DefaultAllocator: Allocator<T, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>,
source§impl<T, const D: usize> Mul<Translation<T, D>> for Rotation<T, D>where
T: SimdRealField,
<T as SimdValue>::Element: SimdRealField,
impl<T, const D: usize> Mul<Translation<T, D>> for Rotation<T, D>where T: SimdRealField, <T as SimdValue>::Element: SimdRealField,
source§impl<T, S, const D: usize> Mul<Unit<Matrix<T, Const<D>, Const<1>, S>>> for Rotation<T, D>where
T: Scalar + Zero + One + ClosedAdd<T> + ClosedMul<T>,
S: Storage<T, Const<D>, Const<1>>,
ShapeConstraint: AreMultipliable<Const<D>, Const<D>, Const<D>, Const<1>>,
impl<T, S, const D: usize> Mul<Unit<Matrix<T, Const<D>, Const<1>, S>>> for Rotation<T, D>where T: Scalar + Zero + One + ClosedAdd<T> + ClosedMul<T>, S: Storage<T, Const<D>, Const<1>>, ShapeConstraint: AreMultipliable<Const<D>, Const<D>, Const<D>, Const<1>>,
source§impl<T> Mul<Unit<Quaternion<T>>> for Rotation<T, 3>where
T: SimdRealField,
<T as SimdValue>::Element: SimdRealField,
impl<T> Mul<Unit<Quaternion<T>>> for Rotation<T, 3>where T: SimdRealField, <T as SimdValue>::Element: SimdRealField,
§type Output = Unit<Quaternion<T>>
type Output = Unit<Quaternion<T>>
*
operator.source§impl<'b, T, const D: usize> MulAssign<&'b Rotation<T, D>> for Rotation<T, D>where
T: Scalar + Zero + One + ClosedAdd<T> + ClosedMul<T>,
impl<'b, T, const D: usize> MulAssign<&'b Rotation<T, D>> for Rotation<T, D>where T: Scalar + Zero + One + ClosedAdd<T> + ClosedMul<T>,
source§fn mul_assign(&mut self, right: &'b Rotation<T, D>)
fn mul_assign(&mut self, right: &'b Rotation<T, D>)
*=
operation. Read moresource§impl<T, const D: usize> MulAssign<Rotation<T, D>> for Rotation<T, D>where
T: Scalar + Zero + One + ClosedAdd<T> + ClosedMul<T>,
impl<T, const D: usize> MulAssign<Rotation<T, D>> for Rotation<T, D>where T: Scalar + Zero + One + ClosedAdd<T> + ClosedMul<T>,
source§fn mul_assign(&mut self, right: Rotation<T, D>)
fn mul_assign(&mut self, right: Rotation<T, D>)
*=
operation. Read moresource§impl<T, const D: usize> One for Rotation<T, D>where
T: Scalar + Zero + One + ClosedAdd<T> + ClosedMul<T>,
impl<T, const D: usize> One for Rotation<T, D>where T: Scalar + Zero + One + ClosedAdd<T> + ClosedMul<T>,
source§impl<T, const D: usize> PartialEq<Rotation<T, D>> for Rotation<T, D>where
T: Scalar + PartialEq<T>,
impl<T, const D: usize> PartialEq<Rotation<T, D>> for Rotation<T, D>where T: Scalar + PartialEq<T>,
source§impl<T, const D: usize> RelativeEq<Rotation<T, D>> for Rotation<T, D>where
T: Scalar + RelativeEq<T>,
<T as AbsDiffEq<T>>::Epsilon: Clone,
impl<T, const D: usize> RelativeEq<Rotation<T, D>> for Rotation<T, D>where T: Scalar + RelativeEq<T>, <T as AbsDiffEq<T>>::Epsilon: Clone,
source§fn default_max_relative(
) -> <Rotation<T, D> as AbsDiffEq<Rotation<T, D>>>::Epsilon
fn default_max_relative( ) -> <Rotation<T, D> as AbsDiffEq<Rotation<T, D>>>::Epsilon
source§fn relative_eq(
&self,
other: &Rotation<T, D>,
epsilon: <Rotation<T, D> as AbsDiffEq<Rotation<T, D>>>::Epsilon,
max_relative: <Rotation<T, D> as AbsDiffEq<Rotation<T, D>>>::Epsilon
) -> bool
fn relative_eq( &self, other: &Rotation<T, D>, epsilon: <Rotation<T, D> as AbsDiffEq<Rotation<T, D>>>::Epsilon, max_relative: <Rotation<T, D> as AbsDiffEq<Rotation<T, D>>>::Epsilon ) -> bool
§fn relative_ne(
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
fn relative_ne( &self, other: &Rhs, epsilon: Self::Epsilon, max_relative: Self::Epsilon ) -> bool
RelativeEq::relative_eq
].source§impl<T, const D: usize> Serialize for Rotation<T, D>where
T: Scalar,
<DefaultAllocator as Allocator<T, Const<D>, Const<D>>>::Buffer: Serialize,
impl<T, const D: usize> Serialize for Rotation<T, D>where T: Scalar, <DefaultAllocator as Allocator<T, Const<D>, Const<D>>>::Buffer: Serialize,
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>( &self, serializer: S ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where S: Serializer,
source§impl<T, const D: usize> SimdValue for Rotation<T, D>where
T: Scalar + SimdValue,
<T as SimdValue>::Element: Scalar,
impl<T, const D: usize> SimdValue for Rotation<T, D>where T: Scalar + SimdValue, <T as SimdValue>::Element: Scalar,
§type Element = Rotation<<T as SimdValue>::Element, D>
type Element = Rotation<<T as SimdValue>::Element, D>
§type SimdBool = <T as SimdValue>::SimdBool
type SimdBool = <T as SimdValue>::SimdBool
self
.source§fn splat(val: <Rotation<T, D> as SimdValue>::Element) -> Rotation<T, D>
fn splat(val: <Rotation<T, D> as SimdValue>::Element) -> Rotation<T, D>
val
.source§fn extract(&self, i: usize) -> <Rotation<T, D> as SimdValue>::Element
fn extract(&self, i: usize) -> <Rotation<T, D> as SimdValue>::Element
self
. Read moresource§unsafe fn extract_unchecked(
&self,
i: usize
) -> <Rotation<T, D> as SimdValue>::Element
unsafe fn extract_unchecked( &self, i: usize ) -> <Rotation<T, D> as SimdValue>::Element
self
without bound-checking.source§unsafe fn replace_unchecked(
&mut self,
i: usize,
val: <Rotation<T, D> as SimdValue>::Element
)
unsafe fn replace_unchecked( &mut self, i: usize, val: <Rotation<T, D> as SimdValue>::Element )
self
by val
without bound-checking.source§fn select(
self,
cond: <Rotation<T, D> as SimdValue>::SimdBool,
other: Rotation<T, D>
) -> Rotation<T, D>
fn select( self, cond: <Rotation<T, D> as SimdValue>::SimdBool, other: Rotation<T, D> ) -> Rotation<T, D>
source§impl<T1, T2, R, const D: usize> SubsetOf<Isometry<T2, R, D>> for Rotation<T1, D>where
T1: RealField,
T2: RealField + SupersetOf<T1>,
R: AbstractRotation<T2, D> + SupersetOf<Rotation<T1, D>>,
impl<T1, T2, R, const D: usize> SubsetOf<Isometry<T2, R, D>> for Rotation<T1, D>where T1: RealField, T2: RealField + SupersetOf<T1>, R: AbstractRotation<T2, D> + SupersetOf<Rotation<T1, D>>,
source§fn to_superset(&self) -> Isometry<T2, R, D>
fn to_superset(&self) -> Isometry<T2, R, D>
self
to the equivalent element of its superset.source§fn is_in_subset(iso: &Isometry<T2, R, D>) -> bool
fn is_in_subset(iso: &Isometry<T2, R, D>) -> bool
element
is actually part of the subset Self
(and can be converted to it).source§fn from_superset_unchecked(iso: &Isometry<T2, R, D>) -> Rotation<T1, D>
fn from_superset_unchecked(iso: &Isometry<T2, R, D>) -> Rotation<T1, D>
self.to_superset
but without any property checks. Always succeeds.§fn from_superset(element: &T) -> Option<Self>
fn from_superset(element: &T) -> Option<Self>
self
from the equivalent element of its
superset. Read moresource§impl<T1, T2, const D: usize> SubsetOf<Matrix<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>> for Rotation<T1, D>where
T1: RealField,
T2: RealField + SupersetOf<T1>,
Const<D>: DimNameAdd<Const<1>> + DimMin<Const<D>, Output = Const<D>>,
DefaultAllocator: Allocator<T1, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output> + Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>,
impl<T1, T2, const D: usize> SubsetOf<Matrix<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>> for Rotation<T1, D>where T1: RealField, T2: RealField + SupersetOf<T1>, Const<D>: DimNameAdd<Const<1>> + DimMin<Const<D>, Output = Const<D>>, DefaultAllocator: Allocator<T1, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output> + Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>,
source§fn to_superset(
&self
) -> Matrix<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>
fn to_superset( &self ) -> Matrix<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>
self
to the equivalent element of its superset.source§fn is_in_subset(
m: &Matrix<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>
) -> bool
fn is_in_subset( m: &Matrix<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer> ) -> bool
element
is actually part of the subset Self
(and can be converted to it).source§fn from_superset_unchecked(
m: &Matrix<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>
) -> Rotation<T1, D>
fn from_superset_unchecked( m: &Matrix<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer> ) -> Rotation<T1, D>
self.to_superset
but without any property checks. Always succeeds.§fn from_superset(element: &T) -> Option<Self>
fn from_superset(element: &T) -> Option<Self>
self
from the equivalent element of its
superset. Read moresource§impl<T1, T2, const D: usize> SubsetOf<Rotation<T2, D>> for Rotation<T1, D>where
T1: RealField,
T2: RealField + SupersetOf<T1>,
impl<T1, T2, const D: usize> SubsetOf<Rotation<T2, D>> for Rotation<T1, D>where T1: RealField, T2: RealField + SupersetOf<T1>,
source§fn to_superset(&self) -> Rotation<T2, D>
fn to_superset(&self) -> Rotation<T2, D>
self
to the equivalent element of its superset.source§fn is_in_subset(rot: &Rotation<T2, D>) -> bool
fn is_in_subset(rot: &Rotation<T2, D>) -> bool
element
is actually part of the subset Self
(and can be converted to it).source§fn from_superset_unchecked(rot: &Rotation<T2, D>) -> Rotation<T1, D>
fn from_superset_unchecked(rot: &Rotation<T2, D>) -> Rotation<T1, D>
self.to_superset
but without any property checks. Always succeeds.§fn from_superset(element: &T) -> Option<Self>
fn from_superset(element: &T) -> Option<Self>
self
from the equivalent element of its
superset. Read moresource§impl<T1, T2, R, const D: usize> SubsetOf<Similarity<T2, R, D>> for Rotation<T1, D>where
T1: RealField,
T2: RealField + SupersetOf<T1>,
R: AbstractRotation<T2, D> + SupersetOf<Rotation<T1, D>>,
impl<T1, T2, R, const D: usize> SubsetOf<Similarity<T2, R, D>> for Rotation<T1, D>where T1: RealField, T2: RealField + SupersetOf<T1>, R: AbstractRotation<T2, D> + SupersetOf<Rotation<T1, D>>,
source§fn to_superset(&self) -> Similarity<T2, R, D>
fn to_superset(&self) -> Similarity<T2, R, D>
self
to the equivalent element of its superset.source§fn is_in_subset(sim: &Similarity<T2, R, D>) -> bool
fn is_in_subset(sim: &Similarity<T2, R, D>) -> bool
element
is actually part of the subset Self
(and can be converted to it).source§fn from_superset_unchecked(sim: &Similarity<T2, R, D>) -> Rotation<T1, D>
fn from_superset_unchecked(sim: &Similarity<T2, R, D>) -> Rotation<T1, D>
self.to_superset
but without any property checks. Always succeeds.§fn from_superset(element: &T) -> Option<Self>
fn from_superset(element: &T) -> Option<Self>
self
from the equivalent element of its
superset. Read moresource§impl<T1, T2, C, const D: usize> SubsetOf<Transform<T2, C, D>> for Rotation<T1, D>where
T1: RealField,
T2: RealField + SupersetOf<T1>,
C: SuperTCategoryOf<TAffine>,
Const<D>: DimNameAdd<Const<1>> + DimMin<Const<D>, Output = Const<D>>,
DefaultAllocator: Allocator<T1, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output> + Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>,
impl<T1, T2, C, const D: usize> SubsetOf<Transform<T2, C, D>> for Rotation<T1, D>where T1: RealField, T2: RealField + SupersetOf<T1>, C: SuperTCategoryOf<TAffine>, Const<D>: DimNameAdd<Const<1>> + DimMin<Const<D>, Output = Const<D>>, DefaultAllocator: Allocator<T1, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output> + Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>,
source§fn to_superset(&self) -> Transform<T2, C, D>
fn to_superset(&self) -> Transform<T2, C, D>
self
to the equivalent element of its superset.source§fn is_in_subset(t: &Transform<T2, C, D>) -> bool
fn is_in_subset(t: &Transform<T2, C, D>) -> bool
element
is actually part of the subset Self
(and can be converted to it).source§fn from_superset_unchecked(t: &Transform<T2, C, D>) -> Rotation<T1, D>
fn from_superset_unchecked(t: &Transform<T2, C, D>) -> Rotation<T1, D>
self.to_superset
but without any property checks. Always succeeds.§fn from_superset(element: &T) -> Option<Self>
fn from_superset(element: &T) -> Option<Self>
self
from the equivalent element of its
superset. Read moresource§impl<T1, T2> SubsetOf<Unit<DualQuaternion<T2>>> for Rotation<T1, 3>where
T1: RealField,
T2: RealField + SupersetOf<T1>,
impl<T1, T2> SubsetOf<Unit<DualQuaternion<T2>>> for Rotation<T1, 3>where T1: RealField, T2: RealField + SupersetOf<T1>,
source§fn to_superset(&self) -> Unit<DualQuaternion<T2>>
fn to_superset(&self) -> Unit<DualQuaternion<T2>>
self
to the equivalent element of its superset.source§fn is_in_subset(dq: &Unit<DualQuaternion<T2>>) -> bool
fn is_in_subset(dq: &Unit<DualQuaternion<T2>>) -> bool
element
is actually part of the subset Self
(and can be converted to it).source§fn from_superset_unchecked(dq: &Unit<DualQuaternion<T2>>) -> Rotation<T1, 3>
fn from_superset_unchecked(dq: &Unit<DualQuaternion<T2>>) -> Rotation<T1, 3>
self.to_superset
but without any property checks. Always succeeds.§fn from_superset(element: &T) -> Option<Self>
fn from_superset(element: &T) -> Option<Self>
self
from the equivalent element of its
superset. Read moresource§impl<T1, T2> SubsetOf<Unit<Quaternion<T2>>> for Rotation<T1, 3>where
T1: RealField,
T2: RealField + SupersetOf<T1>,
impl<T1, T2> SubsetOf<Unit<Quaternion<T2>>> for Rotation<T1, 3>where T1: RealField, T2: RealField + SupersetOf<T1>,
source§fn to_superset(&self) -> Unit<Quaternion<T2>>
fn to_superset(&self) -> Unit<Quaternion<T2>>
self
to the equivalent element of its superset.source§fn is_in_subset(q: &Unit<Quaternion<T2>>) -> bool
fn is_in_subset(q: &Unit<Quaternion<T2>>) -> bool
element
is actually part of the subset Self
(and can be converted to it).source§fn from_superset_unchecked(q: &Unit<Quaternion<T2>>) -> Rotation<T1, 3>
fn from_superset_unchecked(q: &Unit<Quaternion<T2>>) -> Rotation<T1, 3>
self.to_superset
but without any property checks. Always succeeds.§fn from_superset(element: &T) -> Option<Self>
fn from_superset(element: &T) -> Option<Self>
self
from the equivalent element of its
superset. Read more