Struct nalgebra::Iso3 [] [src]

pub struct Iso3<N> {
    pub rotation: Rot3<N>,
    pub translation: Vec3<N>,
}

Three dimensional direct isometry.

This is the composition of a rotation followed by a translation. Vectors Vec3 are not affected by the translational component of this transformation while points Pnt3 are. Isometries conserve angles and distances, hence do not allow shearing nor scaling.

Fields

rotation: Rot3<N>

The rotation applicable by this isometry.

translation: Vec3<N>

The translation applicable by this isometry.

Methods

impl<N: Clone + BaseFloat> Iso3<N>
[src]

fn new_observer_frame(eye: &Pnt3<N>, target: &Pnt3<N>, up: &Vec3<N>) -> Iso3<N>

Creates an isometry that corresponds to the local frame of an observer standing at the point eye and looking toward target.

It maps the view direction target - eye to the positive z axis and the origin to the eye.

Arguments

  • eye - The observer position.
  • target - The target position.
  • up - Vertical direction. The only requirement of this parameter is to not be collinear to eye - at. Non-collinearity is not checked.

fn look_at_rh(eye: &Pnt3<N>, target: &Pnt3<N>, up: &Vec3<N>) -> Iso3<N>

Builds a right-handed look-at view matrix.

This conforms to the common notion of right handed look-at matrix from the computer graphics community.

Arguments

  • eye - The eye position.
  • target - The target position.
  • up - A vector approximately aligned with required the vertical axis. The only requirement of this parameter is to not be collinear to target - eye.

fn look_at_lh(eye: &Pnt3<N>, target: &Pnt3<N>, up: &Vec3<N>) -> Iso3<N>

Builds a left-handed look-at view matrix.

This conforms to the common notion of left handed look-at matrix from the computer graphics community.

Arguments

  • eye - The eye position.
  • target - The target position.
  • up - A vector approximately aligned with required the vertical axis. The only requirement of this parameter is to not be collinear to target - eye.

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

fn new(translation: Vec3<N>, rotation: Vec3<N>) -> Iso3<N>

Creates a new isometry from an axis-angle rotation, and a vector.

fn new_with_rotmat(translation: Vec3<N>, rotation: Rot3<N>) -> Iso3<N>

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

Trait Implementations

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

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

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

Formats the value using the given formatter.

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

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

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

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

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

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

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

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

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

This method tests for !=.

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

impl<N: Cast<f64> + BaseFloat> RotationMatrix<N, Vec3<N>, Vec3<N>> for Iso3<N>
[src]

type Output = Rot3<N>

The output rotation matrix type.

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

Gets the rotation matrix represented by self.

impl<N: Cast<f64> + BaseFloat> Rotation<Vec3<N>> for Iso3<N>
[src]

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

Gets the rotation associated with self.

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

Gets the inverse rotation associated with self.

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

Appends a rotation to this object.

fn append_rotation(&self, rot: &Vec3<N>) -> Iso3<N>

Appends the rotation amount to a copy of t.

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

Prepends a rotation to this object.

fn prepend_rotation(&self, rot: &Vec3<N>) -> Iso3<N>

Prepends the rotation amount to a copy of t.

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

Sets the rotation of self.

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

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

The dimension of the object.

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

fn one() -> Iso3<N>

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

impl<N: BaseFloat> AbsoluteRotate<Vec3<N>> for Iso3<N>
[src]

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

This is the same as: Read more

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

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

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

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

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

Default epsilon for approximation.

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

Default ULPs for approximation.

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

Tests approximate equality using a custom epsilon.

fn approx_eq_ulps(&self, other: &Iso3<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<Mat4<N>> for Iso3<N>
[src]

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

Gets the homogeneous coordinates form of this object.

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

fn inv_mut(&mut self) -> bool

In-place version of inverse.

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

Returns the inverse of m.

impl<N: BaseNum> Transform<Pnt3<N>> for Iso3<N>
[src]

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

Applies a transformation to v.

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

Applies an inverse transformation to v.

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

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

Gets the transformation of self.

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

Gets the inverse transformation of self.

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

Appends a transformation to this object.

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

Appends the transformation amount to a copy of t.

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

Prepends a transformation to this object.

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

Prepends the transformation amount to a copy of t.

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

Sets the transformation of self.

impl<N: BaseNum> Rotate<Vec3<N>> for Iso3<N>
[src]

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

Applies a rotation to v.

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

Applies an inverse rotation to v.

impl<N: BaseFloat> Translation<Vec3<N>> for Iso3<N>
[src]

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

Gets the translation associated with this object.

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

Gets the inverse translation associated with this object.

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

Appends a translation to this object.

fn append_translation(&self, t: &Vec3<N>) -> Iso3<N>

Appends the translation amount to a copy of t.

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

Prepends a translation to this object.

fn prepend_translation(&self, t: &Vec3<N>) -> Iso3<N>

Prepends the translation amount to a copy of t.

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

Sets the translation.

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

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

Apply a translation to an object.

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

Apply an inverse translation to an object.

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

type Output = Iso3<N>

The resulting type after applying the * operator

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

The method for the * operator

impl<N: BaseFloat> Mul<Rot3<N>> for Iso3<N>
[src]

type Output = Iso3<N>

The resulting type after applying the * operator

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

The method for the * operator

impl<N: BaseNum> Mul<Pnt3<N>> for Iso3<N>
[src]

type Output = Pnt3<N>

The resulting type after applying the * operator

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

The method for the * operator

impl<N: BaseNum> Mul<Vec3<N>> for Iso3<N>
[src]

type Output = Vec3<N>

The resulting type after applying the * operator

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

The method for the * operator

impl<N: Display + BaseFloat> Display for Iso3<N>
[src]

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

Formats the value using the given formatter.

impl<N: BaseFloat> Mul<Sim3<N>> for Iso3<N>
[src]

type Output = Sim3<N>

The resulting type after applying the * operator

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

The method for the * operator