Struct nalgebra::Similarity3 [] [src]

pub struct Similarity3<N> {
    pub isometry: Isometry3<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 Vector3 are not affected by the translational component of this transformation while points Point3 are. Similarity transformations conserve angles. Distances are multiplied by some constant (the scale factor). The scale factor cannot be zero.

Fields

isometry: Isometry3<N>

The isometry applicable by this similarity transformation.

Methods

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

fn new(translation: Vector3<N>, rotation: Vector3<N>, scale: N) -> Similarity3<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_rotation_matrix(translation: Vector3<N>, rotation: Rotation3<N>, scale: N) -> Similarity3<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_isometry(isometry: Isometry3<N>, scale: N) -> Similarity3<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> Similarity3<N>
[src]

fn scale(&self) -> N

The scale factor of this similarity transformation.

fn inverse_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) -> Similarity3<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) -> Similarity3<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 Similarity3<N>
[src]

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

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

Formats the value using the given formatter.

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

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

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

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

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

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

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

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

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

This method tests for !=.

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

impl<N> Dimension for Similarity3<N>
[src]

fn dimension(_: Option<Similarity3<N>>) -> usize

The dimension of the object.

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

fn one() -> Similarity3<N>

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

impl<N: BaseFloat> Mul<Similarity3<N>> for Similarity3<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

impl<N: BaseFloat> MulAssign<Similarity3<N>> for Similarity3<N>
[src]

fn mul_assign(&mut self, right: Similarity3<N>)

The method for the *= operator

impl<N: BaseFloat> Mul<Isometry3<N>> for Similarity3<N>
[src]

type Output = Similarity3<N>

The resulting type after applying the * operator

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

The method for the * operator

impl<N: BaseFloat> MulAssign<Isometry3<N>> for Similarity3<N>
[src]

fn mul_assign(&mut self, right: Isometry3<N>)

The method for the *= operator

impl<N: BaseFloat> Mul<Rotation3<N>> for Similarity3<N>
[src]

type Output = Similarity3<N>

The resulting type after applying the * operator

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

The method for the * operator

impl<N: BaseFloat> MulAssign<Rotation3<N>> for Similarity3<N>
[src]

fn mul_assign(&mut self, right: Rotation3<N>)

The method for the *= operator

impl<N: BaseNum> Mul<Point3<N>> for Similarity3<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 Similarity3<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: BaseFloat> Transformation<Similarity3<N>> for Similarity3<N>
[src]

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

Gets the transformation of self.

fn inverse_transformation(&self) -> Similarity3<N>

Gets the inverse transformation of self.

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

Appends a transformation to this object.

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

Appends the transformation amount to a copy of t.

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

Prepends a transformation to this object.

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

Prepends the transformation amount to a copy of t.

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

Sets the transformation of self.

impl<N: BaseNum> Transform<Point3<N>> for Similarity3<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: BaseNum + Neg<Output=N>> Inverse for Similarity3<N>
[src]

fn inverse_mut(&mut self) -> bool

In-place version of inverse.

fn inverse(&self) -> Option<Similarity3<N>>

Returns the inverse of m.

impl<N: BaseNum> ToHomogeneous<Matrix4<N>> for Similarity3<N>
[src]

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

Gets the homogeneous coordinates form of this object.

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

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

Default epsilon for approximation.

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

Default ULPs for approximation.

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

Tests approximate equality using a custom epsilon.

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

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

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

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

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

Formats the value using the given formatter.