Struct nalgebra::Sim3
[−]
[src]
pub struct Sim3<N> { pub isometry: Iso3<N>, // some fields omitted }
A three-dimensional similarity transformation.
This is a composition of a scale, followed by a rotation, followed by a translation.
Vectors Vec3
are not affected by the translational component of this transformation while
points Pnt3
are.
Similarity transformations conserve angles. Distances are multiplied by some constant (the
scale factor). The scale factor cannot be zero.
Fields
isometry: Iso3<N>
The isometry applicable by this similarity transformation.
Methods
impl<N: BaseFloat> Sim3<N>
[src]
fn new(translation: Vec3<N>, rotation: Vec3<N>, scale: N) -> Sim3<N>
Creates a new similarity transformation from a vector, an axis-angle rotation, and a scale factor.
The scale factor may be negative but not zero.
fn new_with_rotmat(translation: Vec3<N>, rotation: Rot3<N>, scale: N) -> Sim3<N>
Creates a new similarity transformation from a rotation matrix, a vector, and a scale factor.
The scale factor may be negative but not zero.
fn new_with_iso(isometry: Iso3<N>, scale: N) -> Sim3<N>
Creates a new similarity transformation from an isometry and a scale factor.
The scale factor may be negative but not zero.
impl<N: BaseFloat> Sim3<N>
[src]
fn scale(&self) -> N
The scale factor of this similarity transformation.
fn inv_scale(&self) -> N
The inverse scale factor of this similarity transformation.
fn append_scale_mut(&mut self, s: &N)
Appends in-place a scale to this similarity transformation.
fn append_scale(&self, s: &N) -> Sim3<N>
Appends a scale to this similarity transformation.
fn prepend_scale_mut(&mut self, s: &N)
Prepends in-place a scale to this similarity transformation.
fn prepend_scale(&self, s: &N) -> Sim3<N>
Prepends a scale to this similarity transformation.
fn set_scale(&mut self, s: N)
Sets the scale of this similarity transformation.
Trait Implementations
impl<N: Copy> Copy for Sim3<N>
[src]
impl<N: Debug> Debug for Sim3<N>
[src]
impl<N: Clone> Clone for Sim3<N>
[src]
fn clone(&self) -> Sim3<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 Sim3<N>
[src]
impl<N: Encodable> Encodable for Sim3<N>
[src]
impl<N: PartialEq> PartialEq for Sim3<N>
[src]
fn eq(&self, __arg_0: &Sim3<N>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Sim3<N>) -> bool
This method tests for !=
.
impl<N: Eq> Eq for Sim3<N>
[src]
impl<N> Dim for Sim3<N>
[src]
impl<N: BaseFloat> One for Sim3<N>
[src]
impl<N: BaseFloat> Mul<Sim3<N>> for Sim3<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
impl<N: BaseFloat> Mul<Iso3<N>> for Sim3<N>
[src]
type Output = Sim3<N>
The resulting type after applying the *
operator
fn mul(self, right: Iso3<N>) -> Sim3<N>
The method for the *
operator
impl<N: BaseFloat> Mul<Rot3<N>> for Sim3<N>
[src]
type Output = Sim3<N>
The resulting type after applying the *
operator
fn mul(self, right: Rot3<N>) -> Sim3<N>
The method for the *
operator
impl<N: BaseNum> Mul<Pnt3<N>> for Sim3<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 Sim3<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: BaseFloat> Transformation<Sim3<N>> for Sim3<N>
[src]
fn transformation(&self) -> Sim3<N>
Gets the transformation of self
.
fn inv_transformation(&self) -> Sim3<N>
Gets the inverse transformation of self
.
fn append_transformation_mut(&mut self, t: &Sim3<N>)
Appends a transformation to this object.
fn append_transformation(&self, t: &Sim3<N>) -> Sim3<N>
Appends the transformation amount
to a copy of t
.
fn prepend_transformation_mut(&mut self, t: &Sim3<N>)
Prepends a transformation to this object.
fn prepend_transformation(&self, t: &Sim3<N>) -> Sim3<N>
Prepends the transformation amount
to a copy of t
.
fn set_transformation(&mut self, t: Sim3<N>)
Sets the transformation of self
.
impl<N: BaseNum> Transform<Pnt3<N>> for Sim3<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: BaseNum + Neg<Output=N>> Inv for Sim3<N>
[src]
fn inv_mut(&mut self) -> bool
In-place version of inverse
.
fn inv(&self) -> Option<Sim3<N>>
Returns the inverse of m
.
impl<N: BaseNum> ToHomogeneous<Mat4<N>> for Sim3<N>
[src]
fn to_homogeneous(&self) -> Mat4<N>
Gets the homogeneous coordinates form of this object.
impl<N: ApproxEq<N>> ApproxEq<N> for Sim3<N>
[src]
fn approx_epsilon(_: Option<Sim3<N>>) -> N
Default epsilon for approximation.
fn approx_ulps(_: Option<Sim3<N>>) -> u32
Default ULPs for approximation.
fn approx_eq_eps(&self, other: &Sim3<N>, epsilon: &N) -> bool
Tests approximate equality using a custom epsilon.
fn approx_eq_ulps(&self, other: &Sim3<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: Rand + BaseFloat> Rand for Sim3<N>
[src]
fn rand<R: Rng>(rng: &mut R) -> Sim3<N>
Generates a random instance of this type using the specified source of randomness. Read more