Browse Source

rm strange function, not in use

Alec Jacobson 5 years ago
parent
commit
48051bc889
2 changed files with 0 additions and 86 deletions
  1. 0 44
      include/igl/barycentric_to_global.cpp
  2. 0 42
      include/igl/barycentric_to_global.h

+ 0 - 44
include/igl/barycentric_to_global.cpp

@@ -1,44 +0,0 @@
-// This file is part of libigl, a simple c++ geometry processing library.
-//
-// Copyright (C) 2013 Daniele Panozzo <[email protected]>
-//
-// 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 "barycentric_to_global.h"
-
-// For error printing
-#include <cstdio>
-#include <vector>
-
-namespace igl
-{
-  template <typename Scalar, typename Index>
-  IGL_INLINE Eigen::Matrix<Scalar,Eigen::Dynamic,Eigen::Dynamic> barycentric_to_global(
-    const Eigen::Matrix<Scalar,Eigen::Dynamic,Eigen::Dynamic> & V,
-    const Eigen::Matrix<Index,Eigen::Dynamic,Eigen::Dynamic>  & F,
-    const Eigen::Matrix<Scalar,Eigen::Dynamic,Eigen::Dynamic> & bc)
-  {
-    Eigen::Matrix<Scalar,Eigen::Dynamic,Eigen::Dynamic> R;
-    R.resize(bc.rows(),3);
-
-    for (unsigned i=0; i<R.rows(); ++i)
-    {
-      unsigned id = round(bc(i,0));
-      double u   = bc(i,1);
-      double v   = bc(i,2);
-
-      if (id != -1)
-        R.row(i) = V.row(F(id,0)) +
-                  ((V.row(F(id,1)) - V.row(F(id,0))) * u +
-                   (V.row(F(id,2)) - V.row(F(id,0))) * v  );
-      else
-        R.row(i) << 0,0,0;
-    }
-    return R;
-  }
-}
-
-#ifdef IGL_STATIC_LIBRARY
-template Eigen::Matrix<double, -1, -1, 0, -1, -1> igl::barycentric_to_global<double, int>(Eigen::Matrix<double, -1, -1, 0, -1, -1> const&, Eigen::Matrix<int, -1, -1, 0, -1, -1> const&, Eigen::Matrix<double, -1, -1, 0, -1, -1> const&);
-#endif

+ 0 - 42
include/igl/barycentric_to_global.h

@@ -1,42 +0,0 @@
-// This file is part of libigl, a simple c++ geometry processing library.
-// 
-// Copyright (C) 2013 Daniele Panozzo <[email protected]>
-// 
-// 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_BARYCENTRIC2GLOBAL_H
-#define IGL_BARYCENTRIC2GLOBAL_H
-#include <igl/igl_inline.h>
-
-#include <Eigen/Dense>
-#include <Eigen/Sparse>
-
-namespace igl 
-{
-  // Converts barycentric coordinates in the embree form to 3D coordinates
-  // Embree stores barycentric coordinates as triples: fid, bc1, bc2
-  // fid is the id of a face, bc1 is the displacement of the point wrt the 
-  // first vertex v0 and the edge v1-v0. Similarly, bc2 is the displacement
-  // wrt v2-v0.
-  // 
-  // Input:
-  // V:  #Vx3 Vertices of the mesh
-  // F:  #Fxe Faces of the mesh
-  // bc: #Xx3 Barycentric coordinates, one row per point
-  //
-  // Output:
-  // #X: #Xx3 3D coordinates of all points in bc
-  template <typename Scalar, typename Index>
-  IGL_INLINE Eigen::Matrix<Scalar,Eigen::Dynamic,Eigen::Dynamic> 
-    barycentric_to_global(
-      const Eigen::Matrix<Scalar,Eigen::Dynamic,Eigen::Dynamic> & V, 
-      const Eigen::Matrix<Index,Eigen::Dynamic,Eigen::Dynamic>   & F, 
-      const Eigen::Matrix<Scalar,Eigen::Dynamic,Eigen::Dynamic>  & bc);
-}
-
-#ifndef IGL_STATIC_LIBRARY
-#  include "barycentric_to_global.cpp"
-#endif
-
-#endif