Struct nalgebra::Iso3 [] [src]

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

Three 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

The rotation applicable by this isometry.

translation

The translation applicable by this isometry.

Methods

impl<N: Clone + BaseFloat> Iso3<N>

fn look_at(&mut self, eye: &Pnt3<N>, at: &Pnt3<N>, up: &Vec3<N>)

Reorient and translate this transformation such that its local x axis points to a given direction. Note that the usually known look_at function does the same thing but with the z axis. See look_at_z for that.

Arguments

  • eye - The new translation of the transformation.
  • at - The point to look at. at - eye is the direction the matrix x axis will be aligned with.
  • up - Vector pointing up. The only requirement of this parameter is to not be colinear with at. Non-colinearity is not checked.

fn look_at_z(&mut self, eye: &Pnt3<N>, at: &Pnt3<N>, up: &Vec3<N>)

Reorient and translate this transformation such that its local z axis points to a given direction.

Arguments

  • eye - The new translation of the transformation.
  • at - The point to look at. at - eye is the direction the matrix x axis will be aligned with
  • up - Vector pointing up. The only requirement of this parameter is to not be colinear with at. Non-colinearity is not checked.

impl<N: BaseFloat> Iso3<N>

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

Creates a new isometry from a rotation matrix 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: Cast<f64> + BaseFloat> RotationMatrix<N, Vec3<N>, Vec3<N>> for Iso3<N>

type Output = Rot3<N>

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

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

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

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

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

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

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

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

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

impl<N> Dim for Iso3<N>

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

impl<N: BaseFloat> One for Iso3<N>

fn one() -> Iso3<N>

impl<N: BaseFloat> AbsoluteRotate<Vec3<N>> for Iso3<N>

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

impl<N: Rand + BaseFloat> Rand for Iso3<N>

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

impl<N: ApproxEq<N>> ApproxEq<N> for Iso3<N>

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

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

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

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

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

impl<N: BaseNum> ToHomogeneous<Mat4<N>> for Iso3<N>

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

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

fn inv_mut(&mut self) -> bool

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

impl<N: BaseNum> Transform<Pnt3<N>> for Iso3<N>

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

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

impl<N: BaseFloat> Transformation<Iso3<N>> for Iso3<N>

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

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

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

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

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

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

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

impl<N: BaseNum> Rotate<Vec3<N>> for Iso3<N>

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

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

impl<N: BaseFloat> Translation<Vec3<N>> for Iso3<N>

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

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

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

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

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

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

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

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

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

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

impl<N: BaseFloat> Mul<Iso3<N>> for Iso3<N>

type Output = Iso3<N>

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

impl<N: BaseNum> Mul<Pnt3<N>> for Iso3<N>

type Output = Pnt3<N>

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

Derived Implementations

impl<N: Copy> Copy for Iso3<N>

impl<N: Debug> Debug for Iso3<N>

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

impl<N: Clone> Clone for Iso3<N>

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

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

impl<N: Decodable> Decodable for Iso3<N>

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

impl<N: Encodable> Encodable for Iso3<N>

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

impl<N: PartialEq> PartialEq for Iso3<N>

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

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

impl<N: Eq> Eq for Iso3<N>