This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Eigen::Transform with custom scalar type -> Compile Error

Tags: None
(comma "," separated)
Waldfee
Registered Member
Posts
7
Karma
0
Hi,

I would like to place a custom scalar type in a Transform. However, I run into a compile error which I can fix by the following change.

Code: Select all
diff -r 0c5fc8f89361 Eigen/src/Geometry/Transform.h
--- a/Eigen/src/Geometry/Transform.h   Thu Jun 28 02:08:59 2012 +0200
+++ b/Eigen/src/Geometry/Transform.h   Thu Jun 28 11:13:35 2012 +0200
@@ -604,7 +604,7 @@
     if(int(Mode)!=int(AffineCompact))
     {
       matrix().template block<1,Dim>(Dim,0).setZero();
-      matrix().coeffRef(Dim,Dim) = 1;
+      matrix().coeffRef(Dim,Dim) = Scalar(1);
     }
   }


Any chance to get this integrated into the upstream code?
I guess that the operator=(const QMatrix& other) (line 709ff) would need a similar fix to support a custum scalar type (I'm compiling without Qt support).
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
patch applied, thank you.


Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot]