Trait alga::linear::Translation
source · pub trait Translation<E: EuclideanSpace>: DirectIsometry<E, Translation = Self, Rotation = Id> {
// Required methods
fn to_vector(&self) -> E::Coordinates;
fn from_vector(v: E::Coordinates) -> Option<Self>;
// Provided methods
fn powf(&self, n: E::RealField) -> Option<Self> { ... }
fn translation_between(a: &E, b: &E) -> Option<Self> { ... }
}Expand description
Subgroups of the n-dimensional translation group T(n).
Required Methods§
sourcefn to_vector(&self) -> E::Coordinates
fn to_vector(&self) -> E::Coordinates
Converts this translation to a vector.
sourcefn from_vector(v: E::Coordinates) -> Option<Self>
fn from_vector(v: E::Coordinates) -> Option<Self>
Attempts to convert a vector to this translation. Returns None if the translation
represented by v is not part of the translation subgroup represented by Self.
Provided Methods§
sourcefn powf(&self, n: E::RealField) -> Option<Self>
fn powf(&self, n: E::RealField) -> Option<Self>
Raises the translation to a power. The result must be equivalent to
self.to_superset() * n. Returns None if the result is not representable by Self.
sourcefn translation_between(a: &E, b: &E) -> Option<Self>
fn translation_between(a: &E, b: &E) -> Option<Self>
The translation needed to make a coincide with b, i.e., b = a * translation_to(a, b).
Object Safety§
This trait is not object safe.