# [−][src]Trait alga::linear::Similarity

    pub trait Similarity<E: EuclideanSpace>: AffineTransformation<E, NonUniformScaling = Self::Scaling> {
        type Scaling: Scaling<E>;
        fn translation(&self) -> Self::Translation;
        fn rotation(&self) -> Self::Rotation;
        fn scaling(&self) -> Self::Scaling;

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

Subgroups of the similarity group `S(n)`, i.e., rotations, translations, and (signed) uniform scaling.

Similarities map lines to lines and preserve angles.

## Associated Types

### `type Scaling: Scaling<E>`

The type of the pure (uniform) scaling part of this similarity transformation.

Loading content...

## Required methods

### `fn translation(&self) -> Self::Translation`

The pure translational component of this similarity transformation.

### `fn rotation(&self) -> Self::Rotation`

The pure rotational component of this similarity transformation.

### `fn scaling(&self) -> Self::Scaling`

The pure scaling component of this similarity transformation.

Loading content...

## Provided methods

### `fn translate_point(&self, pt: &E) -> E`

Applies this transformation's pure translational part to a point.

### `fn rotate_point(&self, pt: &E) -> E`

Applies this transformation's pure rotational part to a point.

### `fn scale_point(&self, pt: &E) -> E`

Applies this transformation's pure scaling part to a point.

### `fn rotate_vector(&self, pt: &E::Coordinates) -> E::Coordinates`

Applies this transformation's pure rotational part to a vector.

### `fn scale_vector(&self, pt: &E::Coordinates) -> E::Coordinates`

Applies this transformation's pure scaling part to a vector.

### `fn inverse_translate_point(&self, pt: &E) -> E`

Applies this transformation inverse's pure translational part to a point.

### `fn inverse_rotate_point(&self, pt: &E) -> E`

Applies this transformation inverse's pure rotational part to a point.

### `fn inverse_scale_point(&self, pt: &E) -> E`

Applies this transformation inverse's pure scaling part to a point.

### `fn inverse_rotate_vector(&self, pt: &E::Coordinates) -> E::Coordinates`

Applies this transformation inverse's pure rotational part to a vector.

### `fn inverse_scale_vector(&self, pt: &E::Coordinates) -> E::Coordinates`

Applies this transformation inverse's pure scaling part to a vector.

Loading content...

## Implementors

### `impl<E: EuclideanSpace> Similarity<E> for Id`[src]

#### `type Scaling = Id`

#### `fn translation(&self) -> Self::Translation`[src]

#### `fn rotation(&self) -> Self::Rotation`[src]

#### `fn scaling(&self) -> Self::Scaling`[src]

### `impl<R, E> Similarity<E> for R where
R: RealField + SubsetOf<R>,
E: EuclideanSpace<RealField = R>,
E::Coordinates: ClosedMul<R> + ClosedDiv<R> + ClosedNeg,` [src]

#### `type Scaling = R`

#### `fn translation(&self) -> Self::Translation`[src]

#### `fn rotation(&self) -> Self::Rotation`[src]

#### `fn scaling(&self) -> Self::Scaling`[src]

Loading content...

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g., `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g., `vec -> usize` or `* -> vec`)

Search multiple things at once by splitting your query with comma (e.g., `str,u8` or `String,struct:Vec,test`)