Struct nalgebra::Rot2 [] [src]

pub struct Rot2<N> {
    // some fields omitted
}

Two dimensional rotation matrix.

Methods

impl<N: Clone + BaseFloat + Neg<Output=N>> Rot2<N>
[src]

fn new(angle: Vec1<N>) -> Rot2<N>

Builds a 2 dimensional rotation matrix from an angle in radian.

impl<N> Rot2<N>
[src]

fn submat<'r>(&'r self) -> &'r Mat2<N>

Trait Implementations

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

impl<N: Hash> Hash for Rot2<N>
[src]

fn hash<__HN: Hasher>(&self, __arg_0: &mut __HN)

Feeds this value into the state given, updating the hasher as necessary.

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0

Feeds a slice of this type into the state provided.

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

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

Formats the value using the given formatter.

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

fn clone(&self) -> Rot2<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 Rot2<N>
[src]

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

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

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

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

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

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

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

This method tests for !=.

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

impl<N: BaseFloat + Clone> Rotation<Vec1<N>> for Rot2<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>) -> Rot2<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>) -> Rot2<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: BaseFloat> RotationTo for Rot2<N>
[src]

type AngleType = N

Type of the angle between two elements.

type DeltaRotationType = Rot2<N>

Type of the rotation between two elements.

fn angle_to(&self, other: &Self) -> N

Computes an angle nedded to transform the first element to the second one using a rotation. Read more

fn rotation_to(&self, other: &Self) -> Rot2<N>

Computes the smallest rotation needed to transform the first element to the second one.

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

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

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

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

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

This is the same as: Read more

impl<N: BaseNum> Rotate<Vec2<N>> for Rot2<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: BaseNum> Rotate<Pnt2<N>> for Rot2<N>
[src]

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

Applies a rotation to v.

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

Applies an inverse rotation to v.

impl<N: BaseNum> Transform<Vec2<N>> for Rot2<N>
[src]

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

Applies a transformation to v.

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

Applies an inverse transformation to v.

impl<N: BaseNum> Transform<Pnt2<N>> for Rot2<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> Dim for Rot2<N>
[src]

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

The dimension of the object.

impl<N: BaseNum> Mul<Rot2<N>> for Rot2<N>
[src]

type Output = Rot2<N>

The resulting type after applying the * operator

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

The method for the * operator

impl<N: BaseNum> Mul<Vec2<N>> for Rot2<N>
[src]

type Output = Vec2<N>

The resulting type after applying the * operator

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

The method for the * operator

impl<N: BaseNum> Mul<Pnt2<N>> for Rot2<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

impl<N: BaseNum> One for Rot2<N>
[src]

fn one() -> Rot2<N>

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

impl<N: BaseNum> Eye for Rot2<N>
[src]

fn new_identity(dim: usize) -> Rot2<N>

Return the identity matrix of specified dimension

impl<N: Zero + BaseNum + Cast<f64> + BaseFloat> RotationMatrix<N, Vec2<N>, Vec1<N>> for Rot2<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: Copy + Zero> Col<Vec2<N>> for Rot2<N>
[src]

fn ncols(&self) -> usize

The number of column of this matrix or vector.

fn col(&self, i: usize) -> Vec2<N>

Reads the i-th column of self.

fn set_col(&mut self, i: usize, col: Vec2<N>)

Writes the i-th column of self.

impl<N: Copy + Zero> Row<Vec2<N>> for Rot2<N>
[src]

fn nrows(&self) -> usize

The number of column of self.

fn row(&self, i: usize) -> Vec2<N>

Reads the i-th row of self.

fn set_row(&mut self, i: usize, row: Vec2<N>)

Writes the i-th row of self.

impl<N> Index<(usize, usize)> for Rot2<N>
[src]

type Output = N

The returned type after indexing

fn index(&self, i: (usize, usize)) -> &N

The method for the indexing (Foo[Bar]) operation

impl<N: Absolute<N>> Absolute<Mat2<N>> for Rot2<N>
[src]

fn abs(m: &Rot2<N>) -> Mat2<N>

Computes some absolute value of this object. Typically, this will make all component of a matrix or vector positive. Read more

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

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

Gets the homogeneous coordinates form of this object.

impl<N: Copy> Inv for Rot2<N>
[src]

fn inv_mut(&mut self) -> bool

In-place version of inverse.

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

Returns the inverse of m.

impl<N: Copy> Transpose for Rot2<N>
[src]

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

Computes the transpose of a matrix.

fn transpose_mut(&mut self)

In-place version of transposed.

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

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

Default epsilon for approximation.

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

Default ULPs for approximation.

fn approx_eq(&self, other: &Rot2<N>) -> bool

Tests approximate equality.

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

Tests approximate equality using a custom epsilon.

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

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

impl<N: Copy + Zero> Diag<Vec2<N>> for Rot2<N>
[src]

fn from_diag(diag: &Vec2<N>) -> Rot2<N>

Creates a new matrix with the given diagonal.

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

The diagonal of this matrix.