pub struct Transform3D { /* private fields */ }Expand description
A 3D transform composed of position, rotation (as a quaternion), and scale.
Implementations§
Source§impl Transform3D
Implements methods for Transform3D.
impl Transform3D
Implements methods for Transform3D.
Sourcepub fn identity() -> Transform3D
pub fn identity() -> Transform3D
Creates a new transform at the origin with no rotation and unit scale.
§Returns
Transform3D- The identity transform.
Sourcepub fn rotate(&mut self, rotation: Quaternion)
pub fn rotate(&mut self, rotation: Quaternion)
Sourcepub fn apply_to_point(&self, point: Vector3D) -> Vector3D
pub fn apply_to_point(&self, point: Vector3D) -> Vector3D
Source§impl Transform3D
impl Transform3D
pub fn get_position(&self) -> Vector3D
pub fn get_mut_position(&mut self) -> &mut Vector3D
pub fn set_position(&mut self, val: Vector3D) -> &mut Self
pub fn get_rotation(&self) -> Quaternion
pub fn get_mut_rotation(&mut self) -> &mut Quaternion
pub fn set_rotation(&mut self, val: Quaternion) -> &mut Self
pub fn get_scale(&self) -> Vector3D
pub fn get_mut_scale(&mut self) -> &mut Vector3D
pub fn set_scale(&mut self, val: Vector3D) -> &mut Self
Source§impl Transform3D
impl Transform3D
pub fn new(position: Vector3D, rotation: Quaternion, scale: Vector3D) -> Self
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 moreimpl Copy for Transform3D
Source§impl Debug for Transform3D
impl Debug for Transform3D
Source§impl Default for Transform3D
Implements Default for Transform3D as the identity transform.
impl Default for Transform3D
Implements Default for Transform3D as the identity transform.
Source§fn default() -> Transform3D
fn default() -> Transform3D
Returns the “default value” for a type. Read more
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 ==.Source§impl PartialOrd for Transform3D
impl PartialOrd 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