nalgebra/src/geometry
Terence dfb7b6af22 Don't panic ScLERPing UnitDualQuaternion with equal rotation
Solves #1013.

Previously, when screw-linearly interpolating two unit dual quaternions
that had an identical orientation, `try_sclerp` would return `None`, as
the operation would introduce a division-by-zero.

This PR splits out the cases where two unit dual quaternions have an
identical orientation from the cases where they have opposite
orientations. In the case where they have identical orientations, the
operation is well-defined, but the exponential parameterization could
not handle it without introducing NaNs. Therefore, the function detects
this case and simply defaults to linearly interpolating the
translational components and using one of the two inputs' rotation
components.

The case where the inputs have opposite rotations is now detected
separately using the dot product of the real (rotation) parts, which was
already being computed anyway.

Also introduces proptests for these specific scenarios, to avoid any
regression.
2021-10-28 00:02:20 -04:00
..
abstract_rotation.rs Rename generic parameter N -> T 2021-04-11 13:57:54 +02:00
dual_quaternion_construction.rs Remove the Copy requirement from SimdRealField. 2021-08-04 17:34:25 +02:00
dual_quaternion_conversion.rs Remove the Copy requirement from SimdRealField. 2021-08-04 17:34:25 +02:00
dual_quaternion_ops.rs Remove the Copy requirement from SimdRealField. 2021-08-04 17:34:25 +02:00
dual_quaternion.rs Don't panic ScLERPing UnitDualQuaternion with equal rotation 2021-10-28 00:02:20 -04:00
isometry_alias.rs Rename generic parameter N -> T 2021-04-11 13:57:54 +02:00
isometry_construction.rs Implement Default for most geometry types 2021-10-14 11:39:22 +02:00
isometry_conversion.rs Fix most clippy warnings 2021-06-18 09:45:37 +02:00
isometry_interpolation.rs Remove the Copy requirement from SimdRealField. 2021-08-04 17:34:25 +02:00
isometry_ops.rs Remove the Copy requirement from SimdRealField. 2021-08-04 17:34:25 +02:00
isometry_simba.rs Rename generic parameter N -> T 2021-04-11 13:57:54 +02:00
isometry.rs simplify Matrix::is_identity while also improving performance 2021-09-26 19:34:19 +03:00
mod.rs Re-armed scale_simba 2021-10-19 16:20:25 +02:00
op_macros.rs Mark as const-fn some constructors of Point, Translation, Quaternion 2021-04-12 10:32:17 +02:00
orthographic.rs Fix some clippy warnings 2021-08-28 12:05:21 -04:00
perspective.rs Remove the Copy requirement from SimdRealField. 2021-08-04 17:34:25 +02:00
point_alias.rs Define OPoint, a generic point with D: DimName 2021-06-26 18:39:20 +02:00
point_construction.rs Implement Default for most geometry types 2021-10-14 11:39:22 +02:00
point_conversion.rs Remove the Copy requirement from SimdRealField. 2021-08-04 17:34:25 +02:00
point_coordinates.rs Implement the single-allocator-trait approach. 2021-08-02 18:41:46 +02:00
point_ops.rs Implement the single-allocator-trait approach. 2021-08-02 18:41:46 +02:00
point_simba.rs Implement the single-allocator-trait approach. 2021-08-02 18:41:46 +02:00
point.rs Concise Debug impls 2021-09-12 10:56:25 -07:00
quaternion_construction.rs Fix conflicting Default impl for unit-quaternions. 2021-10-14 11:48:12 +02:00
quaternion_conversion.rs Remove the Copy requirement from SimdRealField. 2021-08-04 17:34:25 +02:00
quaternion_coordinates.rs Implement the single-allocator-trait approach. 2021-08-02 18:41:46 +02:00
quaternion_ops.rs Remove the Copy requirement from SimdRealField. 2021-08-04 17:34:25 +02:00
quaternion_simba.rs Rename generic parameter N -> T 2021-04-11 13:57:54 +02:00
quaternion.rs Concise Debug impls 2021-09-12 10:56:25 -07:00
reflection_alias.rs Add reflection alias. 2021-07-27 15:18:07 +02:00
reflection.rs Remove the Copy requirement from SimdRealField. 2021-08-04 17:34:25 +02:00
rotation_alias.rs Rename generic parameter N -> T 2021-04-11 13:57:54 +02:00
rotation_construction.rs Implement Default for most geometry types 2021-10-14 11:39:22 +02:00
rotation_conversion.rs Fix most clippy warnings 2021-06-18 09:45:37 +02:00
rotation_interpolation.rs Remove the Copy requirement from SimdRealField. 2021-08-04 17:34:25 +02:00
rotation_ops.rs Rename generic parameter N -> T 2021-04-11 13:57:54 +02:00
rotation_simba.rs Rename generic parameter N -> T 2021-04-11 13:57:54 +02:00
rotation_specialization.rs Improve clarity of Rotation doc comments 2021-08-28 09:09:53 -04:00
rotation.rs Concise Debug impls 2021-09-12 10:56:25 -07:00
scale_alias.rs Renamed all instances of Translation to Scale 2021-10-19 14:21:26 +02:00
scale_construction.rs Fixed cargo fmt 2021-10-19 16:18:25 +02:00
scale_conversion.rs Remove useless into_owned. 2021-10-25 09:57:58 +02:00
scale_coordinates.rs Update src/geometry/scale_coordinates.rs 2021-10-24 20:41:27 +02:00
scale_ops.rs Removed clippy suspicious_arithmetic_impl allow 2021-10-24 21:51:36 +02:00
scale_simba.rs Re-armed scale_simba 2021-10-19 16:20:25 +02:00
scale.rs Fixed missing curly bracket 2021-10-24 20:40:02 +02:00
similarity_alias.rs Rename generic parameter N -> T 2021-04-11 13:57:54 +02:00
similarity_construction.rs Implement Default for most geometry types 2021-10-14 11:39:22 +02:00
similarity_conversion.rs Fix most clippy warnings 2021-06-18 09:45:37 +02:00
similarity_ops.rs Remove the Copy requirement from SimdRealField. 2021-08-04 17:34:25 +02:00
similarity_simba.rs Rename generic parameter N -> T 2021-04-11 13:57:54 +02:00
similarity.rs simplify Matrix::is_identity while also improving performance 2021-09-26 19:34:19 +03:00
swizzle.rs Remove the Copy requirement from SimdRealField. 2021-08-04 17:34:25 +02:00
transform_alias.rs Rename generic parameter N -> T 2021-04-11 13:57:54 +02:00
transform_construction.rs Implement Default for most geometry types 2021-10-14 11:39:22 +02:00
transform_conversion.rs Rename generic parameter N -> T 2021-04-11 13:57:54 +02:00
transform_ops.rs Remove the Copy requirement from SimdRealField. 2021-08-04 17:34:25 +02:00
transform_simba.rs Rename generic parameter N -> T 2021-04-11 13:57:54 +02:00
transform.rs Concise Debug impls 2021-09-12 10:56:25 -07:00
translation_alias.rs Rename generic parameter N -> T 2021-04-11 13:57:54 +02:00
translation_construction.rs Implement Default for most geometry types 2021-10-14 11:39:22 +02:00
translation_conversion.rs Remove the Copy requirement from SimdRealField. 2021-08-04 17:34:25 +02:00
translation_coordinates.rs Implement the single-allocator-trait approach. 2021-08-02 18:41:46 +02:00
translation_ops.rs Mark as const-fn some constructors of Point, Translation, Quaternion 2021-04-12 10:32:17 +02:00
translation_simba.rs Rename generic parameter N -> T 2021-04-11 13:57:54 +02:00
translation.rs Concise Debug impls 2021-09-12 10:56:25 -07:00
unit_complex_construction.rs Implement Default for most geometry types 2021-10-14 11:39:22 +02:00
unit_complex_conversion.rs Remove the Copy requirement from SimdRealField. 2021-08-04 17:34:25 +02:00
unit_complex_ops.rs Remove the Copy requirement from SimdRealField. 2021-08-04 17:34:25 +02:00
unit_complex_simba.rs Rename generic parameter N -> T 2021-04-11 13:57:54 +02:00
unit_complex.rs simplify Matrix::is_identity while also improving performance 2021-09-26 19:34:19 +03:00