Mint Euler angles
This commit is contained in:
parent
b0127ab5dc
commit
ce2063c191
|
@ -177,8 +177,8 @@ impl<N, S> From<mint::Quaternion<N>> for QuaternionBase<N, S>
|
|||
where
|
||||
N: Real,
|
||||
S: OwnedStorage<N, U4, U1>,
|
||||
S::Alloc: OwnedAllocator<N, U4, U1, S>,
|
||||
{
|
||||
S::Alloc: OwnedAllocator<N, U4, U1, S> {
|
||||
|
||||
fn from(q: mint::Quaternion<N>) -> Self {
|
||||
QuaternionBase::new(q.s, q.v.x, q.v.y, q.v.z)
|
||||
}
|
||||
|
|
|
@ -22,7 +22,9 @@ use geometry::{Point, Translation, Rotation, UnitQuaternion, UnitComplex, Isomet
|
|||
* Rotation -> Similarity
|
||||
* Rotation -> Transform
|
||||
* Rotation -> Matrix (homogeneous)
|
||||
*/
|
||||
* mint::EulerAngles -> RotationBase
|
||||
|
||||
*/
|
||||
|
||||
|
||||
impl<N1, N2, D: DimName> SubsetOf<Rotation<N2, D>> for Rotation<N1, D>
|
||||
|
@ -201,3 +203,14 @@ impl<N1, N2, D> SubsetOf<MatrixN<N2, DimNameSum<D, U1>>> for Rotation<N1, D>
|
|||
Self::from_matrix_unchecked(::convert_unchecked(r.into_owned()))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "mint")]
|
||||
impl<N, S> From<mint::EulerAngles<N, mint::IntraXYZ>> for RotationBase<N, U3, S>
|
||||
where N: Real,
|
||||
S: OwnedStorage<N, U3, U3>,
|
||||
S::Alloc: OwnedAllocator<N, U3, U3, S> {
|
||||
|
||||
fn from(euler: mint::EulerAngles<N, mint::IntraXYZ>) -> Self {
|
||||
Self::from_euler_angles(euler.a, euler.b, euler.c)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue