#[repr(C, align(16))]pub struct Quaternion {
pub x: f32,
pub y: f32,
pub z: f32,
pub scaler: f32,
}
Expand description
Fields§
§x: f32
§C++ Info
- name:
x
(ctype:hkReal
) - offset:
0
(x86)/0
(x86_64) - type_size:
4
(x86)/4
(x86_64)
y: f32
§C++ Info
- name:
y
(ctype:hkReal
) - offset:
4
(x86)/4
(x86_64) - type_size:
4
(x86)/4
(x86_64)
z: f32
§C++ Info
- name:
z
(ctype:hkReal
) - offset:
8
(x86)/8
(x86_64) - type_size:
4
(x86)/4
(x86_64)
scaler: f32
§C++ Info
- name:
scaler
(ctype:hkReal
) - offset:
12
(x86)/12
(x86_64) - type_size:
4
(x86)/4
(x86_64)
Implementations§
Source§impl Quaternion
impl Quaternion
pub fn to_le_bytes(&self) -> [u8; 16]
pub fn to_be_bytes(&self) -> [u8; 16]
Sourcepub const fn from_le_bytes(bytes: &[u8; 16]) -> Self
pub const fn from_le_bytes(bytes: &[u8; 16]) -> Self
Create a Quaternion
value from its representation as a byte array in little endian.
Sourcepub const fn from_be_bytes(bytes: &[u8; 16]) -> Self
pub const fn from_be_bytes(bytes: &[u8; 16]) -> Self
Create a Quaternion
value from its representation as a byte array in big endian.
Trait Implementations§
Source§impl Clone for Quaternion
impl Clone for Quaternion
Source§fn clone(&self) -> Quaternion
fn clone(&self) -> Quaternion
Returns a copy 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 Quaternion
impl Debug for Quaternion
Source§impl Default for Quaternion
impl Default for Quaternion
Source§fn default() -> Quaternion
fn default() -> Quaternion
Returns the “default value” for a type. Read more
Source§impl Display for Quaternion
impl Display for Quaternion
Source§impl PartialEq for Quaternion
impl PartialEq for Quaternion
Source§impl PartialOrd for Quaternion
impl PartialOrd for Quaternion
impl StructuralPartialEq for Quaternion
Auto Trait Implementations§
impl Freeze for Quaternion
impl RefUnwindSafe for Quaternion
impl Send for Quaternion
impl Sync for Quaternion
impl Unpin for Quaternion
impl UnwindSafe for Quaternion
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