Trait alga::linear::Similarity
source · pub trait Similarity<E: EuclideanSpace>: AffineTransformation<E, NonUniformScaling = Self::Scaling> {
type Scaling: Scaling<E>;
Show 13 methods
// Required methods
fn translation(&self) -> Self::Translation;
fn rotation(&self) -> Self::Rotation;
fn scaling(&self) -> Self::Scaling;
// Provided methods
fn translate_point(&self, pt: &E) -> E { ... }
fn rotate_point(&self, pt: &E) -> E { ... }
fn scale_point(&self, pt: &E) -> E { ... }
fn rotate_vector(&self, pt: &E::Coordinates) -> E::Coordinates { ... }
fn scale_vector(&self, pt: &E::Coordinates) -> E::Coordinates { ... }
fn inverse_translate_point(&self, pt: &E) -> E { ... }
fn inverse_rotate_point(&self, pt: &E) -> E { ... }
fn inverse_scale_point(&self, pt: &E) -> E { ... }
fn inverse_rotate_vector(&self, pt: &E::Coordinates) -> E::Coordinates { ... }
fn inverse_scale_vector(&self, pt: &E::Coordinates) -> E::Coordinates { ... }
}Expand description
Subgroups of the similarity group S(n), i.e., rotations, translations, and (signed) uniform scaling.
Similarities map lines to lines and preserve angles.
Required Associated Types§
Required Methods§
sourcefn translation(&self) -> Self::Translation
fn translation(&self) -> Self::Translation
The pure translational component of this similarity transformation.
Provided Methods§
sourcefn translate_point(&self, pt: &E) -> E
fn translate_point(&self, pt: &E) -> E
Applies this transformation’s pure translational part to a point.
sourcefn rotate_point(&self, pt: &E) -> E
fn rotate_point(&self, pt: &E) -> E
Applies this transformation’s pure rotational part to a point.
sourcefn scale_point(&self, pt: &E) -> E
fn scale_point(&self, pt: &E) -> E
Applies this transformation’s pure scaling part to a point.
sourcefn rotate_vector(&self, pt: &E::Coordinates) -> E::Coordinates
fn rotate_vector(&self, pt: &E::Coordinates) -> E::Coordinates
Applies this transformation’s pure rotational part to a vector.
sourcefn scale_vector(&self, pt: &E::Coordinates) -> E::Coordinates
fn scale_vector(&self, pt: &E::Coordinates) -> E::Coordinates
Applies this transformation’s pure scaling part to a vector.
sourcefn inverse_translate_point(&self, pt: &E) -> E
fn inverse_translate_point(&self, pt: &E) -> E
Applies this transformation inverse’s pure translational part to a point.
sourcefn inverse_rotate_point(&self, pt: &E) -> E
fn inverse_rotate_point(&self, pt: &E) -> E
Applies this transformation inverse’s pure rotational part to a point.
sourcefn inverse_scale_point(&self, pt: &E) -> E
fn inverse_scale_point(&self, pt: &E) -> E
Applies this transformation inverse’s pure scaling part to a point.
sourcefn inverse_rotate_vector(&self, pt: &E::Coordinates) -> E::Coordinates
fn inverse_rotate_vector(&self, pt: &E::Coordinates) -> E::Coordinates
Applies this transformation inverse’s pure rotational part to a vector.
sourcefn inverse_scale_vector(&self, pt: &E::Coordinates) -> E::Coordinates
fn inverse_scale_vector(&self, pt: &E::Coordinates) -> E::Coordinates
Applies this transformation inverse’s pure scaling part to a vector.