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: 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 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 matrixx
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 matrixx
axis will be aligned with - up - Vector pointing
up
. The only requirement of this parameter is to not be colinear withat
. Non-colinearity is not checked.
impl<N: BaseFloat> Iso3<N>
[src]
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: Copy> Copy for Iso3<N>
[src]
impl<N: Debug> Debug for Iso3<N>
[src]
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]
impl<N: Encodable> Encodable for Iso3<N>
[src]
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]
impl<N: BaseFloat> One for Iso3<N>
[src]
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