pub struct QArray<F, V3, V4>where
F: Float,
V3: Vector<F, 3>,
V4: Vector<F, 4>,{ /* private fields */ }
Expand description
Implementations§
Trait Implementations§
source§impl<F, V3, V4> Add<F> for QArray<F, V3, V4>where
F: Float,
V3: Vector<F, { _ }>,
V4: Vector<F, { _ }>,
impl<F, V3, V4> Add<F> for QArray<F, V3, V4>where F: Float, V3: Vector<F, { _ }>, V4: Vector<F, { _ }>,
source§impl<F, V3, V4> Add<QArray<F, V3, V4>> for QArray<F, V3, V4>where
F: Float,
V3: Vector<F, { _ }>,
V4: Vector<F, { _ }>,
impl<F, V3, V4> Add<QArray<F, V3, V4>> for QArray<F, V3, V4>where F: Float, V3: Vector<F, { _ }>, V4: Vector<F, { _ }>,
source§impl<F, V3, V4> AddAssign<F> for QArray<F, V3, V4>where
F: Float,
V3: Vector<F, { _ }>,
V4: Vector<F, { _ }>,
impl<F, V3, V4> AddAssign<F> for QArray<F, V3, V4>where F: Float, V3: Vector<F, { _ }>, V4: Vector<F, { _ }>,
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<QArray<F, V3, V4>> for QArray<F, V3, V4>where
F: Float,
V3: Vector<F, { _ }>,
V4: Vector<F, { _ }>,
impl<F, V3, V4> AddAssign<QArray<F, V3, V4>> for QArray<F, V3, V4>where F: Float, V3: Vector<F, { _ }>, V4: Vector<F, { _ }>,
source§fn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the
+=
operation. Read moresource§impl<F, V3, V4> AsMut<[F]> for QArray<F, V3, V4>where
F: Float,
V3: Vector<F, 3>,
V4: Vector<F, 4>,
impl<F, V3, V4> AsMut<[F]> for QArray<F, V3, V4>where F: Float, V3: Vector<F, 3>, V4: Vector<F, 4>,
source§impl<F, V3, V4> AsMut<[F; 4]> for QArray<F, V3, V4>where
F: Float,
V3: Vector<F, 3>,
V4: Vector<F, 4>,
impl<F, V3, V4> AsMut<[F; 4]> for QArray<F, V3, V4>where F: Float, V3: Vector<F, 3>, V4: Vector<F, 4>,
source§impl<F, V3, V4> AsRef<[F]> for QArray<F, V3, V4>where
F: Float,
V3: Vector<F, 3>,
V4: Vector<F, 4>,
impl<F, V3, V4> AsRef<[F]> for QArray<F, V3, V4>where F: Float, V3: Vector<F, 3>, V4: Vector<F, 4>,
source§impl<F, V3, V4> AsRef<[F; 4]> for QArray<F, V3, V4>where
F: Float,
V3: Vector<F, 3>,
V4: Vector<F, 4>,
impl<F, V3, V4> AsRef<[F; 4]> for QArray<F, V3, V4>where F: Float, V3: Vector<F, 3>, V4: Vector<F, 4>,
source§impl<F, V3, V4> Clone for QArray<F, V3, V4>where
F: Float + Clone,
V3: Vector<F, 3> + Clone,
V4: Vector<F, 4> + Clone,
impl<F, V3, V4> Clone for QArray<F, V3, V4>where F: Float + Clone, V3: Vector<F, 3> + Clone, V4: Vector<F, 4> + Clone,
source§impl<F, V3, V4> Debug for QArray<F, V3, V4>where
F: Float + Debug,
V3: Vector<F, 3> + Debug,
V4: Vector<F, 4> + Debug,
impl<F, V3, V4> Debug for QArray<F, V3, V4>where F: Float + Debug, V3: Vector<F, 3> + Debug, V4: Vector<F, 4> + Debug,
source§impl<F, V3, V4> Default for QArray<F, V3, V4>where
F: Float,
V3: Vector<F, 3>,
V4: Vector<F, 4>,
impl<F, V3, V4> Default for QArray<F, V3, V4>where F: Float, V3: Vector<F, 3>, V4: Vector<F, 4>,
source§impl<'de, F, V3, V4> Deserialize<'de> for QArray<F, V3, V4>where
F: Float + Deserialize<'de>,
V3: Vector<F, 3>,
V4: Vector<F, 4> + Deserialize<'de>,
impl<'de, F, V3, V4> Deserialize<'de> for QArray<F, V3, V4>where F: Float + Deserialize<'de>, V3: Vector<F, 3>, V4: Vector<F, 4> + Deserialize<'de>,
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> Display for QArray<F, V3, V4>where
F: Float,
V3: Vector<F, 3>,
V4: Vector<F, 4>,
impl<F, V3, V4> Display for QArray<F, V3, V4>where F: Float, V3: Vector<F, 3>, V4: Vector<F, 4>,
source§impl<F, V3, V4> Div<F> for QArray<F, V3, V4>where
F: Float,
V3: Vector<F, { _ }>,
V4: Vector<F, { _ }>,
impl<F, V3, V4> Div<F> for QArray<F, V3, V4>where F: Float, V3: Vector<F, { _ }>, V4: Vector<F, { _ }>,
source§impl<F, V3, V4> Div<QArray<F, V3, V4>> for QArray<F, V3, V4>where
F: Float,
V3: Vector<F, 3>,
V4: Vector<F, 4>,
impl<F, V3, V4> Div<QArray<F, V3, V4>> for QArray<F, V3, V4>where F: Float, V3: Vector<F, 3>, V4: Vector<F, 4>,
source§impl<F, V3, V4> DivAssign<F> for QArray<F, V3, V4>where
F: Float,
V3: Vector<F, { _ }>,
V4: Vector<F, { _ }>,
impl<F, V3, V4> DivAssign<F> for QArray<F, V3, V4>where F: Float, V3: Vector<F, { _ }>, V4: Vector<F, { _ }>,
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<QArray<F, V3, V4>> for QArray<F, V3, V4>where
F: Float,
V3: Vector<F, 3>,
V4: Vector<F, 4>,
impl<F, V3, V4> DivAssign<QArray<F, V3, V4>> for QArray<F, V3, V4>where F: Float, V3: Vector<F, 3>, V4: Vector<F, 4>,
source§fn div_assign(&mut self, other: Self)
fn div_assign(&mut self, other: Self)
Performs the
/=
operation. Read moresource§impl<F, V3, V4> From<[F; 4]> for QArray<F, V3, V4>where
F: Float,
V3: Vector<F, 3>,
V4: Vector<F, 4>,
impl<F, V3, V4> From<[F; 4]> for QArray<F, V3, V4>where F: Float, V3: Vector<F, 3>, V4: Vector<F, 4>,
source§impl<F, V3, V4> From<QArray<F, V3, V4>> for [F; 4]where
F: Float,
V3: Vector<F, 3>,
V4: Vector<F, 4>,
impl<F, V3, V4> From<QArray<F, V3, V4>> for [F; 4]where F: Float, V3: Vector<F, 3>, V4: Vector<F, 4>,
source§impl<F, V3, V4> Index<usize> for QArray<F, V3, V4>where
F: Float,
V3: Vector<F, 3>,
V4: Vector<F, 4>,
impl<F, V3, V4> Index<usize> for QArray<F, V3, V4>where F: Float, V3: Vector<F, 3>, V4: Vector<F, 4>,
source§impl<F, V3, V4> IndexMut<usize> for QArray<F, V3, V4>where
F: Float,
V3: Vector<F, 3>,
V4: Vector<F, 4>,
impl<F, V3, V4> IndexMut<usize> for QArray<F, V3, V4>where F: Float, V3: Vector<F, 3>, V4: Vector<F, 4>,
source§impl<F, V3, V4> Mul<F> for QArray<F, V3, V4>where
F: Float,
V3: Vector<F, { _ }>,
V4: Vector<F, { _ }>,
impl<F, V3, V4> Mul<F> for QArray<F, V3, V4>where F: Float, V3: Vector<F, { _ }>, V4: Vector<F, { _ }>,
source§impl<F, V3, V4> Mul<QArray<F, V3, V4>> for QArray<F, V3, V4>where
F: Float,
V3: Vector<F, 3>,
V4: Vector<F, 4>,
impl<F, V3, V4> Mul<QArray<F, V3, V4>> for QArray<F, V3, V4>where F: Float, V3: Vector<F, 3>, V4: Vector<F, 4>,
source§impl<F, V3, V4> MulAssign<F> for QArray<F, V3, V4>where
F: Float,
V3: Vector<F, { _ }>,
V4: Vector<F, { _ }>,
impl<F, V3, V4> MulAssign<F> for QArray<F, V3, V4>where F: Float, V3: Vector<F, { _ }>, V4: Vector<F, { _ }>,
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<QArray<F, V3, V4>> for QArray<F, V3, V4>where
F: Float,
V3: Vector<F, 3>,
V4: Vector<F, 4>,
impl<F, V3, V4> MulAssign<QArray<F, V3, V4>> for QArray<F, V3, V4>where F: Float, V3: Vector<F, 3>, V4: Vector<F, 4>,
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>where
F: Float,
V3: Vector<F, 3>,
V4: Vector<F, 4>,
impl<F, V3, V4> Quaternion<F, V3, V4> for QArray<F, V3, V4>where F: Float, V3: Vector<F, 3>, V4: Vector<F, 4>,
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> Serialize for QArray<F, V3, V4>where
F: Float + Serialize,
V3: Vector<F, 3>,
V4: Vector<F, 4> + Serialize,
impl<F, V3, V4> Serialize for QArray<F, V3, V4>where F: Float + Serialize, V3: Vector<F, 3>, V4: Vector<F, 4> + Serialize,
source§impl<F, V3, V4> Sub<F> for QArray<F, V3, V4>where
F: Float,
V3: Vector<F, { _ }>,
V4: Vector<F, { _ }>,
impl<F, V3, V4> Sub<F> for QArray<F, V3, V4>where F: Float, V3: Vector<F, { _ }>, V4: Vector<F, { _ }>,
source§impl<F, V3, V4> Sub<QArray<F, V3, V4>> for QArray<F, V3, V4>where
F: Float,
V3: Vector<F, { _ }>,
V4: Vector<F, { _ }>,
impl<F, V3, V4> Sub<QArray<F, V3, V4>> for QArray<F, V3, V4>where F: Float, V3: Vector<F, { _ }>, V4: Vector<F, { _ }>,
source§impl<F, V3, V4> SubAssign<F> for QArray<F, V3, V4>where
F: Float,
V3: Vector<F, { _ }>,
V4: Vector<F, { _ }>,
impl<F, V3, V4> SubAssign<F> for QArray<F, V3, V4>where F: Float, V3: Vector<F, { _ }>, V4: Vector<F, { _ }>,
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<QArray<F, V3, V4>> for QArray<F, V3, V4>where
F: Float,
V3: Vector<F, { _ }>,
V4: Vector<F, { _ }>,
impl<F, V3, V4> SubAssign<QArray<F, V3, V4>> for QArray<F, V3, V4>where F: Float, V3: Vector<F, { _ }>, V4: Vector<F, { _ }>,
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