Ver código fonte

Create outline_ordered.h

LIBIGL version of outline_ordered() function from gptoolbox

Former-commit-id: 779637429091b6bffda5c086617fc6b511f100f3
stefanbrugger 10 anos atrás
pai
commit
ecf5b566de
1 arquivos alterados com 35 adições e 0 exclusões
  1. 35 0
      include/igl/outline_ordered.h

+ 35 - 0
include/igl/outline_ordered.h

@@ -0,0 +1,35 @@
+// This file is part of libigl, a simple c++ geometry processing library.
+// 
+// Copyright (C) 2014 Stefan Brugger <stefanbrugger@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 
+// obtain one at http://mozilla.org/MPL/2.0/.
+#ifndef IGL_OUTLINE_H
+#define IGL_OUTLINE_H
+#include <igl/igl_inline.h>
+
+#include <Eigen/Dense>
+#include <vector>
+
+namespace igl
+{
+  // Compute list of ordered boundary loops for a manifold mesh.
+  //
+  // Templates:
+  //  Index  index type
+  // Inputs:
+  //   F  #V by dim list of mesh faces
+  // Outputs:
+  //   L  list of loops where L[i] = ordered list of boundary vertices in loop i
+  //
+  template <typename Index>
+  IGL_INLINE void outline_ordered(
+    const Eigen::MatrixXi& F, 
+    std::vector<std::vector<Index> >& L);
+}
+
+#ifndef IGL_STATIC_LIBRARY
+#  include "outline_ordered.cpp"
+#endif
+#endif