BALL-Project / ball

The Biochemical Algorithms Library
GNU Lesser General Public License v2.1
72 stars 31 forks source link

Pt/eigen quaternions #648

Closed philthiel closed 6 years ago

philthiel commented 6 years ago

Proposed fix for #645 using the Eigen Quaternions as base class. This should keep the interface fixed.

philthiel commented 6 years ago

Update of Eigen3 required. Adding a more recent version to the contrib.

tkemmer commented 6 years ago

Also, Quaternion_test fails with

checking void toAxisAngle(TVector3<T>& axis, T& angle)... 
    (line 196 TEST_REAL_EQUAL(ang, a): got 2.28319, expected 4)  - 
    (line 197 TEST_REAL_EQUAL(v2.x, v1.x): got -0.267261, expected 0.267261)  - 
    (line 198 TEST_REAL_EQUAL(v2.y, v1.y): got -0.534523, expected 0.534522)  - 
    (line 199 TEST_REAL_EQUAL(v2.z, v1.z): got -0.801784, expected 0.801784)  - 
    FAILED
checking void toEulerAngles(T& yaw, T& pitch, T& roll)... passed
checking void get(TQuaternion& q) const... passed
checking T getAngle() const... 
    (line 220 TEST_REAL_EQUAL(q.getAngle(), a): got 2.28319, expected 4)  - 
    FAILED
checking TVector3<T> getAxis()... 
    (line 228 TEST_REAL_EQUAL(v2.x, v1.x): got -0.267261, expected 0.267261)  - 
    (line 229 TEST_REAL_EQUAL(v2.y, v1.y): got -0.534523, expected 0.534522)  - 
    (line 230 TEST_REAL_EQUAL(v2.z, v1.z): got -0.801784, expected 0.801784)  - 
    FAILED
tkemmer commented 6 years ago

Merged as 22b58c4a70da8fab2d1dce87371efcdfa29b0387...ec2c02301b42c5f72c7608ed858c3b6f0c3739a1