pub trait Rotation<E: EuclideanSpace>: OrthogonalTransformation<E, Rotation = Self> + DirectIsometry<E, Rotation = Self> {
// Required methods
fn powf(&self, n: E::RealField) -> Option<Self>;
fn rotation_between(a: &E::Coordinates, b: &E::Coordinates) -> Option<Self>;
fn scaled_rotation_between(
a: &E::Coordinates,
b: &E::Coordinates,
s: E::RealField,
) -> Option<Self>;
}Expand description
Subgroups of the n-dimensional rotation group SO(n).
Required Methods§
Sourcefn powf(&self, n: E::RealField) -> Option<Self>
fn powf(&self, n: E::RealField) -> Option<Self>
Raises this rotation to a power. If this is a simple rotation, the result must be
equivalent to multiplying the rotation angle by n.
Sourcefn rotation_between(a: &E::Coordinates, b: &E::Coordinates) -> Option<Self>
fn rotation_between(a: &E::Coordinates, b: &E::Coordinates) -> Option<Self>
Computes a simple rotation that makes the angle between a and b equal to zero, i.e.,
b.angle(a * delta_rotation(a, b)) = 0. If a and b are collinear, the computed
rotation may not be unique. Returns None if no such simple rotation exists in the
subgroup represented by Self.
Sourcefn scaled_rotation_between(
a: &E::Coordinates,
b: &E::Coordinates,
s: E::RealField,
) -> Option<Self>
fn scaled_rotation_between( a: &E::Coordinates, b: &E::Coordinates, s: E::RealField, ) -> Option<Self>
Computes the rotation between a and b and raises it to the power n.
This is equivalent to calling self.rotation_between(a, b) followed by .powf(n) but will
usually be much more efficient.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.