[−][src]Struct ultraviolet::transform::Similarity3
A Similarity, i.e. an Isometry but with an added uniform scaling.
Defined as a uniform scaling followed by a rotation followed by a translation.
You may want to us this type over the corresponding type of homogeneous transformation matrix because it will be faster in most operations, especially composition and inverse.
Fields
translation: Vec3
rotation: Rotor3
scale: f32
Methods
impl Similarity3
[src]
pub fn new(translation: Vec3, rotation: Rotor3, scale: f32) -> Self
[src]
pub fn identity() -> Self
[src]
pub fn prepend_scaling(&mut self, scaling: f32)
[src]
Add a scaling before this similarity.
This means the scaling will only affect the scaling part of this similarity, not the translational part.
pub fn append_scaling(&mut self, scaling: f32)
[src]
Add a scaling after this similarity.
This means the scaling will affect both the scaling and translational parts of this similairty, since it is being applied after this similarity's translational part.
pub fn prepend_rotation(&mut self, rotor: Rotor3)
[src]
Add a rotation before this similarity.
This means the rotation will only affect the rotational part of this similarity, not the translational part.
pub fn append_rotation(&mut self, rotor: Rotor3)
[src]
Add a rotation after this similarity.
This means the rotation will affect both the rotational and translational parts of this similarity, since it is being applied after this similarity's translational part.
pub fn prepend_translation(&mut self, translation: Vec3)
[src]
Add a translation before this similarity.
Doing so will mean that the translation being added will get transformed by this similarity's rotational and scaling parts.
pub fn append_translation(&mut self, translation: Vec3)
[src]
Add a translation after this similarity.
Doing so will mean that the translation being added will not transformed by this similarity's rotational or scaling parts.
pub fn prepend_similarity(&mut self, other: Self)
[src]
Prepend transformation by another similarity.
This means that the transformation being applied will take place before this similarity, i.e. both its translation and rotation will be rotated by the other similarity's rotational part, and its translation will be scaled by the other similarity's scaling part.
pub fn append_similarity(&mut self, other: Self)
[src]
Append transformation by another similarity.
This means that the transformation being applied will take place after this similarity, i.e. this similarity's translation and rotation will be rotated by the other similarity's rotational part, and this similarity's translation will be scaled by the other similarity's scaling pat.
pub fn inverse(&mut self)
[src]
pub fn inversed(self) -> Self
[src]
pub fn transform_vec(&self, vec: Vec3) -> Vec3
[src]
pub fn into_homogeneous_matrix(self) -> Mat4
[src]
Trait Implementations
impl Clone for Similarity3
[src]
fn clone(&self) -> Similarity3
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for Similarity3
[src]
impl Debug for Similarity3
[src]
impl Default for Similarity3
[src]
impl Mul<Rotor3> for Similarity3
[src]
type Output = Similarity3
The resulting type after applying the *
operator.
fn mul(self, rotor: Rotor3) -> Similarity3
[src]
impl Mul<Similarity3> for Rotor3
[src]
type Output = Similarity3
The resulting type after applying the *
operator.
fn mul(self, iso: Similarity3) -> Similarity3
[src]
impl Mul<Similarity3> for Similarity3
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, base: Similarity3) -> Similarity3
[src]
impl Mul<Vec3> for Similarity3
[src]
Auto Trait Implementations
impl RefUnwindSafe for Similarity3
impl Send for Similarity3
impl Sync for Similarity3
impl Unpin for Similarity3
impl UnwindSafe for Similarity3
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,