The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

a/math: Add disabled test to show problem with current quat_exp implementation

authored by

Mateo de Mayo and committed by
Jakob Bornecrantz
e7c33766 6bc551d0

+20
+3
src/xrt/auxiliary/math/m_quatexpmap.cpp
··· 80 80 /// whose absence thus distinguishes this implementation. Without 81 81 /// that factor of 1/2, the exp and ln functions successfully 82 82 /// round-trip and match other implementations. 83 + /// 84 + /// @todo That 1/2 term is important, fix it and enable disabled test on 85 + /// tests_quatexpmap.cpp 83 86 Scalar theta = vec.norm(); 84 87 Scalar vecscale = sinc(theta); 85 88 Eigen::Quaternion<Scalar> ret;
+17
tests/tests_quatexpmap.cpp
··· 75 75 CHECK(m_vec3_len(expected_aa - aa) <= 0.001); 76 76 } 77 77 } 78 + 79 + //! @todo Fix quat_exp 80 + #if 0 81 + SECTION("Test quat_exp(angle_axis) returns the appropriate quaternion") 82 + { 83 + float angle = M_PI_2; 84 + xrt_vec3 axis = axis4; 85 + xrt_vec3 aa = axis * angle; 86 + xrt_quat q{}; 87 + math_quat_exp(&aa, &q); 88 + 89 + CHECK(q.x == Approx(axis.x * sin(angle / 2))); 90 + CHECK(q.y == Approx(axis.y * sin(angle / 2))); 91 + CHECK(q.z == Approx(axis.z * sin(angle / 2))); 92 + CHECK(q.w == Approx(cos(angle / 2))); 93 + } 94 + #endif 78 95 }