Struct graphene::Quaternion
source · [−]#[repr(transparent)]pub struct Quaternion { /* private fields */ }
Implementations
sourceimpl Quaternion
impl Quaternion
pub fn add(&self, b: &Quaternion) -> Quaternion
pub fn dot(&self, b: &Quaternion) -> f32
pub fn invert(&self) -> Quaternion
pub fn multiply(&self, b: &Quaternion) -> Quaternion
pub fn normalize(&self) -> Quaternion
pub fn scale(&self, factor: f32) -> Quaternion
pub fn slerp(&self, b: &Quaternion, factor: f32) -> Quaternion
pub fn to_angle_vec3(&self) -> (f32, Vec3)
pub fn to_angles(&self) -> (f32, f32, f32)
pub fn to_matrix(&self) -> Matrix
pub fn to_radians(&self) -> (f32, f32, f32)
pub fn to_vec4(&self) -> Vec4
sourceimpl Quaternion
impl Quaternion
pub fn new(x: f32, y: f32, z: f32, w: f32) -> Self
pub fn from_angle_vec3(angle: f32, axis: &Vec3) -> Self
pub fn from_angles(deg_x: f32, deg_y: f32, deg_z: f32) -> Self
pub fn from_euler(e: &Euler) -> Self
pub fn from_matrix(m: &Matrix) -> Self
pub fn from_radians(rad_x: f32, rad_y: f32, rad_z: f32) -> Self
pub fn from_vec4(src: &Vec4) -> Self
pub fn new_identity() -> Self
pub fn x(&self) -> f32
pub fn y(&self) -> f32
pub fn z(&self) -> f32
pub fn w(&self) -> f32
Trait Implementations
sourceimpl Clone for Quaternion
impl Clone for Quaternion
sourceimpl Debug for Quaternion
impl Debug for Quaternion
sourceimpl PartialEq<Quaternion> for Quaternion
impl PartialEq<Quaternion> for Quaternion
sourceimpl StaticType for Quaternion
impl StaticType for Quaternion
sourcefn static_type() -> Type
fn static_type() -> Type
Returns the type identifier of Self
.
impl Copy for Quaternion
impl Eq for Quaternion
Auto Trait Implementations
impl RefUnwindSafe for Quaternion
impl Send for Quaternion
impl Sync for Quaternion
impl Unpin for Quaternion
impl UnwindSafe for Quaternion
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> StaticTypeExt for T where
T: StaticType,
impl<T> StaticTypeExt for T where
T: StaticType,
sourcefn ensure_type()
fn ensure_type()
Ensures that the type has been registered with the type system.
sourceimpl<T> ToClosureReturnValue for T where
T: ToValue,
impl<T> ToClosureReturnValue for T where
T: ToValue,
fn to_closure_return_value(&self) -> Option<Value>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> ToSendValue for T where
T: Send + ToValue + ?Sized,
impl<T> ToSendValue for T where
T: Send + ToValue + ?Sized,
sourcefn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
Returns a SendValue
clone of self
.