Эх сурвалжийг харах

add_barycenter --> false_barycentric_subdivision

Former-commit-id: 4906ed201fa8c514a9ee210164e916d37f66468e
Alec Jacobson 11 жил өмнө
parent
commit
7e8f913639

+ 0 - 57
include/igl/add_barycenter.cpp

@@ -1,57 +0,0 @@
-// 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 
-// obtain one at http://mozilla.org/MPL/2.0/.
-#include "add_barycenter.h"
-
-#include "verbose.h"
-#include <algorithm>
-#include <igl/barycenter.h>
-
-template <typename Scalar, typename Index>
-IGL_INLINE void igl::add_barycenter(
-    const Eigen::PlainObjectBase<Scalar> & V, 
-    const Eigen::PlainObjectBase<Index> & F, 
-    Eigen::PlainObjectBase<Scalar> & VD, 
-    Eigen::PlainObjectBase<Index> & FD)
-{
-  using namespace Eigen;
-  // Compute face barycenter
-  Eigen::MatrixXd BC;
-  igl::barycenter(V,F,BC);
-
-  // Add the barycenters to the vertices
-  VD.resize(V.rows()+F.rows(),3);
-  VD.block(0,0,V.rows(),3) = V;
-  VD.block(V.rows(),0,F.rows(),3) = BC;
-
-  // Each face is split four ways
-  FD.resize(F.rows()*3,3);
-
-  for (unsigned i=0; i<F.rows(); ++i)
-  {
-    int i0 = F(i,0);
-    int i1 = F(i,1);
-    int i2 = F(i,2);
-    int i3 = V.rows() + i;
-
-    Vector3i F0,F1,F2;
-    F0 << i0,i1,i3;
-    F1 << i1,i2,i3;
-    F2 << i2,i0,i3;
-
-    FD.row(i*3 + 0) = F0;
-    FD.row(i*3 + 1) = F1;
-    FD.row(i*3 + 2) = F2;
-  }
-
-
-}
-
-
-#ifdef IGL_STATIC_LIBRARY
-// Explicit template specialization
-#endif

+ 0 - 38
include/igl/add_barycenter.h

@@ -1,38 +0,0 @@
-// 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
-// obtain one at http://mozilla.org/MPL/2.0/.
-#ifndef IGL_ADD_BARYCENTER_H
-#define IGL_ADD_BARYCENTER_H
-#include "igl_inline.h"
-
-#include <Eigen/Dense>
-
-namespace igl
-{
-  // Refine the mesh by adding the barycenter of each face
-  // Inputs:
-  //   V       #V by 3 coordinates of the vertices
-  //   F       #F by 3 list of mesh faces (must be triangles)
-  // Outputs:
-  //   VD      #V + #F by 3 coordinate of the vertices of the dual mesh
-  //           The added vertices are added at the end of VD
-  //   FD      #F*3 by 3 faces of the dual mesh
-  //
-  template <typename Scalar, typename Index>
-  IGL_INLINE void add_barycenter(
-    const Eigen::PlainObjectBase<Scalar> & V,
-    const Eigen::PlainObjectBase<Index> & F,
-    Eigen::PlainObjectBase<Scalar> & VD,
-    Eigen::PlainObjectBase<Index> & FD);
-
-}
-
-#ifndef IGL_STATIC_LIBRARY
-#  include "add_barycenter.cpp"
-#endif
-
-#endif