Struct physx::math::PxQuat

source ·
#[repr(transparent)]
pub struct PxQuat { /* private fields */ }

Implementations§

source§

impl PxQuat

source

pub fn new(x: f32, y: f32, z: f32, w: f32) -> PxQuat

source

pub fn x(&self) -> f32

source

pub fn y(&self) -> f32

source

pub fn z(&self) -> f32

source

pub fn w(&self) -> f32

source

pub fn x_mut(&mut self) -> &mut f32

source

pub fn y_mut(&mut self) -> &mut f32

source

pub fn z_mut(&mut self) -> &mut f32

source

pub fn w_mut(&mut self) -> &mut f32

source

pub fn dot(&self, other: &PxQuat) -> f32

source

pub fn get_identity_angle(&self) -> f32

source

pub fn get_angle(&self, other: &PxQuat) -> f32

source

pub fn get_basis_vector_x(&self) -> PxVec3

source

pub fn get_basis_vector_y(&self) -> PxVec3

source

pub fn get_basis_vector_z(&self) -> PxVec3

source

pub fn get_conjugate(&self) -> PxQuat

source

pub fn get_imaginary_part(&self) -> PxVec3

source

pub fn get_normalized(&self) -> PxQuat

source

pub fn is_finite(&self) -> bool

source

pub fn is_identity(&self) -> bool

source

pub fn is_sane(&self) -> bool

source

pub fn is_unit(&self) -> bool

source

pub fn magnitude(&self) -> f32

source

pub fn magnitude_squared(&self) -> f32

source

pub fn normalize(&mut self) -> f32

Returns the magnitude of the quaternion before normalization.

source

pub fn rotate(&self, vector: &PxVec3) -> PxVec3

Rotates the vector.

source

pub fn rotate_inverse(&self, vector: &PxVec3) -> PxVec3

source

pub fn to_angle_axis(&self) -> (f32, PxVec3)

returns the angle in radians and a normalized axis vector

source

pub fn from_angle_axis(angle: f32, axis: PxVec3) -> PxQuat

Trait Implementations§

source§

impl Class<PxQuat> for PxQuat

source§

fn as_ptr(&self) -> *const PxQuat

Returns a raw const pointer to the wrapped type. Retrieving a raw pointer is safe. However, pretty much any use of a raw pointer is unsafe. In particular: this pointer should not be used to construct a second owning wrapper around the pointer.
source§

fn as_mut_ptr(&mut self) -> *mut PxQuat

Returns a raw mut pointer to the wrapped type. Retrieving a raw pointer is safe. However, pretty much any use of a raw pointer is unsafe. In particular: this pointer should not be used to construct a second owning wrapper around the pointer.
source§

impl Clone for PxQuat

source§

fn clone(&self) -> PxQuat

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Default for PxQuat

source§

fn default() -> PxQuat

Returns the “default value” for a type. Read more
source§

impl From<PxQuat> for PxQuat

source§

fn from(value: PxQuat) -> Self

Converts to this type from the input type.
source§

impl From<PxQuat> for PxQuat

source§

fn from(quat: PxQuat) -> Self

Converts to this type from the input type.
source§

impl Copy for PxQuat

source§

impl Send for PxQuat

source§

impl Sync for PxQuat

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.