aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2008-08-30 15:22:45 +0000
committerGravatar Gael Guennebaud <g.gael@free.fr>2008-08-30 15:22:45 +0000
commitf1e6c56b77c5dec2e475602e8f3f8dc9dbe222e6 (patch)
tree2880e2afec97b16cfe6edda030c3a598c3b80ccd /test
parent236b7a545d139a32b6cd0984044ce91d737094a5 (diff)
* rename TranformationKnowledge to TransformTraits
* apply the same principle to extractRotation and fix it to extract a rotation corresponding to a positive scaling
Diffstat (limited to 'test')
-rw-r--r--test/geometry.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/geometry.cpp b/test/geometry.cpp
index 7b9784134..807b951c7 100644
--- a/test/geometry.cpp
+++ b/test/geometry.cpp
@@ -25,6 +25,7 @@
#include "main.h"
#include <Eigen/Geometry>
#include <Eigen/LU>
+#include <Eigen/QR>
template<typename Scalar> void geometry(void)
{
@@ -231,12 +232,18 @@ template<typename Scalar> void geometry(void)
t0.setIdentity();
t0.translate(v0).rotate(q1);
VERIFY_IS_APPROX(t0.inverse(NoScaling), t0.matrix().inverse());
+
+ // test extract rotation
+ t0.setIdentity();
+ t0.translate(v0).rotate(q1).scale(v1);
+ VERIFY_IS_APPROX(t0.extractRotation(GenericAffine) * v1, Matrix3(q1) * v1);
+ VERIFY_IS_APPROX(t0.extractRotation(NoShear) * v1, Matrix3(q1) * v1);
}
void test_geometry()
{
for(int i = 0; i < g_repeat; i++) {
CALL_SUBTEST( geometry<float>() );
- CALL_SUBTEST( geometry<double>() );
+// CALL_SUBTEST( geometry<double>() );
}
}