[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdeartwork
From:       Christoph Feck <christoph () maxiom ! de>
Date:       2014-04-20 19:59:43
Message-ID: E1Wbxtv-0007Wv-FQ () scm ! kde ! org
[Download RAW message or body]

SVN commit 1384805 by cfeck:

Migrate screensavers from Eigen2 to Eigen3

Patch by Anton Gladky <gladk@debian.org>
See also http://bugs.debian.org/728325

BUG: 332397
FIXED-IN: 4.14


 A             cmake/modules/FindEigen3.cmake  
 M  +6 -5      kscreensaver/kdesavers/CMakeLists.txt  
 M  +1 -1      kscreensaver/kdesavers/pendulum.cpp  
 M  +1 -1      kscreensaver/kdesavers/rkodesolver.h  
 M  +5 -5      kscreensaver/kdesavers/rotation.cpp  
 M  +1 -1      kscreensaver/kdesavers/rotation.h  


--- trunk/KDE/kdeartwork/kscreensaver/kdesavers/CMakeLists.txt #1384804:1384805
@@ -1,5 +1,6 @@
-macro_optional_find_package(Eigen2)
-macro_log_feature(EIGEN2_FOUND "Eigen2" "A C++ template library for linear algebra" \
"kdesupport" FALSE "" "Needed to build the krotation and kpendulum screensavers" ) \
+macro_optional_find_package(Eigen3) +macro_log_feature(EIGEN3_FOUND "Eigen3" "A C++ \
template library for linear algebra" "kdesupport" FALSE "" "Needed to build the \
krotation and kpendulum screensavers" ) +add_definitions(-DEIGEN2_SUPPORT)
 
 macro_optional_find_package(Kexiv2)
 macro_log_feature(KEXIV2_FOUND "Kexiv2" "A C++ library for exiv manipulation" \
"kdegraphics" FALSE "" "Needed to rotate photos with exif data" ) @@ -146,8 +147,8 @@
 if(OPENGL_FOUND AND OPENGL_GLU_FOUND AND QT_QTOPENGL_LIBRARY)
 
   ## krotation, kpendulum need Eigen2
-  if (EIGEN2_FOUND)
-    include_directories(${EIGEN2_INCLUDE_DIR})
+  if (EIGEN3_FOUND)
+    include_directories(${EIGEN3_INCLUDE_DIR})
 
     set(krotation.kss_SRCS rotation.cpp sspreviewarea.cpp)
     kde4_add_ui_files(krotation.kss_SRCS rotationcfg.ui)
@@ -160,7 +161,7 @@
     kde4_add_executable(kpendulum.kss ${kpendulum.kss_SRCS})
     target_link_libraries(kpendulum.kss ${KDE4_KDEUI_LIBS} ${QT_QTOPENGL_LIBRARY} \
${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${KDE4WORKSPACE_KSCREENSAVER_LIBRARY})  \
                install(TARGETS kpendulum.kss ${INSTALL_TARGETS_DEFAULT_ARGS})
-  endif (EIGEN2_FOUND)
+  endif (EIGEN3_FOUND)
 
   set(ksolarwinds.kss_SRCS SolarWinds.cpp )
   kde4_add_executable(ksolarwinds.kss ${ksolarwinds.kss_SRCS})
--- trunk/KDE/kdeartwork/kscreensaver/kdesavers/pendulum.cpp #1384804:1384805
@@ -45,7 +45,7 @@
 #include <Eigen/Core>
 #include <Eigen/Geometry>
 // import most common Eigen types
-USING_PART_OF_NAMESPACE_EIGEN
+using namespace Eigen;
 
 // the screen saver preview area class
 #include "sspreviewarea.h"
--- trunk/KDE/kdeartwork/kscreensaver/kdesavers/rkodesolver.h #1384804:1384805
@@ -25,7 +25,7 @@
 /* vector and matrix classes */
 #include <Eigen/Core>
 /* import most common Eigen types */
-USING_PART_OF_NAMESPACE_EIGEN
+using namespace Eigen;
 
 
 /** @brief Solver class to integrate a first-order ordinary differential
--- trunk/KDE/kdeartwork/kscreensaver/kdesavers/rotation.cpp #1384804:1384805
@@ -120,7 +120,7 @@
    (void)x;
 
    // vec omega in body coor. sys.: omega_body = (p, q, r)
-   const Vector3d omega_body(y.start<3>());
+   const Vector3d omega_body(y.head<3>());
 
    // body unit vectors in fixed frame coordinates
    Matrix3d e;
@@ -354,7 +354,7 @@
    glPushMatrix();
    // calculate the transform which rotates the unit z vector onto omega
    glLoadMatrixd(
-      Transform<double,3>(
+      Projective3d(
          Quaternion<double>()
          .setFromTwoVectors(Vector3d::UnitZ(), m_saver.omega())
          .toRotationMatrix())
@@ -371,7 +371,7 @@
    // create transformation/rotation matrix from the body and its unit axes
    glPushMatrix();
    glLoadMatrixd(
-      Transform<double,3>(m_saver.e().front())
+      Projective3d(m_saver.e().front())
       .data());
 
    // draw the body unit axis
@@ -556,7 +556,7 @@
 
    // assemble initial y for solver
    Vector12d y;
-   y.start<3>() = omega_body;
+   y.head<3>() = omega_body;
    // 3 basis vectors of body system in fixed coordinates
    y.segment<3>(3) = et.col(0);
    y.segment<3>(6) = et.col(1);
@@ -667,7 +667,7 @@
    }
 
    // current rotation vector omega
-   m_omega = m_e.front() * y.start<3>();
+   m_omega = m_e.front() * y.head<3>();
 
    // set new random traces every 10 seconds
    if (m_randomTraces)
--- trunk/KDE/kdeartwork/kscreensaver/kdesavers/rotation.h #1384804:1384805
@@ -39,7 +39,7 @@
 // Eigen2 from KDE support
 #include <Eigen/Core>
 // import most common Eigen types
-USING_PART_OF_NAMESPACE_EIGEN
+using namespace Eigen;
 
 // own extension of typdefed vector types of Eigen2
 typedef Matrix<double,12,1> Vector12d;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic