nalgebra::geometry

Trait AbstractRotation

Source
pub trait AbstractRotation<T: Scalar, const D: usize>:
    PartialEq
    + ClosedMulAssign
    + Clone {
    // Required methods
    fn identity() -> Self;
    fn inverse(&self) -> Self;
    fn inverse_mut(&mut self);
    fn transform_vector(&self, v: &SVector<T, D>) -> SVector<T, D>;
    fn transform_point(&self, p: &Point<T, D>) -> Point<T, D>;
    fn inverse_transform_vector(
        &self,
        v: &OVector<T, Const<D>>,
    ) -> OVector<T, Const<D>>;
    fn inverse_transform_point(&self, p: &Point<T, D>) -> Point<T, D>;

    // Provided method
    fn inverse_transform_unit_vector(
        &self,
        v: &Unit<SVector<T, D>>,
    ) -> Unit<SVector<T, D>> { ... }
}
Expand description

Trait implemented by rotations that can be used inside of an Isometry or Similarity.

Required Methods§

Source

fn identity() -> Self

The rotation identity.

Source

fn inverse(&self) -> Self

The rotation inverse.

Source

fn inverse_mut(&mut self)

Change self to its inverse.

Source

fn transform_vector(&self, v: &SVector<T, D>) -> SVector<T, D>

Apply the rotation to the given vector.

Source

fn transform_point(&self, p: &Point<T, D>) -> Point<T, D>

Apply the rotation to the given point.

Source

fn inverse_transform_vector( &self, v: &OVector<T, Const<D>>, ) -> OVector<T, Const<D>>

Apply the inverse rotation to the given vector.

Source

fn inverse_transform_point(&self, p: &Point<T, D>) -> Point<T, D>

Apply the inverse rotation to the given point.

Provided Methods§

Source

fn inverse_transform_unit_vector( &self, v: &Unit<SVector<T, D>>, ) -> Unit<SVector<T, D>>

Apply the inverse rotation to the given unit vector.

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.

Implementors§