Struct nalgebra::Isometry3
[−]
[src]
pub struct Isometry3<N> { pub rotation: Rotation3<N>, pub translation: Vector3<N>, }
Three dimensional direct isometry.
This is the composition of a rotation followed by a translation. Vectors Vector3
are not
affected by the translational component of this transformation while points Point3
are.
Isometries conserve angles and distances, hence do not allow shearing nor scaling.
Fields
rotation: Rotation3<N>
The rotation applicable by this isometry.
translation: Vector3<N>
The translation applicable by this isometry.
Methods
impl<N: Clone + BaseFloat> Isometry3<N>
[src]
fn new_observer_frame(eye: &Point3<N>, target: &Point3<N>, up: &Vector3<N>) -> Isometry3<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: &Point3<N>, target: &Point3<N>, up: &Vector3<N>) -> Isometry3<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: &Point3<N>, target: &Point3<N>, up: &Vector3<N>) -> Isometry3<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> Isometry3<N>
[src]
fn new(translation: Vector3<N>, rotation: Vector3<N>) -> Isometry3<N>
Creates a new isometry from an axis-angle rotation, and a vector.
fn new_with_rotation_matrix(translation: Vector3<N>, rotation: Rotation3<N>) -> Isometry3<N>
Creates a new isometry from a rotation matrix and a vector.
Trait Implementations
impl<N: Eq> Eq for Isometry3<N>
[src]
impl<N: PartialEq> PartialEq for Isometry3<N>
[src]
fn eq(&self, __arg_0: &Isometry3<N>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Isometry3<N>) -> bool
This method tests for !=
.
impl<N: Encodable> Encodable for Isometry3<N>
[src]
impl<N: Decodable> Decodable for Isometry3<N>
[src]
impl<N: Clone> Clone for Isometry3<N>
[src]
fn clone(&self) -> Isometry3<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: Debug> Debug for Isometry3<N>
[src]
impl<N: Copy> Copy for Isometry3<N>
[src]
impl<N: Cast<f64> + BaseFloat> RotationMatrix<N, Vector3<N>, Vector3<N>> for Isometry3<N>
[src]
type Output = Rotation3<N>
The output rotation matrix type.
fn to_rotation_matrix(&self) -> Rotation3<N>
Gets the rotation matrix represented by self
.
impl<N: Cast<f64> + BaseFloat> Rotation<Vector3<N>> for Isometry3<N>
[src]
fn rotation(&self) -> Vector3<N>
Gets the rotation associated with self
.
fn inverse_rotation(&self) -> Vector3<N>
Gets the inverse rotation associated with self
.
fn append_rotation_mut(&mut self, rotation: &Vector3<N>)
Appends a rotation to this object.
fn append_rotation(&self, rotation: &Vector3<N>) -> Isometry3<N>
Appends the rotation amount
to a copy of t
.
fn prepend_rotation_mut(&mut self, rotation: &Vector3<N>)
Prepends a rotation to this object.
fn prepend_rotation(&self, rotation: &Vector3<N>) -> Isometry3<N>
Prepends the rotation amount
to a copy of t
.
fn set_rotation(&mut self, rotation: Vector3<N>)
Sets the rotation of self
.
impl<N> Dimension for Isometry3<N>
[src]
impl<N: BaseFloat> One for Isometry3<N>
[src]
impl<N: BaseFloat> AbsoluteRotate<Vector3<N>> for Isometry3<N>
[src]
fn absolute_rotate(&self, v: &Vector3<N>) -> Vector3<N>
This is the same as: Read more
impl<N: Rand + BaseFloat> Rand for Isometry3<N>
[src]
fn rand<R: Rng>(rng: &mut R) -> Isometry3<N>
Generates a random instance of this type using the specified source of randomness. Read more
impl<N: ApproxEq<N>> ApproxEq<N> for Isometry3<N>
[src]
fn approx_epsilon(_: Option<Isometry3<N>>) -> N
Default epsilon for approximation.
fn approx_ulps(_: Option<Isometry3<N>>) -> u32
Default ULPs for approximation.
fn approx_eq_eps(&self, other: &Isometry3<N>, epsilon: &N) -> bool
Tests approximate equality using a custom epsilon.
fn approx_eq_ulps(&self, other: &Isometry3<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<Matrix4<N>> for Isometry3<N>
[src]
fn to_homogeneous(&self) -> Matrix4<N>
Gets the homogeneous coordinates form of this object.
impl<N: BaseNum + Neg<Output=N>> Inverse for Isometry3<N>
[src]
fn inverse_mut(&mut self) -> bool
In-place version of inverse
.
fn inverse(&self) -> Option<Isometry3<N>>
Returns the inverse of m
.
impl<N: BaseNum> Transform<Point3<N>> for Isometry3<N>
[src]
fn transform(&self, p: &Point3<N>) -> Point3<N>
Applies a transformation to v
.
fn inverse_transform(&self, p: &Point3<N>) -> Point3<N>
Applies an inverse transformation to v
.
impl<N: BaseFloat> Transformation<Isometry3<N>> for Isometry3<N>
[src]
fn transformation(&self) -> Isometry3<N>
Gets the transformation of self
.
fn inverse_transformation(&self) -> Isometry3<N>
Gets the inverse transformation of self
.
fn append_transformation_mut(&mut self, t: &Isometry3<N>)
Appends a transformation to this object.
fn append_transformation(&self, t: &Isometry3<N>) -> Isometry3<N>
Appends the transformation amount
to a copy of t
.
fn prepend_transformation_mut(&mut self, t: &Isometry3<N>)
Prepends a transformation to this object.
fn prepend_transformation(&self, t: &Isometry3<N>) -> Isometry3<N>
Prepends the transformation amount
to a copy of t
.
fn set_transformation(&mut self, t: Isometry3<N>)
Sets the transformation of self
.
impl<N: BaseNum> Rotate<Vector3<N>> for Isometry3<N>
[src]
fn rotate(&self, v: &Vector3<N>) -> Vector3<N>
Applies a rotation to v
.
fn inverse_rotate(&self, v: &Vector3<N>) -> Vector3<N>
Applies an inverse rotation to v
.
impl<N: BaseFloat> Translation<Vector3<N>> for Isometry3<N>
[src]
fn translation(&self) -> Vector3<N>
Gets the translation associated with this object.
fn inverse_translation(&self) -> Vector3<N>
Gets the inverse translation associated with this object.
fn append_translation_mut(&mut self, t: &Vector3<N>)
Appends a translation to this object.
fn append_translation(&self, t: &Vector3<N>) -> Isometry3<N>
Appends the translation amount
to a copy of t
.
fn prepend_translation_mut(&mut self, t: &Vector3<N>)
Prepends a translation to this object.
fn prepend_translation(&self, t: &Vector3<N>) -> Isometry3<N>
Prepends the translation amount
to a copy of t
.
fn set_translation(&mut self, t: Vector3<N>)
Sets the translation.
impl<N: Copy + Add<N, Output=N> + Sub<N, Output=N>> Translate<Point3<N>> for Isometry3<N>
[src]
fn translate(&self, v: &Point3<N>) -> Point3<N>
Apply a translation to an object.
fn inverse_translate(&self, v: &Point3<N>) -> Point3<N>
Apply an inverse translation to an object.
impl<N: BaseFloat> Mul<Isometry3<N>> for Isometry3<N>
[src]
type Output = Isometry3<N>
The resulting type after applying the *
operator
fn mul(self, right: Isometry3<N>) -> Isometry3<N>
The method for the *
operator
impl<N: BaseFloat> MulAssign<Isometry3<N>> for Isometry3<N>
[src]
fn mul_assign(&mut self, right: Isometry3<N>)
The method for the *=
operator
impl<N: BaseFloat> Mul<Rotation3<N>> for Isometry3<N>
[src]
type Output = Isometry3<N>
The resulting type after applying the *
operator
fn mul(self, right: Rotation3<N>) -> Isometry3<N>
The method for the *
operator
impl<N: BaseFloat> MulAssign<Rotation3<N>> for Isometry3<N>
[src]
fn mul_assign(&mut self, right: Rotation3<N>)
The method for the *=
operator
impl<N: BaseNum> Mul<Point3<N>> for Isometry3<N>
[src]
type Output = Point3<N>
The resulting type after applying the *
operator
fn mul(self, right: Point3<N>) -> Point3<N>
The method for the *
operator
impl<N: BaseNum> Mul<Vector3<N>> for Isometry3<N>
[src]
type Output = Vector3<N>
The resulting type after applying the *
operator
fn mul(self, right: Vector3<N>) -> Vector3<N>
The method for the *
operator
impl<N: Display + BaseFloat> Display for Isometry3<N>
[src]
impl<N: BaseFloat> Mul<Similarity3<N>> for Isometry3<N>
[src]
type Output = Similarity3<N>
The resulting type after applying the *
operator
fn mul(self, right: Similarity3<N>) -> Similarity3<N>
The method for the *
operator