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.
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.