pub struct Transform3 {
pub rotation: Mat3,
pub translation: Vec3,
}Expand description
A rigid (isometric) transformation in 3-D space.
Composes as: (B ∘ A).apply(p) == B.apply(A.apply(p)).
Fields§
§rotation: Mat3Linear (rotation / reflection) part.
translation: Vec3Translation part (applied after the rotation).
Implementations§
Source§impl Transform3
impl Transform3
Sourcepub fn from_translation(t: Vec3) -> Self
pub fn from_translation(t: Vec3) -> Self
Pure translation.
Sourcepub fn from_rotation(axis: UnitVec3, angle: f64) -> Self
pub fn from_rotation(axis: UnitVec3, angle: f64) -> Self
Pure rotation around axis by angle radians.
Sourcepub fn apply_point(self, p: Point3) -> Point3
pub fn apply_point(self, p: Point3) -> Point3
Apply the transform to a point.
Trait Implementations§
Source§impl Clone for Transform3
impl Clone for Transform3
Source§fn clone(&self) -> Transform3
fn clone(&self) -> Transform3
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for Transform3
Source§impl Debug for Transform3
impl Debug for Transform3
Source§impl Mul for Transform3
Composition operator: lhs * rhs applies rhs first.
impl Mul for Transform3
Composition operator: lhs * rhs applies rhs first.
Source§impl PartialEq for Transform3
impl PartialEq for Transform3
Source§fn eq(&self, other: &Transform3) -> bool
fn eq(&self, other: &Transform3) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for Transform3
Auto Trait Implementations§
impl Freeze for Transform3
impl RefUnwindSafe for Transform3
impl Send for Transform3
impl Sync for Transform3
impl Unpin for Transform3
impl UnsafeUnpin for Transform3
impl UnwindSafe for Transform3
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more