Struct nalgebra::Iso2 [] [src]

pub struct Iso2<N> {
    pub rotation: Rot2<N>,
    pub translation: Vec2<N>,
}

Two dimensional isometry.

This is the composition of a rotation followed by a translation. Isometries conserve angles and distances, hence do not allow shearing nor scaling.

Fields

rotation: Rot2<N>

The rotation applicable by this isometry.

translation: Vec2<N>

The translation applicable by this isometry.

Methods

impl<N: BaseFloat> Iso2<N>
[src]

fn new(translation: Vec2<N>, rotation: Vec1<N>) -> Iso2<N>

Creates a new isometry from a rotation matrix and a vector.

fn new_with_rotmat(translation: Vec2<N>, rotation: Rot2<N>) -> Iso2<N>

Creates a new isometry from a rotation matrix and a vector.

Trait Implementations

impl<N: Copy> Copy for Iso2<N>
[src]

impl<N: Debug> Debug for Iso2<N>
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl<N: Clone> Clone for Iso2<N>
[src]

fn clone(&self) -> Iso2<N>

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl<N: Decodable> Decodable for Iso2<N>
[src]

fn decode<__DN: Decoder>(__arg_0: &mut __DN) -> Result<Iso2<N>, __DN::Error>

impl<N: Encodable> Encodable for Iso2<N>
[src]

fn encode<__SN: Encoder>(&self, __arg_0: &mut __SN) -> Result<(), __SN::Error>

impl<N: PartialEq> PartialEq for Iso2<N>
[src]

fn eq(&self, __arg_0: &Iso2<N>) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &Iso2<N>) -> bool

This method tests for !=.

impl<N: Eq> Eq for Iso2<N>
[src]

impl<N: Cast<f64> + BaseFloat> RotationMatrix<N, Vec2<N>, Vec1<N>> for Iso2<N>
[src]

type Output = Rot2<N>

The output rotation matrix type.

fn to_rot_mat(&self) -> Rot2<N>

Gets the rotation matrix represented by self.

impl<N: Cast<f64> + BaseFloat> Rotation<Vec1<N>> for Iso2<N>
[src]

fn rotation(&self) -> Vec1<N>

Gets the rotation associated with self.

fn inv_rotation(&self) -> Vec1<N>

Gets the inverse rotation associated with self.

fn append_rotation_mut(&mut self, rot: &Vec1<N>)

Appends a rotation to this object.

fn append_rotation(&self, rot: &Vec1<N>) -> Iso2<N>

Appends the rotation amount to a copy of t.

fn prepend_rotation_mut(&mut self, rot: &Vec1<N>)

Prepends a rotation to this object.

fn prepend_rotation(&self, rot: &Vec1<N>) -> Iso2<N>

Prepends the rotation amount to a copy of t.

fn set_rotation(&mut self, rot: Vec1<N>)

Sets the rotation of self.

impl<N> Dim for Iso2<N>
[src]

fn dim(_: Option<Iso2<N>>) -> usize

The dimension of the object.

impl<N: BaseFloat> One for Iso2<N>
[src]

fn one() -> Iso2<N>

Returns the multiplicative identity element of Self, 1. Read more

impl<N: BaseFloat> AbsoluteRotate<Vec2<N>> for Iso2<N>
[src]

fn absolute_rotate(&self, v: &Vec2<N>) -> Vec2<N>

This is the same as: Read more

impl<N: Rand + BaseFloat> Rand for Iso2<N>
[src]

fn rand<R: Rng>(rng: &mut R) -> Iso2<N>

Generates a random instance of this type using the specified source of randomness. Read more

impl<N: ApproxEq<N>> ApproxEq<N> for Iso2<N>
[src]

fn approx_epsilon(_: Option<Iso2<N>>) -> N

Default epsilon for approximation.

fn approx_ulps(_: Option<Iso2<N>>) -> u32

Default ULPs for approximation.

fn approx_eq_eps(&self, other: &Iso2<N>, epsilon: &N) -> bool

Tests approximate equality using a custom epsilon.

fn approx_eq_ulps(&self, other: &Iso2<N>, ulps: u32) -> bool

Tests approximate equality using units in the last place (ULPs)

fn approx_eq(&self, other: &Self) -> bool

Tests approximate equality.

impl<N: BaseNum> ToHomogeneous<Mat3<N>> for Iso2<N>
[src]

fn to_homogeneous(&self) -> Mat3<N>

Gets the homogeneous coordinates form of this object.

impl<N: BaseNum + Neg<Output=N>> Inv for Iso2<N>
[src]

fn inv_mut(&mut self) -> bool

In-place version of inverse.

fn inv(&self) -> Option<Iso2<N>>

Returns the inverse of m.

impl<N: BaseNum> Transform<Pnt2<N>> for Iso2<N>
[src]

fn transform(&self, p: &Pnt2<N>) -> Pnt2<N>

Applies a transformation to v.

fn inv_transform(&self, p: &Pnt2<N>) -> Pnt2<N>

Applies an inverse transformation to v.

impl<N: BaseFloat> Transformation<Iso2<N>> for Iso2<N>
[src]

fn transformation(&self) -> Iso2<N>

Gets the transformation of self.

fn inv_transformation(&self) -> Iso2<N>

Gets the inverse transformation of self.

fn append_transformation_mut(&mut self, t: &Iso2<N>)

Appends a transformation to this object.

fn append_transformation(&self, t: &Iso2<N>) -> Iso2<N>

Appends the transformation amount to a copy of t.

fn prepend_transformation_mut(&mut self, t: &Iso2<N>)

Prepends a transformation to this object.

fn prepend_transformation(&self, t: &Iso2<N>) -> Iso2<N>

Prepends the transformation amount to a copy of t.

fn set_transformation(&mut self, t: Iso2<N>)

Sets the transformation of self.

impl<N: BaseNum> Rotate<Vec2<N>> for Iso2<N>
[src]

fn rotate(&self, v: &Vec2<N>) -> Vec2<N>

Applies a rotation to v.

fn inv_rotate(&self, v: &Vec2<N>) -> Vec2<N>

Applies an inverse rotation to v.

impl<N: BaseFloat> Translation<Vec2<N>> for Iso2<N>
[src]

fn translation(&self) -> Vec2<N>

Gets the translation associated with this object.

fn inv_translation(&self) -> Vec2<N>

Gets the inverse translation associated with this object.

fn append_translation_mut(&mut self, t: &Vec2<N>)

Appends a translation to this object.

fn append_translation(&self, t: &Vec2<N>) -> Iso2<N>

Appends the translation amount to a copy of t.

fn prepend_translation_mut(&mut self, t: &Vec2<N>)

Prepends a translation to this object.

fn prepend_translation(&self, t: &Vec2<N>) -> Iso2<N>

Prepends the translation amount to a copy of t.

fn set_translation(&mut self, t: Vec2<N>)

Sets the translation.

impl<N: Copy + Add<N, Output=N> + Sub<N, Output=N>> Translate<Pnt2<N>> for Iso2<N>
[src]

fn translate(&self, v: &Pnt2<N>) -> Pnt2<N>

Apply a translation to an object.

fn inv_translate(&self, v: &Pnt2<N>) -> Pnt2<N>

Apply an inverse translation to an object.

impl<N: BaseFloat> Mul<Iso2<N>> for Iso2<N>
[src]

type Output = Iso2<N>

The resulting type after applying the * operator

fn mul(self, right: Iso2<N>) -> Iso2<N>

The method for the * operator

impl<N: BaseNum> Mul<Pnt2<N>> for Iso2<N>
[src]

type Output = Pnt2<N>

The resulting type after applying the * operator

fn mul(self, right: Pnt2<N>) -> Pnt2<N>

The method for the * operator