pub struct QArray<F>where
F: Float,{ /* private fields */ }Expand description
Trait Implementations§
Source§impl<D: Deref<Target = [f32; 4]>> AddAssign<D> for &mut QArray<f32>
impl<D: Deref<Target = [f32; 4]>> AddAssign<D> for &mut QArray<f32>
Source§fn add_assign(&mut self, other: D)
fn add_assign(&mut self, other: D)
Performs the
+= operation. Read moreSource§impl<D: Deref<Target = [f64; 4]>> AddAssign<D> for &mut QArray<f64>
impl<D: Deref<Target = [f64; 4]>> AddAssign<D> for &mut QArray<f64>
Source§fn add_assign(&mut self, other: D)
fn add_assign(&mut self, other: D)
Performs the
+= operation. Read moreSource§impl<D: Deref<Target = [f32; 4]>> AddAssign<D> for QArray<f32>
impl<D: Deref<Target = [f32; 4]>> AddAssign<D> for QArray<f32>
Source§fn add_assign(&mut self, other: D)
fn add_assign(&mut self, other: D)
Performs the
+= operation. Read moreSource§impl<D: Deref<Target = [f64; 4]>> AddAssign<D> for QArray<f64>
impl<D: Deref<Target = [f64; 4]>> AddAssign<D> for QArray<f64>
Source§fn add_assign(&mut self, other: D)
fn add_assign(&mut self, other: D)
Performs the
+= operation. Read moreSource§impl<'de> Deserialize<'de> for QArray<f32>
impl<'de> Deserialize<'de> for QArray<f32>
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<'de> Deserialize<'de> for QArray<f64>
impl<'de> Deserialize<'de> for QArray<f64>
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<'a> DivAssign<&'a f32> for QArray<f32>
impl<'a> DivAssign<&'a f32> for QArray<f32>
Source§fn div_assign(&mut self, other: &'a f32)
fn div_assign(&mut self, other: &'a f32)
Performs the
/= operation. Read moreSource§impl<'a> DivAssign<&'a f64> for QArray<f64>
impl<'a> DivAssign<&'a f64> for QArray<f64>
Source§fn div_assign(&mut self, other: &'a f64)
fn div_assign(&mut self, other: &'a f64)
Performs the
/= operation. Read moreSource§impl DivAssign<f32> for QArray<f32>
impl DivAssign<f32> for QArray<f32>
Source§fn div_assign(&mut self, other: f32)
fn div_assign(&mut self, other: f32)
Performs the
/= operation. Read moreSource§impl DivAssign<f64> for QArray<f64>
impl DivAssign<f64> for QArray<f64>
Source§fn div_assign(&mut self, other: f64)
fn div_assign(&mut self, other: f64)
Performs the
/= operation. Read moreSource§impl DivAssign for QArray<f32>
impl DivAssign for QArray<f32>
Source§fn div_assign(&mut self, other: Self)
fn div_assign(&mut self, other: Self)
Performs the
/= operation. Read moreSource§impl DivAssign for QArray<f64>
impl DivAssign for QArray<f64>
Source§fn div_assign(&mut self, other: Self)
fn div_assign(&mut self, other: Self)
Performs the
/= operation. Read moreSource§impl<'a> MulAssign<&'a f32> for QArray<f32>
impl<'a> MulAssign<&'a f32> for QArray<f32>
Source§fn mul_assign(&mut self, other: &'a f32)
fn mul_assign(&mut self, other: &'a f32)
Performs the
*= operation. Read moreSource§impl<'a> MulAssign<&'a f64> for QArray<f64>
impl<'a> MulAssign<&'a f64> for QArray<f64>
Source§fn mul_assign(&mut self, other: &'a f64)
fn mul_assign(&mut self, other: &'a f64)
Performs the
*= operation. Read moreSource§impl MulAssign<f32> for QArray<f32>
impl MulAssign<f32> for QArray<f32>
Source§fn mul_assign(&mut self, other: f32)
fn mul_assign(&mut self, other: f32)
Performs the
*= operation. Read moreSource§impl MulAssign<f64> for QArray<f64>
impl MulAssign<f64> for QArray<f64>
Source§fn mul_assign(&mut self, other: f64)
fn mul_assign(&mut self, other: f64)
Performs the
*= operation. Read moreSource§impl MulAssign for QArray<f32>
impl MulAssign for QArray<f32>
Source§fn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
Performs the
*= operation. Read moreSource§impl MulAssign for QArray<f64>
impl MulAssign for QArray<f64>
Source§fn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
Performs the
*= operation. Read moreSource§impl Quaternion<f32> for QArray<f32>
impl Quaternion<f32> for QArray<f32>
Source§fn of_rotation3<M>(rotation: &M) -> Self
fn of_rotation3<M>(rotation: &M) -> Self
Find the quaternion of a Matrix3 assuming it is purely a rotation
Source§fn set_rotation3<M>(&self, matrix3: &mut M)
fn set_rotation3<M>(&self, matrix3: &mut M)
Set a Matrix3 to be the rotation matrix corresponding to the unit quaternion
Source§fn set_rotation4<M>(&self, matrix: &mut M)
fn set_rotation4<M>(&self, matrix: &mut M)
Set a Matrix4 to be the rotation matrix corresponding to the unit quaternion
Source§fn of_axis_angle(axis: &[F; 3], angle: F) -> Self
fn of_axis_angle(axis: &[F; 3], angle: F) -> Self
Create a unit quaternion for a rotation of an angle about an axis
Source§fn look_at(dirn: &[F; 3], up: &[F; 3]) -> Self
fn look_at(dirn: &[F; 3], up: &[F; 3]) -> 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: &[F; 3], b: &[F; 3]) -> Self
fn rotation_of_vec_to_vec(a: &[F; 3], b: &[F; 3]) -> 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<A: Into<[F; 4]>, I: Iterator<Item = (F, A)>>(
value_iter: I,
) -> Self
fn weighted_average_many<A: Into<[F; 4]>, I: Iterator<Item = (F, A)>>( value_iter: I, ) -> Self
Calculate the weighted average of many unit quaternions Read more
Source§fn as_axis_angle<V: From<[F; 3]>>(&self) -> (V, F)
fn as_axis_angle<V: From<[F; 3]>>(&self) -> (V, F)
Find the axis and angle of rotation for a (non-unit) quaternion
Source§fn mix(self, other: &[F; 4], t: F) -> Self
fn mix(self, other: &[F; 4], 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 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§fn normalize(self) -> Self
fn normalize(self) -> Self
Normalize the quaternion; if its length is close to zero, then set it to be zero
Source§impl Quaternion<f64> for QArray<f64>
impl Quaternion<f64> for QArray<f64>
Source§fn of_rotation3<M>(rotation: &M) -> Self
fn of_rotation3<M>(rotation: &M) -> Self
Find the quaternion of a Matrix3 assuming it is purely a rotation
Source§fn set_rotation3<M>(&self, matrix3: &mut M)
fn set_rotation3<M>(&self, matrix3: &mut M)
Set a Matrix3 to be the rotation matrix corresponding to the unit quaternion
Source§fn set_rotation4<M>(&self, matrix: &mut M)
fn set_rotation4<M>(&self, matrix: &mut M)
Set a Matrix4 to be the rotation matrix corresponding to the unit quaternion
Source§fn of_axis_angle(axis: &[F; 3], angle: F) -> Self
fn of_axis_angle(axis: &[F; 3], angle: F) -> Self
Create a unit quaternion for a rotation of an angle about an axis
Source§fn look_at(dirn: &[F; 3], up: &[F; 3]) -> Self
fn look_at(dirn: &[F; 3], up: &[F; 3]) -> 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: &[F; 3], b: &[F; 3]) -> Self
fn rotation_of_vec_to_vec(a: &[F; 3], b: &[F; 3]) -> 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<A: Into<[F; 4]>, I: Iterator<Item = (F, A)>>(
value_iter: I,
) -> Self
fn weighted_average_many<A: Into<[F; 4]>, I: Iterator<Item = (F, A)>>( value_iter: I, ) -> Self
Calculate the weighted average of many unit quaternions Read more
Source§fn as_axis_angle<V: From<[F; 3]>>(&self) -> (V, F)
fn as_axis_angle<V: From<[F; 3]>>(&self) -> (V, F)
Find the axis and angle of rotation for a (non-unit) quaternion
Source§fn mix(self, other: &[F; 4], t: F) -> Self
fn mix(self, other: &[F; 4], 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 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§fn normalize(self) -> Self
fn normalize(self) -> Self
Normalize the quaternion; if its length is close to zero, then set it to be zero
Source§impl<D: Deref<Target = [f32; 4]>> SubAssign<D> for &mut QArray<f32>
impl<D: Deref<Target = [f32; 4]>> SubAssign<D> for &mut QArray<f32>
Source§fn sub_assign(&mut self, other: D)
fn sub_assign(&mut self, other: D)
Performs the
-= operation. Read moreSource§impl<D: Deref<Target = [f64; 4]>> SubAssign<D> for &mut QArray<f64>
impl<D: Deref<Target = [f64; 4]>> SubAssign<D> for &mut QArray<f64>
Source§fn sub_assign(&mut self, other: D)
fn sub_assign(&mut self, other: D)
Performs the
-= operation. Read moreSource§impl<D: Deref<Target = [f32; 4]>> SubAssign<D> for QArray<f32>
impl<D: Deref<Target = [f32; 4]>> SubAssign<D> for QArray<f32>
Source§fn sub_assign(&mut self, other: D)
fn sub_assign(&mut self, other: D)
Performs the
-= operation. Read moreSource§impl<D: Deref<Target = [f64; 4]>> SubAssign<D> for QArray<f64>
impl<D: Deref<Target = [f64; 4]>> SubAssign<D> for QArray<f64>
Source§fn sub_assign(&mut self, other: D)
fn sub_assign(&mut self, other: D)
Performs the
-= operation. Read moreSource§impl Transform<f32, FArray<f32, 3>, QArray<f32>> for FQArrayTrans<f32>
impl Transform<f32, FArray<f32, 3>, QArray<f32>> for FQArrayTrans<f32>
Source§impl Transform<f64, FArray<f64, 3>, QArray<f64>> for FQArrayTrans<f64>
impl Transform<f64, FArray<f64, 3>, QArray<f64>> for FQArrayTrans<f64>
impl<F> Copy for QArray<F>
impl<F> StructuralPartialEq for QArray<F>where
F: Float,
Auto Trait Implementations§
impl<F> Freeze for QArray<F>where
F: Freeze,
impl<F> RefUnwindSafe for QArray<F>where
F: RefUnwindSafe,
impl<F> Send for QArray<F>where
F: Send,
impl<F> Sync for QArray<F>where
F: Sync,
impl<F> Unpin for QArray<F>where
F: Unpin,
impl<F> UnwindSafe for QArray<F>where
F: UnwindSafe,
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