Browse Source

Remove deprecated functions (#1610)

* removed deprecated igl::internal_angles_using_edge_lengths()

* removed deprecated igl::is_border_vertex(V,F) and correct its templates

* removed deprecated igl::all_edges()
Nico 5 years ago
parent
commit
af8944c7b6

+ 0 - 26
include/igl/all_edges.cpp

@@ -1,26 +0,0 @@
-// This file is part of libigl, a simple c++ geometry processing library.
-// 
-// Copyright (C) 2013 Alec Jacobson <[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 "all_edges.h"
-#include "oriented_facets.h"
-
-template <typename DerivedF, typename DerivedE>
-IGL_INLINE void igl::all_edges(
-  const Eigen::MatrixBase<DerivedF> & F,
-  Eigen::PlainObjectBase<DerivedE> & E)
-{
-  return oriented_facets(F,E);
-}
-
-#ifdef IGL_STATIC_LIBRARY
-// Explicit template instantiation
-template void igl::all_edges<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&);
-template void igl::all_edges<Eigen::Matrix<int, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 2, 0, -1, 2> >(Eigen::MatrixBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 2, 0, -1, 2> >&);
-template void igl::all_edges<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 2, 0, -1, 2> >(Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 2, 0, -1, 2> >&);
-template void igl::all_edges<Eigen::Matrix<int, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&);
-template void igl::all_edges<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, 2, 0, -1, 2> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 2, 0, -1, 2> >&);
-#endif

+ 0 - 39
include/igl/all_edges.h

@@ -1,39 +0,0 @@
-// This file is part of libigl, a simple c++ geometry processing library.
-// 
-// Copyright (C) 2013 Alec Jacobson <[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_ALL_EDGES_H
-#define IGL_ALL_EDGES_H
-#include "igl_inline.h"
-#include "deprecated.h"
-#include <Eigen/Dense>
-namespace igl
-{
-  // Deprecated: call oriented_facets instead.
-  //
-  // ALL_EDGES Determines all "directed edges" of a given set of simplices. For
-  // a manifold mesh, this computes all of the half-edges
-  //
-  // Inputs:
-  //   F  #F by simplex_size list of "faces"
-  // Outputs:
-  //   E  #E by simplex_size-1  list of edges
-  //
-  // Note: this is not the same as igl::edges because this includes every
-  // directed edge including repeats (meaning interior edges on a surface will
-  // show up once for each direction and non-manifold edges may appear more than
-  // once for each direction).
-  template <typename DerivedF, typename DerivedE>
-  IGL_DEPRECATED IGL_INLINE void all_edges(
-    const Eigen::MatrixBase<DerivedF> & F,
-    Eigen::PlainObjectBase<DerivedE> & E);
-}
-
-#ifndef IGL_STATIC_LIBRARY
-#  include "all_edges.cpp"
-#endif
-
-#endif

+ 0 - 27
include/igl/internal_angles.cpp

@@ -86,33 +86,6 @@ IGL_INLINE void igl::internal_angles_using_squared_edge_lengths(
     1000l);
     1000l);
 }
 }
 
 
-template <typename DerivedL, typename DerivedK>
-IGL_INLINE void igl::internal_angles_using_edge_lengths(
-  const Eigen::MatrixBase<DerivedL>& L,
-  Eigen::PlainObjectBase<DerivedK> & K)
-{
-  // Note:
-  //   Usage of internal_angles_using_squared_edge_lengths() is preferred to internal_angles_using_squared_edge_lengths()
-  //   This function is deprecated and probably will be removed in future versions
-  typedef typename DerivedL::Index Index;
-  assert(L.cols() == 3 && "Edge-lengths should come from triangles");
-  const Index m = L.rows();
-  K.resize(m,3);
-  parallel_for(
-    m,
-    [&L,&K](const Index f)
-    {
-      for(size_t d = 0;d<3;d++)
-      {
-        const auto & s1 = L(f,d);
-        const auto & s2 = L(f,(d+1)%3);
-        const auto & s3 = L(f,(d+2)%3);
-        K(f,d) = acos((s3*s3 + s2*s2 - s1*s1)/(2.*s3*s2));
-      }
-    },
-    1000l);
-}
-
 #ifdef IGL_STATIC_LIBRARY
 #ifdef IGL_STATIC_LIBRARY
 // Explicit template instantiation
 // Explicit template instantiation
 // generated by autoexplicit.sh
 // generated by autoexplicit.sh

+ 0 - 13
include/igl/internal_angles.h

@@ -40,19 +40,6 @@ namespace igl
   IGL_INLINE void internal_angles_using_squared_edge_lengths(
   IGL_INLINE void internal_angles_using_squared_edge_lengths(
     const Eigen::MatrixBase<DerivedL>& L_sq,
     const Eigen::MatrixBase<DerivedL>& L_sq,
     Eigen::PlainObjectBase<DerivedK> & K);
     Eigen::PlainObjectBase<DerivedK> & K);
-  // Inputs:
-  //   L  #F by 3 list of edge lengths
-  // Output:
-  //   K  #F by poly-size eigen Matrix of internal angles
-  //     for triangles, columns correspond to edges [1,2],[2,0],[0,1]
-  //
-  // Note:
-  //   Usage of internal_angles_using_squared_edge_lengths is preferred to internal_angles_using_squared_edge_lengths
-  //   This function is deprecated and probably will be removed in future versions
-  template <typename DerivedL, typename DerivedK>
-  IGL_DEPRECATED IGL_INLINE void internal_angles_using_edge_lengths(
-    const Eigen::MatrixBase<DerivedL>& L,
-    Eigen::PlainObjectBase<DerivedK> & K);
 }
 }
 
 
 #ifndef IGL_STATIC_LIBRARY
 #ifndef IGL_STATIC_LIBRARY

+ 2 - 11
include/igl/is_border_vertex.cpp

@@ -30,17 +30,8 @@ IGL_INLINE std::vector<bool> igl::is_border_vertex(
   return ret;
   return ret;
 }
 }
 
 
-template <typename DerivedV, typename DerivedF>
-IGL_INLINE std::vector<bool> igl::is_border_vertex(
-  const Eigen::MatrixBase<DerivedV> &/*V*/,
-  const Eigen::MatrixBase<DerivedF> &F)
-{
-  return igl::is_border_vertex(F);
-}
-
 #ifdef IGL_STATIC_LIBRARY
 #ifdef IGL_STATIC_LIBRARY
 // Explicit template instantiation
 // Explicit template instantiation
-template std::vector<bool, std::allocator<bool> > igl::is_border_vertex<Eigen::Matrix<double, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&);
-template std::vector<bool, std::allocator<bool> > igl::is_border_vertex<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&);
-template std::vector<bool, std::allocator<bool> > igl::is_border_vertex<Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&);
+template std::vector<bool, std::allocator<bool> > igl::is_border_vertex<Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&);
+template std::vector<bool, std::allocator<bool> > igl::is_border_vertex<Eigen::Matrix<int, -1, 3, 0, -1, 3> >(Eigen::MatrixBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&);
 #endif
 #endif

+ 0 - 5
include/igl/is_border_vertex.h

@@ -27,11 +27,6 @@ namespace igl
   template <typename DerivedF>
   template <typename DerivedF>
   IGL_INLINE std::vector<bool> is_border_vertex(
   IGL_INLINE std::vector<bool> is_border_vertex(
    const Eigen::MatrixBase<DerivedF> &F);
    const Eigen::MatrixBase<DerivedF> &F);
-  // Deprecated:
-  template <typename DerivedV, typename DerivedF>
-  IGL_DEPRECATED IGL_INLINE std::vector<bool> is_border_vertex(
-   const Eigen::MatrixBase<DerivedV> &V,
-   const Eigen::MatrixBase<DerivedF> &F);
 }
 }
 
 
 #ifndef IGL_STATIC_LIBRARY
 #ifndef IGL_STATIC_LIBRARY