#[repr(C)]pub struct Quat {
pub v: Vec3,
pub s: f32,
}Expand description
Quaternion with vector part v and scalar part s.
Fields§
§v: Vec3Vector component.
s: f32Scalar component.
Implementations§
Source§impl Quat
impl Quat
Sourcepub const fn from_raw(raw: b3Quat) -> Self
pub const fn from_raw(raw: b3Quat) -> Self
Converts a raw Box3D quaternion into the Rust value type.
Sourcepub fn validate(self) -> Result<Self>
pub fn validate(self) -> Result<Self>
Returns this quaternion or Error::InvalidArgument if it is invalid.
Sourcepub fn from_matrix(matrix: Matrix3) -> Result<Self>
pub fn from_matrix(matrix: Matrix3) -> Result<Self>
Builds a quaternion from a valid 3x3 rotation matrix.
Trait Implementations§
impl Copy for Quat
impl StructuralPartialEq for Quat
Auto Trait Implementations§
impl Freeze for Quat
impl RefUnwindSafe for Quat
impl Send for Quat
impl Sync for Quat
impl Unpin for Quat
impl UnsafeUnpin for Quat
impl UnwindSafe for Quat
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