diff --git a/src/geometry/dual_quaternion.rs b/src/geometry/dual_quaternion.rs index 7098e101f..d97499900 100644 --- a/src/geometry/dual_quaternion.rs +++ b/src/geometry/dual_quaternion.rs @@ -18,7 +18,10 @@ pub struct DualQuaternion { impl Default for DualQuaternion { fn default() -> Self { - Self::identity() + Self { + rot: Quaternion::default(), + trans: Quaternion::default(), + } } } diff --git a/src/geometry/dual_quaternion_ops.rs b/src/geometry/dual_quaternion_ops.rs index b6c5afaa4..13b880a67 100644 --- a/src/geometry/dual_quaternion_ops.rs +++ b/src/geometry/dual_quaternion_ops.rs @@ -5,6 +5,7 @@ * * (Assignment Operators) * + * DualQuaternion × Scalar * DualQuaternion × DualQuaternion * * --- @@ -33,3 +34,18 @@ where } } } + +impl Mul for DualQuaternion +where + N::Element: Scalar + SimdValue + SimdRealField, + DefaultAllocator: Allocator + Allocator, +{ + type Output = DualQuaternion; + + fn mul(self, rhs: N) -> Self::Output { + Self { + rot: self.rot * rhs, + trans: self.trans * rhs, + } + } +}