aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2009-09-19 19:59:49 -0400
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2009-09-19 19:59:49 -0400
commit1df54e3ac23780cd67c91c50f27052199902f81f (patch)
treead2ee88225691f15cd922968d42604effddb220f /test
parent828a79ac783001f7c4d56bd06ef221f31f32f2ba (diff)
fix bug #42, add missing Transform::Identity()
Diffstat (limited to 'test')
-rw-r--r--test/geo_transformations.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/geo_transformations.cpp b/test/geo_transformations.cpp
index 2b05f2457..23b297314 100644
--- a/test/geo_transformations.cpp
+++ b/test/geo_transformations.cpp
@@ -102,7 +102,14 @@ template<typename Scalar, int Mode> void transformations(void)
a = ei_random<Scalar>(-Scalar(0.4)*Scalar(M_PI), Scalar(0.4)*Scalar(M_PI));
q1 = AngleAxisx(a, v0.normalized());
Transform3 t0, t1, t2;
+
+ // first test setIdentity() and Identity()
t0.setIdentity();
+ VERIFY_IS_APPROX(t0.matrix(), Transform3::MatrixType::Identity());
+ t0.matrix().setZero();
+ t0 = Transform3::Identity();
+ VERIFY_IS_APPROX(t0.matrix(), Transform3::MatrixType::Identity());
+
t0.linear() = q1.toRotationMatrix();
t1.setIdentity();
t1.linear() = q1.toRotationMatrix();