瀏覽代碼

bugs in readOFF

Former-commit-id: 0d53d1a12cb66f5d88334f60f64201f04b4628d2
jalec 13 年之前
父節點
當前提交
9efa0aedcd
共有 2 個文件被更改,包括 8 次插入6 次删除
  1. 1 0
      readOFF.cpp
  2. 7 6
      readOFF.h

+ 1 - 0
readOFF.cpp

@@ -1,4 +1,5 @@
 #include "readOFF.h"
 #include "readOFF.h"
+#include "list_to_matrix.h"
 template <typename Scalar, typename Index>
 template <typename Scalar, typename Index>
 IGL_INLINE bool igl::readOFF(
 IGL_INLINE bool igl::readOFF(
                              const std::string off_file_name, 
                              const std::string off_file_name, 

+ 7 - 6
readOFF.h

@@ -12,6 +12,7 @@
 
 
 #include <Eigen/Core>
 #include <Eigen/Core>
 #include <string>
 #include <string>
+#include <vector>
 
 
 namespace igl 
 namespace igl 
 {
 {
@@ -35,9 +36,9 @@ namespace igl
   // Returns true on success, false on errors
   // Returns true on success, false on errors
   template <typename Scalar, typename Index>
   template <typename Scalar, typename Index>
   IGL_INLINE bool readOFF(
   IGL_INLINE bool readOFF(
-                          const std::string off_file_name, 
-                          std::vector<std::vector<Scalar > > & V,
-                          std::vector<std::vector<Index > > & F);
+    const std::string off_file_name, 
+    std::vector<std::vector<Scalar > > & V,
+    std::vector<std::vector<Index > > & F);
   
   
   
   
   // read mesh from a ascii off file
   // read mesh from a ascii off file
@@ -48,9 +49,9 @@ namespace igl
   //   F  eigen int matrix #F by 3
   //   F  eigen int matrix #F by 3
   template <typename DerivedV, typename DerivedF>
   template <typename DerivedV, typename DerivedF>
   IGL_INLINE bool readOFF(
   IGL_INLINE bool readOFF(
-                          const std::string str,
-                          Eigen::PlainObjectBase<DerivedV>& V,
-                          Eigen::PlainObjectBase<DerivedF>& F);
+    const std::string str,
+    Eigen::PlainObjectBase<DerivedV>& V,
+    Eigen::PlainObjectBase<DerivedF>& F);
 }
 }
 
 
 #ifdef IGL_HEADER_ONLY
 #ifdef IGL_HEADER_ONLY