aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2008-12-19 16:31:22 +0000
committerGravatar Gael Guennebaud <g.gael@free.fr>2008-12-19 16:31:22 +0000
commitebf906a23a9c4a92f8ea3a8b783f0070ae3f87f3 (patch)
tree3c4e0971cc03c75ce75f161f5af4f6081da05f00 /test
parentdf4bd5e46f1a53e6283d7dbe592b05c2dd44a772 (diff)
add matrix * transform product
Diffstat (limited to 'test')
-rw-r--r--test/geometry.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/geometry.cpp b/test/geometry.cpp
index 9885380ca..8c0d3b688 100644
--- a/test/geometry.cpp
+++ b/test/geometry.cpp
@@ -180,7 +180,7 @@ template<typename Scalar> void geometry(void)
VERIFY_IS_APPROX(t0.prescale(a).matrix(), t1.prescale(Vector3::Constant(a)).matrix());
// More transform constructors, operator=, operator*=
-
+
Scalar a3 = ei_random<Scalar>(-M_PI, M_PI);
Vector3 v3 = Vector3::Random().normalized();
AngleAxisx aa3(a3, v3);
@@ -212,6 +212,9 @@ template<typename Scalar> void geometry(void)
t4 *= sv3;
VERIFY_IS_APPROX(t6.matrix(), t4.matrix());
+ // matrix * transform
+ VERIFY_IS_APPROX(Transform3(t3.matrix()*t4).matrix(), Transform3(t3*t4).matrix());
+
// chained Transform product
VERIFY_IS_APPROX(((t3*t4)*t5).matrix(), (t3*(t4*t5)).matrix());
@@ -220,8 +223,6 @@ template<typename Scalar> void geometry(void)
t5 = t5*t5;
VERIFY_IS_APPROX(t5, t4*t4);
-
-
// 2D transformation
Transform2 t20, t21;
Vector2 v20 = Vector2::Random();