Re: [eigen] Eigen2 in Avogadro

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Hi Casper,

here's the diff to port solidkreator to eigen2. only very very trivial
changes (the headers and  s/array/data)

gael.

On Mon, Aug 25, 2008 at 4:37 PM, C. Boemann <cbr@xxxxxxxxxx> wrote:
> On Monday 25 August 2008 16:32:27 jacob@xxxxxxxxxxxxxxx wrote:
>> > playground/solidcreator uses eigen1
>>
>> Hehe, this one is by Casper Boemann, one of the co-founders of Eigen.
>> He already asked me if I could port it to eigen2, but I had no time.
>> If you do it he would be very happy.
>
> Indeed :)
>
> I have some uncommited stuff though, so please give me a heads up on this
> list so I can commit first
>
>
>
Index: KreaViewer.cpp
===================================================================
--- KreaViewer.cpp	(revision 856242)
+++ KreaViewer.cpp	(working copy)
@@ -23,7 +23,7 @@
 #include "KreaViewer.h"
 #include "KreaCanvas.h"
 
-#include <eigen/vector.h>
+#include <Eigen/Core>
 #include <engine/Ray.h>
 #include <GL/glu.h>
 
Index: tools/KreaViewTool.h
===================================================================
--- tools/KreaViewTool.h	(revision 856242)
+++ tools/KreaViewTool.h	(working copy)
@@ -21,7 +21,7 @@
 #ifndef KREA_VIEW_TOOL_H
 #define KREA_VIEW_TOOL_H
 
-#include <eigen/vector.h>
+#include <Eigen/Core>
 
 #include <KreaTool.h>
 
Index: tools/LineTool.cpp
===================================================================
--- tools/LineTool.cpp	(revision 856242)
+++ tools/LineTool.cpp	(working copy)
@@ -23,7 +23,7 @@
 #include "KreaPointerEvent.h"
 #include "KreaCanvas.h"
 
-#include <eigen/vector.h>
+#include <Eigen/Core>
 #include "engine/Sketch.h"
 #include "engine/Line.h"
 
Index: tools/KreaViewTool.cpp
===================================================================
--- tools/KreaViewTool.cpp	(revision 856242)
+++ tools/KreaViewTool.cpp	(working copy)
@@ -19,7 +19,7 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#include <eigen/vector.h>
+#include <Eigen/Core>
 
 #include "KreaViewTool.h"
 #include "KreaPointerEvent.h"
Index: engine/Ray.h
===================================================================
--- engine/Ray.h	(revision 856242)
+++ engine/Ray.h	(working copy)
@@ -20,7 +20,7 @@
 #ifndef FREEPARAMETRIC_RAY_H
 #define FREEPARAMETRIC_RAY_H
 
-#include <eigen/vector.h>
+#include <Eigen/Core>
 
 namespace FreeParametric
 {
Index: engine/Sketch.h
===================================================================
--- engine/Sketch.h	(revision 856242)
+++ engine/Sketch.h	(working copy)
@@ -20,7 +20,7 @@
 #ifndef FREEPARAMETRIC_SKETCH_H
 #define FREEPARAMETRIC_SKETCH_H
 
-#include <eigen/vector.h>
+#include <Eigen/Core>
 
 namespace FreeParametric
 {
Index: engine/Line.cpp
===================================================================
--- engine/Line.cpp	(revision 856242)
+++ engine/Line.cpp	(working copy)
@@ -22,7 +22,7 @@
 #include <math.h>
 #include <GL/gl.h>
 #include <GL/glu.h>
-#include <eigen/vector.h>
+#include <Eigen/Core>
 
 #include <kdebug.h>
 
@@ -57,8 +57,8 @@
         // draw the scene:
     glBegin(GL_LINES);
     glColor3d(1,0,0);
-    glVertex3dv(d->startPosition.array());
-    glVertex3dv(d->endPosition.array());
+    glVertex3dv(d->startPosition.data());
+    glVertex3dv(d->endPosition.data());
     glEnd();
 }
 
Index: engine/Line.h
===================================================================
--- engine/Line.h	(revision 856242)
+++ engine/Line.h	(working copy)
@@ -20,7 +20,7 @@
 #ifndef FREEPARAMETRIC_LINE_H
 #define FREEPARAMETRIC_LINE_H
 
-#include <eigen/vector.h>
+#include <Eigen/Core>
 
 namespace FreeParametric
 {
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt	(revision 856242)
+++ CMakeLists.txt	(working copy)
@@ -6,12 +6,13 @@
 find_package(OpenGL REQUIRED)
 find_package(GLU REQUIRED)
 find_package(KDE4 REQUIRED)
-find_package(Eigen REQUIRED)
+find_package(Eigen2 REQUIRED)
 
 include_directories(${KDE4_INCLUDES})
 include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR})
 include_directories(${OPENGL_INCLUDE_DIR})
 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/tools)
+include_directories(${EIGEN2_INCLUDE_DIR})
 
     set(solidkreator_SRCS 
         main.cpp


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/