Browse Source

updated eigen (bug fixes)

Former-commit-id: 837dbfccb9fca6e790972ab5ec0bccd470d33273
Daniele Panozzo 9 years ago
parent
commit
ac62b34d23
2 changed files with 18 additions and 18 deletions
  1. 9 9
      include/igl/project_to_line.cpp
  2. 9 9
      include/igl/project_to_line_segment.cpp

+ 9 - 9
include/igl/project_to_line.cpp

@@ -1,18 +1,18 @@
 // This file is part of libigl, a simple c++ geometry processing library.
-// 
+//
 // Copyright (C) 2013 Alec Jacobson <alecjacobson@gmail.com>
-// 
-// This Source Code Form is subject to the terms of the Mozilla Public License 
-// v. 2.0. If a copy of the MPL was not distributed with this file, You can 
+//
+// This Source Code Form is subject to the terms of the Mozilla Public License
+// v. 2.0. If a copy of the MPL was not distributed with this file, You can
 // obtain one at http://mozilla.org/MPL/2.0/.
 #include "project_to_line.h"
 #include <cassert>
 #include <Eigen/Core>
 
 template <
-  typename MatP, 
-  typename MatL, 
-  typename Matt, 
+  typename MatP,
+  typename MatL,
+  typename Matt,
   typename MatsqrD>
 IGL_INLINE void igl::project_to_line(
   const MatP & P,
@@ -38,11 +38,11 @@ IGL_INLINE void igl::project_to_line(
   // resize output
   t.resize(np,1);
   sqrD.resize(np,1);
-  // loop over points 
+  // loop over points
 #pragma omp parallel for if (np>10000)
   for(int i = 0;i<np;i++)
   {
-    MatL Pi = P.row(i);
+    MatP Pi = P.row(i);
     // vector from point i to source
     MatL SmPi = S-Pi;
     t(i) = -(DmS.array()*SmPi.array()).sum() / v_sqrlen;

+ 9 - 9
include/igl/project_to_line_segment.cpp

@@ -1,19 +1,19 @@
 // This file is part of libigl, a simple c++ geometry processing library.
-// 
+//
 // Copyright (C) 2013 Alec Jacobson <alecjacobson@gmail.com>
-// 
-// This Source Code Form is subject to the terms of the Mozilla Public License 
-// v. 2.0. If a copy of the MPL was not distributed with this file, You can 
+//
+// This Source Code Form is subject to the terms of the Mozilla Public License
+// v. 2.0. If a copy of the MPL was not distributed with this file, You can
 // obtain one at http://mozilla.org/MPL/2.0/.
 #include "project_to_line_segment.h"
 #include "project_to_line.h"
 #include <Eigen/Core>
 
 template <
-  typename DerivedP, 
-  typename DerivedS, 
-  typename DerivedD, 
-  typename Derivedt, 
+  typename DerivedP,
+  typename DerivedS,
+  typename DerivedD,
+  typename Derivedt,
   typename DerivedsqrD>
 IGL_INLINE void igl::project_to_line_segment(
   const Eigen::PlainObjectBase<DerivedP> & P,
@@ -28,7 +28,7 @@ IGL_INLINE void igl::project_to_line_segment(
 #pragma omp parallel for if (np>10000)
   for(int p = 0;p<np;p++)
   {
-    const Eigen::PlainObjectBase<DerivedS> Pp = P.row(p);
+    const Eigen::PlainObjectBase<DerivedP> Pp = P.row(p);
     if(t(p)<0)
     {
       sqrD(p) = (Pp-S).squaredNorm();