pub struct QArray<F, V3, V4>{ /* private fields */ }
Expand description
Implementations§
Trait Implementations§
source§impl<F, V3, V4> AddAssign<F> for QArray<F, V3, V4>
impl<F, V3, V4> AddAssign<F> for QArray<F, V3, V4>
source§fn add_assign(&mut self, other: F)
fn add_assign(&mut self, other: F)
Performs the
+=
operation. Read moresource§impl<F, V3, V4> AddAssign for QArray<F, V3, V4>
impl<F, V3, V4> AddAssign for QArray<F, V3, V4>
source§fn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the
+=
operation. Read moresource§impl<'de, F, V3, V4> Deserialize<'de> for QArray<F, V3, V4>
impl<'de, F, V3, V4> Deserialize<'de> for QArray<F, V3, V4>
source§fn deserialize<DE>(deserializer: DE) -> Result<Self, DE::Error>where
DE: Deserializer<'de>,
fn deserialize<DE>(deserializer: DE) -> Result<Self, DE::Error>where
DE: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<F, V3, V4> DivAssign<F> for QArray<F, V3, V4>
impl<F, V3, V4> DivAssign<F> for QArray<F, V3, V4>
source§fn div_assign(&mut self, other: F)
fn div_assign(&mut self, other: F)
Performs the
/=
operation. Read moresource§impl<F, V3, V4> DivAssign for QArray<F, V3, V4>
impl<F, V3, V4> DivAssign for QArray<F, V3, V4>
source§fn div_assign(&mut self, other: Self)
fn div_assign(&mut self, other: Self)
Performs the
/=
operation. Read moresource§impl<F, V3, V4> MulAssign<F> for QArray<F, V3, V4>
impl<F, V3, V4> MulAssign<F> for QArray<F, V3, V4>
source§fn mul_assign(&mut self, other: F)
fn mul_assign(&mut self, other: F)
Performs the
*=
operation. Read moresource§impl<F, V3, V4> MulAssign for QArray<F, V3, V4>
impl<F, V3, V4> MulAssign for QArray<F, V3, V4>
source§fn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
Performs the
*=
operation. Read moresource§impl<F, V3, V4> Quaternion<F, V3, V4> for QArray<F, V3, V4>
impl<F, V3, V4> Quaternion<F, V3, V4> for QArray<F, V3, V4>
source§fn of_rotation3<M>(rotation: &M) -> Selfwhere
M: SqMatrix<V3, F, 3, 9>,
fn of_rotation3<M>(rotation: &M) -> Selfwhere
M: SqMatrix<V3, F, 3, 9>,
Find the quaternion of a Matrix3 assuming it is purely a rotation
source§fn into_array(self) -> [F; 4]
fn into_array(self) -> [F; 4]
Create an array Float for the fquaternion in order i, j, k, r
source§fn as_rijk(&self) -> (F, F, F, F)
fn as_rijk(&self) -> (F, F, F, F)
Break out into r, i, j, k
source§fn mix(self, other: &Self, t: F) -> Self
fn mix(self, other: &Self, t: F) -> Self
Create a linear combination of this Quaternion and another using parameter
t
from zero to onesource§fn dot(self, other: &Self) -> F
fn dot(self, other: &Self) -> F
Return the dot product of two quaternions; basically used for length
source§fn set_rotation3<M>(&self, matrix: &mut M)where
M: SqMatrix<V3, F, 3, 9>,
fn set_rotation3<M>(&self, matrix: &mut M)where
M: SqMatrix<V3, F, 3, 9>,
Set a Matrix3 to be the rotation matrix corresponding to the unit quaternion
source§fn set_rotation4<M>(&self, matrix: &mut M)where
M: SqMatrix<V4, F, 4, 16>,
fn set_rotation4<M>(&self, matrix: &mut M)where
M: SqMatrix<V4, F, 4, 16>,
Set a Matrix4 to be the rotation matrix corresponding to the unit quaternion
source§fn of_axis_angle(axis: &V3, angle: F) -> Self
fn of_axis_angle(axis: &V3, angle: F) -> Self
Create a unit quaternion for a rotation of an angle about an axis
source§fn look_at(dirn: &V3, up: &V3) -> Self
fn look_at(dirn: &V3, up: &V3) -> Self
Create a quaternion that maps a unit V3 of dirn to (0,0,-1) and a unit V3 of up (if perpendicular to dirn) to (0,1,0)
source§fn rotation_of_vec_to_vec(a: &V3, b: &V3) -> Self
fn rotation_of_vec_to_vec(a: &V3, b: &V3) -> Self
Get a quaternion that is a rotation of one vector to another Read more
source§fn weighted_average_pair(&self, w_a: F, qb: &Self, w_b: F) -> Self
fn weighted_average_pair(&self, w_a: F, qb: &Self, w_b: F) -> Self
Calculate the weighted average of two unit quaternions Read more
source§fn weighted_average_many<I: Iterator<Item = (F, Self)>>(value_iter: I) -> Self
fn weighted_average_many<I: Iterator<Item = (F, Self)>>(value_iter: I) -> Self
Calculate the weighted average of many unit quaternions Read more
source§fn as_axis_angle(&self) -> (V3, F)
fn as_axis_angle(&self) -> (V3, F)
Find the axis and angle of rotation for a (non-unit) quaternion
source§fn distance_sq(&self, other: &Self) -> F
fn distance_sq(&self, other: &Self) -> F
Return the square of the distance between this quaternion and another
source§impl<F, V3, V4> SubAssign<F> for QArray<F, V3, V4>
impl<F, V3, V4> SubAssign<F> for QArray<F, V3, V4>
source§fn sub_assign(&mut self, other: F)
fn sub_assign(&mut self, other: F)
Performs the
-=
operation. Read moresource§impl<F, V3, V4> SubAssign for QArray<F, V3, V4>
impl<F, V3, V4> SubAssign for QArray<F, V3, V4>
source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Performs the
-=
operation. Read moresource§impl<F: Float + Serialize> Transform<F, FArray<F, 3>, FArray<F, 4>, FArray2<F, 4, 16>, QArray<F, FArray<F, 3>, FArray<F, 4>>> for FQArrayTrans<F>
impl<F: Float + Serialize> Transform<F, FArray<F, 3>, FArray<F, 4>, FArray2<F, 4, 16>, QArray<F, FArray<F, 3>, FArray<F, 4>>> for FQArrayTrans<F>
source§fn of_trs(
t: FArray<F, 3>,
r: QArray<F, FArray<F, 3>, FArray<F, 4>>,
s: F,
) -> Self
fn of_trs( t: FArray<F, 3>, r: QArray<F, FArray<F, 3>, FArray<F, 4>>, s: F, ) -> Self
Create an FQArrayTrans from a Vector3 translation, Quat rotation and Float scaling
source§fn translation(&self) -> FArray<F, 3>
fn translation(&self) -> FArray<F, 3>
Get the translation of the transformation
impl<F, V3, V4> Copy for QArray<F, V3, V4>
Auto Trait Implementations§
impl<F, V3, V4> Freeze for QArray<F, V3, V4>where
V4: Freeze,
impl<F, V3, V4> RefUnwindSafe for QArray<F, V3, V4>
impl<F, V3, V4> Send for QArray<F, V3, V4>
impl<F, V3, V4> Sync for QArray<F, V3, V4>
impl<F, V3, V4> Unpin for QArray<F, V3, V4>
impl<F, V3, V4> UnwindSafe for QArray<F, V3, V4>
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)