pub struct TyTransform<T> {
pub position: TyVector3<T>,
pub rotation: TyQuaternion<T>,
pub scale: TyVector3<T>,
}Expand description
A node transform generic over its component type T, composing as
Translation * Rotation * Scale.
See TyTransformF32 and TyTransformF64 for the common instantiations.
Fields§
§position: TyVector3<T>The translation, which may be fractional.
rotation: TyQuaternion<T>The rotation, a unit quaternion.
scale: TyVector3<T>The per-axis scale.
Implementations§
Source§impl<T> TyTransform<T>
impl<T> TyTransform<T>
Sourcepub fn new(
position: TyVector3<T>,
rotation: TyQuaternion<T>,
scale: TyVector3<T>,
) -> Self
pub fn new( position: TyVector3<T>, rotation: TyQuaternion<T>, scale: TyVector3<T>, ) -> Self
Creates a new transform from a position, rotation, and scale.
Trait Implementations§
Source§impl<T: Clone> Clone for TyTransform<T>
impl<T: Clone> Clone for TyTransform<T>
Source§fn clone(&self) -> TyTransform<T>
fn clone(&self) -> TyTransform<T>
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<T: Copy> Copy for TyTransform<T>
Source§impl<T: Debug> Debug for TyTransform<T>
impl<T: Debug> Debug for TyTransform<T>
Source§impl Default for TyTransform<f32>
impl Default for TyTransform<f32>
Source§impl Default for TyTransform<f64>
impl Default for TyTransform<f64>
Source§impl<T: PartialEq> PartialEq for TyTransform<T>
impl<T: PartialEq> PartialEq for TyTransform<T>
Source§fn eq(&self, other: &TyTransform<T>) -> bool
fn eq(&self, other: &TyTransform<T>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<T: PartialEq> StructuralPartialEq for TyTransform<T>
Auto Trait Implementations§
impl<T> Freeze for TyTransform<T>where
T: Freeze,
impl<T> RefUnwindSafe for TyTransform<T>where
T: RefUnwindSafe,
impl<T> Send for TyTransform<T>where
T: Send,
impl<T> Sync for TyTransform<T>where
T: Sync,
impl<T> Unpin for TyTransform<T>where
T: Unpin,
impl<T> UnsafeUnpin for TyTransform<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for TyTransform<T>where
T: UnwindSafe,
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