pub struct Transform3D { /* private fields */ }Expand description
3D transformation matrix
Encoded using 12 dodecets (3x4 matrix for affine transformations)
§Example
use dodecet_encoder::geometric::Transform3D;
let transform = Transform3D::identity();Implementations§
Source§impl Transform3D
impl Transform3D
Sourcepub fn translation(dx: i16, dy: i16, dz: i16) -> Self
pub fn translation(dx: i16, dy: i16, dz: i16) -> Self
Create translation transformation
Sourcepub fn rotation_x(angle_degrees: f64) -> Self
pub fn rotation_x(angle_degrees: f64) -> Self
Create rotation around X axis
Sourcepub fn rotation_y(angle_degrees: f64) -> Self
pub fn rotation_y(angle_degrees: f64) -> Self
Create rotation around Y axis
Sourcepub fn rotation_z(angle_degrees: f64) -> Self
pub fn rotation_z(angle_degrees: f64) -> Self
Create rotation around Z axis
Sourcepub fn compose(&self, other: &Transform3D) -> Transform3D
pub fn compose(&self, other: &Transform3D) -> Transform3D
Compose two transformations
Trait Implementations§
Source§impl Clone for Transform3D
impl Clone for Transform3D
Source§fn clone(&self) -> Transform3D
fn clone(&self) -> Transform3D
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 moreSource§impl Debug for Transform3D
impl Debug for Transform3D
Source§impl PartialEq for Transform3D
impl PartialEq for Transform3D
Source§fn eq(&self, other: &Transform3D) -> bool
fn eq(&self, other: &Transform3D) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for Transform3D
impl StructuralPartialEq for Transform3D
Auto Trait Implementations§
impl Freeze for Transform3D
impl RefUnwindSafe for Transform3D
impl Send for Transform3D
impl Sync for Transform3D
impl Unpin for Transform3D
impl UnsafeUnpin for Transform3D
impl UnwindSafe for Transform3D
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