Struct ultraviolet::transform::Isometry3
source · #[repr(C)]pub struct Isometry3 {
pub translation: Vec3,
pub rotation: Rotor3,
}
Expand description
An Isometry, aka a “rigid body transformation”.
Defined as the combination of a rotation and then 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
Implementations§
source§impl Isometry3
impl Isometry3
pub const fn new(translation: Vec3, rotation: Rotor3) -> Self
pub fn identity() -> Self
sourcepub fn prepend_rotation(&mut self, rotor: Rotor3)
pub fn prepend_rotation(&mut self, rotor: Rotor3)
Add a rotation before this isometry.
This means the rotation will only affect the rotational part of this isometry, not the translational part.
sourcepub fn append_rotation(&mut self, rotor: Rotor3)
pub fn append_rotation(&mut self, rotor: Rotor3)
Add a rotation after this isometry.
This means the rotation will affect both the rotational and translational parts of this isometry, since it is being applied ‘after’ this isometry’s translational part.
sourcepub fn prepend_translation(&mut self, translation: Vec3)
pub fn prepend_translation(&mut self, translation: Vec3)
Add a translation before this isometry.
Doing so will mean that the translation being added will get transformed by this isometry’s rotational part.
sourcepub fn append_translation(&mut self, translation: Vec3)
pub fn append_translation(&mut self, translation: Vec3)
Add a translation after this isometry.
Doing so will mean that the translation being added will not transformed by this isometry’s rotational part.
sourcepub fn prepend_isometry(&mut self, other: Self)
pub fn prepend_isometry(&mut self, other: Self)
Prepend transformation by another isometry.
This means that the transformation being applied will take place before this isometry, i.e. both its translation and rotation will be rotated by this isometry’s rotational part.
sourcepub fn append_isometry(&mut self, other: Self)
pub fn append_isometry(&mut self, other: Self)
Append transformation by another isometry.
This means that the transformation being applied will take place after this isometry, i.e. this isometry’s translation and rotation will be rotated by the other isometry’s rotational part.