#[repr(C)]pub struct MTLComponentTransform {
pub scale: MTLPackedFloat3,
pub shear: MTLPackedFloat3,
pub pivot: MTLPackedFloat3,
pub rotation: MTLPackedFloatQuaternion,
pub translation: MTLPackedFloat3,
}Available on crate feature
MTLAccelerationStructureTypes only.Expand description
A transformation represented by individual components such as translation and rotation. The rotation is represented by a quaternion, allowing for correct motion interpolation.
See also Apple’s documentation
Fields§
§scale: MTLPackedFloat3The scale of the instance applied before rotation alongside shear and pivot
shear: MTLPackedFloat3The shear of the instance applied before rotation alongside scale and pivot
pivot: MTLPackedFloat3Translation applied before rotation alongside scale and shear. Allows rotation to pivot around a point.
rotation: MTLPackedFloatQuaternionThe rotation of the instance as a normalized quaternion. Applied after scale, shear, and pivot and before translation
translation: MTLPackedFloat3The translation of the instance. Applied after rotation. Typically contains the composition of object translation and the inverse of the pivot translation.
Trait Implementations§
Source§impl Clone for MTLComponentTransform
impl Clone for MTLComponentTransform
Source§fn clone(&self) -> MTLComponentTransform
fn clone(&self) -> MTLComponentTransform
Returns a duplicate of the value. Read more
1.0.0 · 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 MTLComponentTransform
impl Debug for MTLComponentTransform
Source§impl Encode for MTLComponentTransform
impl Encode for MTLComponentTransform
Source§impl PartialEq for MTLComponentTransform
impl PartialEq for MTLComponentTransform
Source§impl RefEncode for MTLComponentTransform
impl RefEncode for MTLComponentTransform
Source§const ENCODING_REF: Encoding
const ENCODING_REF: Encoding
The Objective-C type-encoding for a reference of this type. Read more
impl Copy for MTLComponentTransform
impl StructuralPartialEq for MTLComponentTransform
Auto Trait Implementations§
impl Freeze for MTLComponentTransform
impl RefUnwindSafe for MTLComponentTransform
impl Send for MTLComponentTransform
impl Sync for MTLComponentTransform
impl Unpin for MTLComponentTransform
impl UnwindSafe for MTLComponentTransform
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> EncodeArgument for Twhere
T: Encode,
impl<T> EncodeArgument for Twhere
T: Encode,
Source§const ENCODING_ARGUMENT: Encoding = T::ENCODING
const ENCODING_ARGUMENT: Encoding = T::ENCODING
The Objective-C type-encoding for this type.
Source§impl<T> EncodeReturn for Twhere
T: Encode,
impl<T> EncodeReturn for Twhere
T: Encode,
Source§const ENCODING_RETURN: Encoding = T::ENCODING
const ENCODING_RETURN: Encoding = T::ENCODING
The Objective-C type-encoding for this type.