[go: up one dir, main page]

Trait Transformation

Source
pub trait Transformation<E: EuclideanSpace>: MultiplicativeMonoid {
    // Required methods
    fn transform_point(&self, pt: &E) -> E;
    fn transform_vector(&self, v: &E::Coordinates) -> E::Coordinates;
}
Expand description

A general transformation acting on an euclidean space. It may not be inversible.

Required Methods§

Source

fn transform_point(&self, pt: &E) -> E

Applies this group’s action on a point from the euclidean space.

Source

fn transform_vector(&self, v: &E::Coordinates) -> E::Coordinates

Applies this group’s action on a vector from the euclidean space.

If v is a vector and a, b two point such that v = a - b, the action on a vector is defined as self ∘ v = (self × a) - (self × b).

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§

Source§

impl<E: EuclideanSpace> Transformation<E> for Id

Source§

impl<R, E> Transformation<E> for R
where R: RealField, E: EuclideanSpace<RealField = R>, E::Coordinates: ClosedMul<R> + ClosedDiv<R> + ClosedNeg,