Browse Source

Remove deprecated functions (#2234)

* basic config file

* documentation for two funcs

* better theme; subnamespace

* A-c

* documentation for all core headers

* more documentation

* documentation for all headers (except a few classes)

* rm accidental comment on igl

* just h

* typo

* accidental delete

* fix compile issues

* add main page [ci skip]

* relative include paths

* relative include paths

* inexplicably need two more templates

* rm get_seconds_hires

* make fwn namespace private for dox

* hide internal fwn from documentation

* fix doc

* rm deprecated euler

* rm __1
Alec Jacobson 2 years ago
parent
commit
724ff6b05a
100 changed files with 331 additions and 1253 deletions
  1. 1 1
      docs/doxygen.conf
  2. 0 362
      include/igl/Camera.h
  3. 47 17
      include/igl/FastWindingNumberForSoups.h
  4. 1 1
      include/igl/HalfEdgeIterator.h
  5. 2 2
      include/igl/WindingNumberTree.h
  6. 2 2
      include/igl/angular_distance.cpp
  7. 0 20
      include/igl/any_of.cpp
  8. 0 27
      include/igl/any_of.h
  9. 11 12
      include/igl/arap_dof.cpp
  10. 1 1
      include/igl/arap_linear_block.h
  11. 1 1
      include/igl/arap_rhs.h
  12. 1 1
      include/igl/bbw.h
  13. 1 1
      include/igl/bfs_orient.h
  14. 4 4
      include/igl/bounding_box_diagonal.cpp
  15. 2 0
      include/igl/copyleft/cgal/remesh_intersections.cpp
  16. 2 2
      include/igl/copyleft/cgal/resolve_intersections.h
  17. 4 4
      include/igl/copyleft/comiso/frame_field.cpp
  18. 2 2
      include/igl/copyleft/comiso/frame_field.h
  19. 4 4
      include/igl/copyleft/comiso/nrosy.cpp
  20. 1 2
      include/igl/cotmatrix.cpp
  21. 0 1
      include/igl/covariance_scatter_matrix.cpp
  22. 7 7
      include/igl/cross_field_mismatch.cpp
  23. 4 4
      include/igl/cut_mesh.cpp
  24. 2 2
      include/igl/cut_mesh_from_singularities.cpp
  25. 0 51
      include/igl/deprecated.h
  26. 0 75
      include/igl/diag.cpp
  27. 0 60
      include/igl/diag.h
  28. 3 1
      include/igl/dot_row.h
  29. 2 2
      include/igl/ears.cpp
  30. 1 1
      include/igl/embree/EmbreeIntersector.cpp
  31. 1 1
      include/igl/embree/EmbreeRenderer.h
  32. 2 2
      include/igl/embree/bone_heat.cpp
  33. 1 1
      include/igl/embree/bone_visible.h
  34. 2 2
      include/igl/embree/line_mesh_intersection.cpp
  35. 1 1
      include/igl/embree/line_mesh_intersection.h
  36. 1 1
      include/igl/embree/unproject_in_mesh.h
  37. 1 1
      include/igl/embree/unproject_onto_mesh.h
  38. 0 19
      include/igl/euler_characteristic.cpp
  39. 0 15
      include/igl/euler_characteristic.h
  40. 1 1
      include/igl/exact_geodesic.cpp
  41. 1 1
      include/igl/false_barycentric_subdivision.cpp
  42. 6 1
      include/igl/fast_winding_number.h
  43. 4 4
      include/igl/find_cross_field_singularities.cpp
  44. 3 3
      include/igl/frame_field_deformer.cpp
  45. 2 2
      include/igl/frame_to_cross_field.cpp
  46. 16 0
      include/igl/get_seconds.cpp
  47. 9 0
      include/igl/get_seconds.h
  48. 0 29
      include/igl/get_seconds_hires.cpp
  49. 0 26
      include/igl/get_seconds_hires.h
  50. 5 7
      include/igl/harmonic.cpp
  51. 0 1
      include/igl/internal_angles.h
  52. 0 1
      include/igl/is_border_vertex.h
  53. 1 1
      include/igl/kelvinlets.h
  54. 11 11
      include/igl/line_field_mismatch.cpp
  55. 3 3
      include/igl/loop.cpp
  56. 1 1
      include/igl/loop.h
  57. 0 1
      include/igl/massmatrix.cpp
  58. 3 2
      include/igl/massmatrix_intrinsic.cpp
  59. 0 46
      include/igl/mat_max.cpp
  60. 0 44
      include/igl/mat_max.h
  61. 0 59
      include/igl/mat_min.cpp
  62. 0 44
      include/igl/mat_min.h
  63. 1 1
      include/igl/matlab/matlabinterface.cpp
  64. 1 1
      include/igl/matlab/parse_rhs.h
  65. 1 1
      include/igl/matlab/prepare_lhs.h
  66. 33 1
      include/igl/max.cpp
  67. 13 4
      include/igl/max.h
  68. 37 0
      include/igl/min.cpp
  69. 11 4
      include/igl/min.h
  70. 1 1
      include/igl/min_quad_with_fixed.impl.h
  71. 0 33
      include/igl/normalize_row_lengths.cpp
  72. 0 36
      include/igl/normalize_row_lengths.h
  73. 0 29
      include/igl/normalize_row_sums.cpp
  74. 0 35
      include/igl/normalize_row_sums.h
  75. 1 1
      include/igl/opengl/MeshGL.h
  76. 3 3
      include/igl/opengl/ViewerCore.h
  77. 3 3
      include/igl/opengl/ViewerData.h
  78. 17 17
      include/igl/opengl/glfw/Viewer.cpp
  79. 1 1
      include/igl/opengl/glfw/ViewerPlugin.h
  80. 1 1
      include/igl/opengl/glfw/imgui/ImGuiPlugin.cpp
  81. 1 1
      include/igl/opengl/verasansmono_compressed.h
  82. 1 1
      include/igl/opengl/vertex_array.cpp
  83. 2 2
      include/igl/opengl/vertex_array.h
  84. 1 1
      include/igl/orientable_patches.h
  85. 1 1
      include/igl/parallel_transport_angles.cpp
  86. 2 2
      include/igl/partition.cpp
  87. 2 3
      include/igl/pinv.h
  88. 1 1
      include/igl/png/render_to_png.h
  89. 1 1
      include/igl/png/render_to_png_async.h
  90. 0 35
      include/igl/png/texture_from_png.cpp
  91. 0 17
      include/igl/png/texture_from_png.h
  92. 1 1
      include/igl/predicates/ear_clipping.cpp
  93. 2 1
      include/igl/predicates/predicates.cpp
  94. 1 1
      include/igl/predicates/predicates.h
  95. 2 2
      include/igl/predicates/segment_segment_intersect.h
  96. 5 5
      include/igl/principal_curvature.cpp
  97. 0 2
      include/igl/principal_curvature.h
  98. 1 1
      include/igl/pso.h
  99. 1 1
      include/igl/quad_grid.h
  100. 1 1
      include/igl/random_dir.cpp

+ 1 - 1
docs/doxygen.conf

@@ -1024,7 +1024,7 @@ EXCLUDE_PATTERNS       =
 # wildcard * is used, a substring. Examples: ANamespace, AClass,
 # ANamespace::AClass, ANamespace::*Test
 
-EXCLUDE_SYMBOLS        =
+EXCLUDE_SYMBOLS        = igl::FastWindingNumber* igl::tinyply* igl::anttweakbar*
 
 # The EXAMPLE_PATH tag can be used to specify one or more files or directories
 # that contain example code fragments that are included (see the \include

+ 0 - 362
include/igl/Camera.h

@@ -1,362 +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_CAMERA_H
-#define IGL_CAMERA_H
-
-// you're idiot, M$!
-#if defined(_WIN32)
-#undef far
-#undef near
-#endif
-
-#include <Eigen/Geometry>
-#include <Eigen/Core>
-#include "PI.h"
-
-#define IGL_CAMERA_MIN_ANGLE 5.0
-namespace igl
-{
-
-  /// A simple camera class. The camera stores projection parameters (field of
-  /// view angle, aspect ratio, near and far clips) as well as a rigid
-  /// transformation *of the camera as if it were also a scene object*. Thus, the
-  /// **inverse** of this rigid transformation is the modelview transformation.
-  ///
-  /// \deprecated This is not maintained.
-  /// @private
-  class Camera
-  {
-    public:
-      // On windows you might need: -fno-delayed-template-parsing
-      //static constexpr double IGL_CAMERA_MIN_ANGLE = 5.;
-      //  m_angle  Field of view angle in degrees {45}
-      //  m_aspect  Aspect ratio {1}
-      //  m_near  near clipping plane {1e-2}
-      //  m_far  far clipping plane {100}
-      //  m_at_dist  distance of looking at point {1}
-      //  m_orthographic  whether to use othrographic projection {false}
-      //  m_rotation_conj  Conjugate of rotation part of rigid transformation of
-      //    camera {identity}. Note: we purposefully store the conjugate because
-      //    this is what TW_TYPE_QUAT4D is expecting.
-      //  m_translation  Translation part of rigid transformation of camera
-      //    {(0,0,1)}
-      double m_angle, m_aspect, m_near, m_far, m_at_dist;
-      bool m_orthographic;
-      Eigen::Quaterniond m_rotation_conj;
-      Eigen::Vector3d m_translation;
-    public:
-      inline Camera();
-      inline virtual ~Camera(){}
-      // Return projection matrix that takes relative camera coordinates and
-      // transforms it to viewport coordinates
-      //
-      // Note:
-      //
-      //     if(m_angle > 0)
-      //     {
-      //       gluPerspective(m_angle,m_aspect,m_near,m_at_dist+m_far);
-      //     }else
-      //     {
-      //       gluOrtho(-0.5*aspect,0.5*aspect,-0.5,0.5,m_at_dist+m_near,m_far);
-      //     }
-      //
-      // Is equivalent to
-      //
-      //     glMultMatrixd(projection().data());
-      //
-      inline Eigen::Matrix4d projection() const;
-      // Return an Affine transformation (rigid actually) that 
-      // takes relative coordinates and tramsforms them into world 3d
-      // coordinates: moves the camera into the scene.
-      inline Eigen::Affine3d affine() const;
-      // Return an Affine transformation (rigid actually) that puts the takes a
-      // world 3d coordinate and transforms it into the relative camera
-      // coordinates: moves the scene in front of the camera.
-      //
-      // Note:
-      //
-      //     gluLookAt(
-      //       eye()(0), eye()(1), eye()(2),
-      //       at()(0), at()(1), at()(2),
-      //       up()(0), up()(1), up()(2));
-      //
-      // Is equivalent to
-      //
-      //     glMultMatrixd(camera.inverse().matrix().data());
-      //
-      // See also: affine, eye, at, up
-      inline Eigen::Affine3d inverse() const;
-      // Returns world coordinates position of center or "eye" of camera.
-      inline Eigen::Vector3d eye() const;
-      // Returns world coordinate position of a point "eye" is looking at.
-      inline Eigen::Vector3d at() const;
-      // Returns world coordinate unit vector of "up" vector
-      inline Eigen::Vector3d up() const;
-      // Return top right corner of unit plane in relative coordinates, that is
-      // (w/2,h/2,1)
-      inline Eigen::Vector3d unit_plane() const;
-      // Move dv in the relative coordinate frame of the camera (move the FPS)
-      //
-      // Inputs:
-      //   dv  (x,y,z) displacement vector
-      //
-      inline void dolly(const Eigen::Vector3d & dv);
-      // "Scale zoom": Move `eye`, but leave `at`
-      //
-      // Input:
-      //   s  amount to scale distance to at
-      inline void push_away(const double s);
-      // Aka "Hitchcock", "Vertigo", "Spielberg" or "Trombone" zoom:
-      // simultaneously dolly while changing angle so that `at` not only stays
-      // put in relative coordinates but also projected coordinates. That is
-      //
-      // Inputs:
-      //   da  change in angle in degrees
-      inline void dolly_zoom(const double da);
-      // Turn around eye so that rotation is now q
-      //
-      // Inputs:
-      //   q  new rotation as quaternion
-      inline void turn_eye(const Eigen::Quaterniond & q);
-      // Orbit around at so that rotation is now q
-      //
-      // Inputs:
-      //   q  new rotation as quaternion
-      inline void orbit(const Eigen::Quaterniond & q);
-      // Rotate and translate so that camera is situated at "eye" looking at "at"
-      // with "up" pointing up.
-      //
-      // Inputs:
-      //   eye  (x,y,z) coordinates of eye position
-      //   at   (x,y,z) coordinates of at position
-      //   up   (x,y,z) coordinates of up vector
-      inline void look_at(
-        const Eigen::Vector3d & eye,
-        const Eigen::Vector3d & at,
-        const Eigen::Vector3d & up);
-    // Needed any time Eigen Structures are used as class members
-    // http://eigen.tuxfamily.org/dox-devel/group__TopicStructHavingEigenMembers.html
-    public:
-        EIGEN_MAKE_ALIGNED_OPERATOR_NEW
-  };
-}
-
-// Implementation
-#include "PI.h"
-#include "EPS.h"
-#include <cmath>
-#include <iostream>
-#include <cassert>
-
-inline igl::Camera::Camera():
-  m_angle(45.0),m_aspect(1),m_near(1e-2),m_far(100),m_at_dist(1),
-  m_orthographic(false),
-  m_rotation_conj(1,0,0,0),
-  m_translation(0,0,1)
-{
-}
-
-inline Eigen::Matrix4d igl::Camera::projection() const
-{
-  Eigen::Matrix4d P;
-  using namespace std;
-  const double far = m_at_dist + m_far;
-  const double near = m_near;
-  // http://stackoverflow.com/a/3738696/148668
-  if(m_orthographic)
-  {
-    const double f = 0.5;
-    const double left = -f*m_aspect;
-    const double right = f*m_aspect;
-    const double bottom = -f;
-    const double top = f;
-    const double tx = (right+left)/(right-left);
-    const double ty = (top+bottom)/(top-bottom);
-    const double tz = (far+near)/(far-near);
-    const double z_fix = 0.5 /m_at_dist / tan(m_angle*0.5 * (igl::PI/180.) );
-    P<<
-      z_fix*2./(right-left), 0, 0, -tx,
-      0, z_fix*2./(top-bottom), 0, -ty,
-      0, 0, -z_fix*2./(far-near),  -tz,
-      0, 0, 0, 1;
-  }else
-  {
-    const double yScale = tan(PI*0.5 - 0.5*m_angle*PI/180.);
-    // http://stackoverflow.com/a/14975139/148668
-    const double xScale = yScale/m_aspect;
-    P<< 
-      xScale, 0, 0, 0,
-      0, yScale, 0, 0,
-      0, 0, -(far+near)/(far-near), -1,
-      0, 0, -2.*near*far/(far-near), 0;
-    P = P.transpose().eval();
-  }
-  return P;
-}
-
-inline Eigen::Affine3d igl::Camera::affine() const
-{
-  using namespace Eigen;
-  Affine3d t = Affine3d::Identity();
-  t.rotate(m_rotation_conj.conjugate());
-  t.translate(m_translation);
-  return t;
-}
-
-inline Eigen::Affine3d igl::Camera::inverse() const
-{
-  using namespace Eigen;
-  Affine3d t = Affine3d::Identity();
-  t.translate(-m_translation);
-  t.rotate(m_rotation_conj);
-  return t;
-}
-
-inline Eigen::Vector3d igl::Camera::eye() const
-{
-  using namespace Eigen;
-  return affine() * Vector3d(0,0,0);
-}
-
-inline Eigen::Vector3d igl::Camera::at() const
-{
-  using namespace Eigen;
-  return affine() * (Vector3d(0,0,-1)*m_at_dist);
-}
-
-inline Eigen::Vector3d igl::Camera::up() const
-{
-  using namespace Eigen;
-  Affine3d t = Affine3d::Identity();
-  t.rotate(m_rotation_conj.conjugate());
-  return t * Vector3d(0,1,0);
-}
-
-inline Eigen::Vector3d igl::Camera::unit_plane() const
-{
-  // Distance of center pixel to eye
-  const double d = 1.0;
-  const double a = m_aspect;
-  const double theta = m_angle*PI/180.;
-  const double w =
-    2.*sqrt(-d*d/(a*a*pow(tan(0.5*theta),2.)-1.))*a*tan(0.5*theta);
-  const double h = w/a;
-  return Eigen::Vector3d(w*0.5,h*0.5,-d);
-}
-
-inline void igl::Camera::dolly(const Eigen::Vector3d & dv)
-{
-  m_translation += dv;
-}
-
-inline void igl::Camera::push_away(const double s)
-{
-  using namespace Eigen;
-#ifndef NDEBUG
-  Vector3d old_at = at();
-#endif
-  const double old_at_dist = m_at_dist;
-  m_at_dist = old_at_dist * s;
-  dolly(Vector3d(0,0,1)*(m_at_dist - old_at_dist));
-  assert((old_at-at()).squaredNorm() < DOUBLE_EPS);
-}
-
-inline void igl::Camera::dolly_zoom(const double da)
-{
-  using namespace std;
-  using namespace Eigen;
-#ifndef NDEBUG
-  Vector3d old_at = at();
-#endif
-  const double old_angle = m_angle;
-  if(old_angle + da < IGL_CAMERA_MIN_ANGLE)
-  {
-    m_orthographic = true;
-  }else if(old_angle + da > IGL_CAMERA_MIN_ANGLE)
-  {
-    m_orthographic = false;
-  }
-  if(!m_orthographic)
-  {
-    m_angle += da;
-    m_angle = min(89.,max(IGL_CAMERA_MIN_ANGLE,m_angle));
-    // change in distance
-    const double s = 
-      (2.*tan(old_angle/2./180.*igl::PI)) /
-      (2.*tan(m_angle/2./180.*igl::PI)) ;
-    const double old_at_dist = m_at_dist;
-    m_at_dist = old_at_dist * s;
-    dolly(Vector3d(0,0,1)*(m_at_dist - old_at_dist));
-    assert((old_at-at()).squaredNorm() < DOUBLE_EPS);
-  }
-}
-
-inline void igl::Camera::turn_eye(const Eigen::Quaterniond & q)
-{
-  using namespace Eigen;
-  Vector3d old_eye = eye();
-  // eye should be fixed
-  //
-  // eye_1 = R_1 * t_1 = eye_0
-  // t_1 = R_1' * eye_0
-  m_rotation_conj = q.conjugate();
-  m_translation = m_rotation_conj * old_eye;
-  assert((old_eye - eye()).squaredNorm() < DOUBLE_EPS);
-}
-
-inline void igl::Camera::orbit(const Eigen::Quaterniond & q)
-{
-  using namespace Eigen;
-  Vector3d old_at = at();
-  // at should be fixed
-  //
-  // at_1 = R_1 * t_1 - R_1 * z = at_0
-  // t_1 = R_1' * (at_0 + R_1 * z)
-  m_rotation_conj = q.conjugate();
-  m_translation = 
-    m_rotation_conj * 
-      (old_at + 
-         m_rotation_conj.conjugate() * Vector3d(0,0,1) * m_at_dist);
-  assert((old_at - at()).squaredNorm() < DOUBLE_EPS);
-}
-
-inline void igl::Camera::look_at(
-  const Eigen::Vector3d & eye,
-  const Eigen::Vector3d & at,
-  const Eigen::Vector3d & up)
-{
-  using namespace Eigen;
-  using namespace std;
-  // http://www.opengl.org/sdk/docs/man2/xhtml/gluLookAt.xml
-  // Normalize vector from at to eye
-  Vector3d F = eye-at;
-  m_at_dist = F.norm();
-  F.normalize();
-  // Project up onto plane orthogonal to F and normalize
-  assert(up.cross(F).norm() > DOUBLE_EPS && "(eye-at) x up ≈ 0");
-  const Vector3d proj_up = (up-(up.dot(F))*F).normalized();
-  Quaterniond a,b;
-  a.setFromTwoVectors(Vector3d(0,0,-1),-F);
-  b.setFromTwoVectors(a*Vector3d(0,1,0),proj_up);
-  m_rotation_conj = (b*a).conjugate();
-  m_translation = m_rotation_conj * eye;
-  //cout<<"m_at_dist: "<<m_at_dist<<endl;
-  //cout<<"proj_up: "<<proj_up.transpose()<<endl;
-  //cout<<"F: "<<F.transpose()<<endl;
-  //cout<<"eye(): "<<this->eye().transpose()<<endl;
-  //cout<<"at(): "<<this->at().transpose()<<endl;
-  //cout<<"eye()-at(): "<<(this->eye()-this->at()).normalized().transpose()<<endl;
-  //cout<<"eye-this->eye(): "<<(eye-this->eye()).squaredNorm()<<endl;
-  assert(           (eye-this->eye()).squaredNorm() < DOUBLE_EPS);
-  //assert((F-(this->eye()-this->at()).normalized()).squaredNorm() < 
-  //  DOUBLE_EPS);
-  assert(           (at-this->at()).squaredNorm() < DOUBLE_EPS);
-  //assert(        (proj_up-this->up()).squaredNorm() < DOUBLE_EPS);
-}
-
-#endif

+ 47 - 17
include/igl/FastWindingNumberForSoups.h

@@ -85,7 +85,9 @@
 #include <sys/types.h>
 #include <stdint.h>
 
-namespace igl { namespace FastWindingNumber {
+namespace igl {
+  /// @private
+  namespace FastWindingNumber {
 
 /*
  * Integer types
@@ -242,7 +244,9 @@ typedef union SYS_FPRealUnionT<fpreal64>    SYS_FPRealUnionD;
 #include <limits>
 #include <math.h>
 
-namespace igl { namespace FastWindingNumber {
+namespace igl {
+  /// @private
+  namespace FastWindingNumber {
 
 // NOTE:
 // These have been carefully written so that in the case of equality
@@ -383,7 +387,9 @@ static inline fpreal64 SYSabs(fpreal64 a) { return ::fabs(a); }
     #pragma warning(pop)
 #endif
 
-namespace igl { namespace FastWindingNumber {
+namespace igl {
+  /// @private
+  namespace FastWindingNumber {
 
 typedef __m128	v4sf;
 typedef __m128i	v4si;
@@ -745,7 +751,9 @@ vm_allbits(const v4si &a)
 
 #include <cmath>
 
-namespace igl { namespace FastWindingNumber {
+namespace igl {
+  /// @private
+  namespace FastWindingNumber {
 
 struct v4si {
 	int32 v[4];
@@ -1174,7 +1182,9 @@ int SYS_FORCE_INLINE _mm_movemask_ps(const v4sf& v) {
 
 
 
-namespace igl { namespace FastWindingNumber {
+namespace igl {
+  /// @private
+  namespace FastWindingNumber {
 
 class v4uf;
 
@@ -1628,7 +1638,9 @@ typedef v4uu v4ui;
 #include <type_traits>
 #include <string.h>
 
-namespace igl { namespace FastWindingNumber {
+namespace igl {
+  /// @private
+  namespace FastWindingNumber {
 
  /// This routine describes how to change the size of an array.
  /// It must increase the current_size by at least one!
@@ -2423,7 +2435,9 @@ private:
 #include <stdlib.h>
 #include <string.h>
 
-namespace igl { namespace FastWindingNumber {
+namespace igl { 
+  /// @private
+  namespace FastWindingNumber {
 
 // Implemented in UT_Array.C
 extern void ut_ArrayImplFree(void *p);
@@ -3086,7 +3100,9 @@ UT_Array<T>::operator!=(const UT_Array<T> &a) const
 
 #include <utility>
 #include <stddef.h>
-namespace igl { namespace FastWindingNumber {
+namespace igl {
+  /// @private
+  namespace FastWindingNumber {
 
 /// An array class with the small buffer optimization, making it ideal for
 /// cases when you know it will only contain a few elements at the expense of
@@ -3242,7 +3258,9 @@ private:
 
 
 
-namespace igl { namespace FastWindingNumber {
+namespace igl {
+  /// @private
+  namespace FastWindingNumber {
 
 template<typename T,exint SIZE,bool INSTANTIATED=false>
 class UT_FixedVector
@@ -3646,7 +3664,9 @@ struct UT_FixedVectorTraits<UT_FixedVector<T,SIZE,INSTANTIATED> >
 
 
 #include <thread> // This is just included for std::thread::hardware_concurrency()
-namespace igl { namespace FastWindingNumber {
+namespace igl {
+  /// @private
+  namespace FastWindingNumber {
 namespace UT_Thread { inline int getNumProcessors() {
     return std::thread::hardware_concurrency();
 }}
@@ -3879,7 +3899,9 @@ namespace UT_Thread { inline int getNumProcessors() {
 
 #include <limits>
 #include <memory>
-namespace igl { namespace FastWindingNumber {
+namespace igl { 
+  /// @private
+  namespace FastWindingNumber {
 
 template<typename T> class UT_Array;
 class v4uf;
@@ -4440,12 +4462,14 @@ using UT_BVH = UT::BVH<N>;
 
 
 
-#include <igl/parallel_for.h>
+#include "parallel_for.h"
 
 #include <iostream>
 #include <algorithm>
 
-namespace igl { namespace FastWindingNumber {
+namespace igl { 
+  /// @private
+  namespace FastWindingNumber {
 namespace HDK_Sample {
 
 namespace UT {
@@ -6008,7 +6032,9 @@ void BVH<N>::debugDump() const {
 
 #include <memory>
 
-namespace igl { namespace FastWindingNumber {
+namespace igl { 
+  /// @private
+  namespace FastWindingNumber {
 namespace HDK_Sample {
 
 template<typename T>
@@ -6373,7 +6399,9 @@ private:
 
 #include <stdlib.h>
 
-namespace igl { namespace FastWindingNumber {
+namespace igl { 
+  /// @private
+  namespace FastWindingNumber {
 
 // This needs to be here or else the warning suppression doesn't work because
 // the templated calling code won't otherwise be compiled until after we've
@@ -6423,7 +6451,7 @@ inline void ut_ArrayImplFree(void *p)
 
 
 
-#include <igl/parallel_for.h>
+#include "parallel_for.h"
 #include <type_traits>
 #include <utility>
 
@@ -6440,7 +6468,9 @@ inline void ut_ArrayImplFree(void *p)
 
 #define TAYLOR_SERIES_ORDER 2
 
-namespace igl { namespace FastWindingNumber {
+namespace igl { 
+  /// @private
+  namespace FastWindingNumber {
 
 namespace HDK_Sample {
 

+ 1 - 1
include/igl/HalfEdgeIterator.h

@@ -11,7 +11,7 @@
 #include <Eigen/Core>
 
 #include <vector>
-#include <igl/igl_inline.h>
+#include "igl_inline.h"
 
 
 namespace igl

+ 2 - 2
include/igl/WindingNumberTree.h

@@ -142,8 +142,8 @@ namespace igl
 #include "triangle_fan.h"
 #include "exterior_edges.h"
 
-#include <igl/PI.h>
-#include <igl/remove_duplicate_vertices.h>
+#include "PI.h"
+#include "remove_duplicate_vertices.h"
 
 #include <iostream>
 #include <limits>

+ 2 - 2
include/igl/angular_distance.cpp

@@ -6,8 +6,8 @@
 // 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 "angular_distance.h"
-#include <igl/EPS.h>
-#include <igl/PI.h>
+#include "EPS.h"
+#include "PI.h"
 IGL_INLINE double igl::angular_distance(
   const Eigen::Quaterniond & A,
   const Eigen::Quaterniond & B)

+ 0 - 20
include/igl/any_of.cpp

@@ -1,20 +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 "any_of.h"
-#include <Eigen/Core>
-template <typename Mat>
-IGL_INLINE bool igl::any_of(const Mat & S)
-{
-  return std::any_of(S.data(),S.data()+S.size(),[](bool s){return s;});
-}
-
-#ifdef IGL_STATIC_LIBRARY
-// Explicit template instantiation
-template bool igl::any_of<Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::Matrix<int, -1, 1, 0, -1, 1> const&);
-#endif
-

+ 0 - 27
include/igl/any_of.h

@@ -1,27 +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_ANY_OF_H
-#define IGL_ANY_OF_H
-#include "igl_inline.h"
-namespace igl
-{
-  /// Wrapper for STL `any_of` for matrix types
-  ///
-  /// @param[in]  S  matrix
-  /// @return whether any entries are true
-  ///
-  /// \deprecated Seems that Eigen (now) implements this for `Eigen::Array` 
-  ///
-  /// \see any
-  template <typename Mat>
-  IGL_INLINE bool any_of(const Mat & S);
-}
-#ifndef IGL_STATIC_LIBRARY
-#  include "any_of.cpp"
-#endif
-#endif

+ 11 - 12
include/igl/arap_dof.cpp

@@ -25,7 +25,6 @@
 #include "verbose.h"
 #include "print_ijv.h"
 
-#include "get_seconds_hires.h"
 //#include "MKLEigenInterface.h"
 #include "kkt_inverse.h"
 #include "get_seconds.h"
@@ -548,12 +547,12 @@ IGL_INLINE bool igl::arap_dof_recomputation(
   MatrixXd A_eqfull(A_eq);
   MatrixXd M_Solve;
 
-  double timer0_start = get_seconds_hires();
+  double timer0_start = get_seconds();
   bool use_lu = data.effective_dim != 2;
   //use_lu = false;
   //printf("use_lu: %s\n",(use_lu?"TRUE":"FALSE"));
   kkt_inverse(Qfull, A_eqfull, use_lu,M_Solve);
-  double timer0_end = get_seconds_hires();
+  double timer0_end = get_seconds();
   verbose("Bob timing: %.20f\n", (timer0_end - timer0_start)*1000.0);
 
   // Precompute full solve matrix:
@@ -616,7 +615,7 @@ IGL_INLINE bool igl::arap_dof_update(
   using namespace Eigen;
   typedef Matrix<SSCALAR, Dynamic, Dynamic> MatrixXS;
 #ifdef ARAP_GLOBAL_TIMING
-  double timer_start = get_seconds_hires();
+  double timer_start = get_seconds();
 #endif
 
   // number of dimensions
@@ -686,7 +685,7 @@ IGL_INLINE bool igl::arap_dof_update(
   MatrixXS L_part1(data.dim * (data.dim + 1) * data.m, 1);
 
 #ifdef ARAP_GLOBAL_TIMING
-    double timer_prepFinished = get_seconds_hires();
+    double timer_prepFinished = get_seconds();
 #endif
 
 #ifdef IGL_ARAP_DOF_FIXED_ITERATIONS_COUNT
@@ -697,7 +696,7 @@ IGL_INLINE bool igl::arap_dof_update(
   {  
     if(data.print_timings)
     {
-      sec_start = get_seconds_hires();
+      sec_start = get_seconds();
     }
 
 #ifndef IGL_ARAP_DOF_FIXED_ITERATIONS_COUNT
@@ -722,7 +721,7 @@ IGL_INLINE bool igl::arap_dof_update(
     
     if(data.print_timings)
     {
-      sec_covGather = get_seconds_hires();
+      sec_covGather = get_seconds();
     }
 
 #ifdef EXTREME_VERBOSE
@@ -747,7 +746,7 @@ IGL_INLINE bool igl::arap_dof_update(
 
     if(data.print_timings)
     {
-      sec_fitRotations = get_seconds_hires();
+      sec_fitRotations = get_seconds();
     }
   
     ///////////////////////////////////////////////////////////////////////////
@@ -766,7 +765,7 @@ IGL_INLINE bool igl::arap_dof_update(
     
     if(data.print_timings)
     {
-      sec_prepMult = get_seconds_hires();
+      sec_prepMult = get_seconds();
     }  
     
     L_part1xyz = data.CSolveBlock1 * Rxyz;
@@ -824,7 +823,7 @@ IGL_INLINE bool igl::arap_dof_update(
 
     if(data.print_timings)
     {
-      sec_solve = get_seconds_hires();
+      sec_solve = get_seconds();
     }
 
 #ifndef IGL_ARAP_DOF_FIXED_ITERATIONS_COUNT
@@ -835,7 +834,7 @@ IGL_INLINE bool igl::arap_dof_update(
 
     if(data.print_timings)
     {
-      sec_end = get_seconds_hires();
+      sec_end = get_seconds();
 #ifndef WIN32
       // trick to get sec_* variables to compile without warning on mac
       if(false)
@@ -861,7 +860,7 @@ IGL_INLINE bool igl::arap_dof_update(
   assert(L.cols() == 1);
 
 #ifdef ARAP_GLOBAL_TIMING
-  double timer_finito = get_seconds_hires();
+  double timer_finito = get_seconds();
   printf(
     "ARAP preparation = %f, "
     "all %i iterations = %f [ms]\n", 

+ 1 - 1
include/igl/arap_linear_block.h

@@ -10,7 +10,7 @@
 #include "igl_inline.h"
 
 #include <Eigen/Sparse>
-#include <igl/ARAPEnergyType.h>
+#include "ARAPEnergyType.h"
 
 namespace igl
 {

+ 1 - 1
include/igl/arap_rhs.h

@@ -8,10 +8,10 @@
 #ifndef IGL_ARAP_RHS_H
 #define IGL_ARAP_RHS_H
 #include "igl_inline.h"
+#include "ARAPEnergyType.h"
 
 #include <Eigen/Dense>
 #include <Eigen/Sparse>
-#include <igl/ARAPEnergyType.h>
 
 namespace igl
 {

+ 1 - 1
include/igl/bbw.h

@@ -10,7 +10,7 @@
 #include "igl_inline.h"
 
 #include <Eigen/Dense>
-#include <igl/active_set.h>
+#include "active_set.h"
 
 namespace igl
 {

+ 1 - 1
include/igl/bfs_orient.h

@@ -8,7 +8,7 @@
 #ifndef IGL_BFS_ORIENT_H
 #define IGL_BFS_ORIENT_H
 #include <Eigen/Core>
-#include <igl/igl_inline.h>
+#include "igl_inline.h"
 
 namespace igl
 {

+ 4 - 4
include/igl/bounding_box_diagonal.cpp

@@ -6,8 +6,8 @@
 // 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 "bounding_box_diagonal.h"
-#include "mat_max.h"
-#include "mat_min.h"
+#include "max.h"
+#include "min.h"
 #include <cmath>
 
 IGL_INLINE double igl::bounding_box_diagonal(
@@ -16,8 +16,8 @@ IGL_INLINE double igl::bounding_box_diagonal(
   using namespace Eigen;
   VectorXd maxV,minV;
   VectorXi maxVI,minVI;
-  mat_max(V,1,maxV,maxVI);
-  mat_min(V,1,minV,minVI);
+  igl::max(V,1,maxV,maxVI);
+  igl::min(V,1,minV,minVI);
   return sqrt((maxV-minV).array().square().sum());
 }
 

+ 2 - 0
include/igl/copyleft/cgal/remesh_intersections.cpp

@@ -515,6 +515,8 @@ IGL_INLINE void igl::copyleft::cgal::remesh_intersections(
 
 #ifdef IGL_STATIC_LIBRARY
 // Explicit template instantiation
+template void igl::copyleft::cgal::remesh_intersections<Eigen::Matrix<CGAL::Epeck::FT, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, CGAL::Epick, Eigen::Matrix<CGAL::Epeck::FT, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::MatrixBase<Eigen::Matrix<CGAL::Epeck::FT, -1, 3, 0, -1, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, std::vector<CGAL::Triangle_3<CGAL::Epick>, std::allocator<CGAL::Triangle_3<CGAL::Epick> > > const&, std::map<Eigen::Matrix<int, -1, -1, 0, -1, -1>::Index, std::vector<std::pair<Eigen::Matrix<int, -1, -1, 0, -1, -1>::Index, CGAL::Object>, std::allocator<std::pair<Eigen::Matrix<int, -1, -1, 0, -1, -1>::Index, CGAL::Object> > >, std::less<Eigen::Matrix<int, -1, -1, 0, -1, -1>::Index>, std::allocator<std::pair<Eigen::Matrix<int, -1, -1, 0, -1, -1>::Index const, std::vector<std::pair<Eigen::Matrix<int, -1, -1, 0, -1, -1>::Index, CGAL::Object>, std::allocator<std::pair<Eigen::Matrix<int, -1, -1, 0, -1, -1>::Index, CGAL::Object> > > > > > const&, bool, bool, Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Epeck::FT, -1, 3, 0, -1, 3> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
+template void igl::copyleft::cgal::remesh_intersections<Eigen::Matrix<CGAL::Epeck::FT, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3>, CGAL::Epick, Eigen::Matrix<CGAL::Epeck::FT, -1, -1, 1, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::MatrixBase<Eigen::Matrix<CGAL::Epeck::FT, -1, 3, 0, -1, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&, std::vector<CGAL::Triangle_3<CGAL::Epick>, std::allocator<CGAL::Triangle_3<CGAL::Epick> > > const&, std::map<Eigen::Matrix<int, -1, 3, 0, -1, 3>::Index, std::vector<std::pair<Eigen::Matrix<int, -1, 3, 0, -1, 3>::Index, CGAL::Object>, std::allocator<std::pair<Eigen::Matrix<int, -1, 3, 0, -1, 3>::Index, CGAL::Object> > >, std::less<Eigen::Matrix<int, -1, 3, 0, -1, 3>::Index>, std::allocator<std::pair<Eigen::Matrix<int, -1, 3, 0, -1, 3>::Index const, std::vector<std::pair<Eigen::Matrix<int, -1, 3, 0, -1, 3>::Index, CGAL::Object>, std::allocator<std::pair<Eigen::Matrix<int, -1, 3, 0, -1, 3>::Index, CGAL::Object> > > > > > const&, bool, bool, Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Epeck::FT, -1, -1, 1, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
 // generated by autoexplicit.sh
 template void igl::copyleft::cgal::remesh_intersections<Eigen::Matrix<CGAL::Epeck::FT, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3>, CGAL::Epeck, Eigen::Matrix<CGAL::Epeck::FT, -1, -1, 1, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::MatrixBase<Eigen::Matrix<CGAL::Epeck::FT, -1, 3, 0, -1, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&, std::vector<CGAL::Triangle_3<CGAL::Epeck>, std::allocator<CGAL::Triangle_3<CGAL::Epeck> > > const&, std::map<Eigen::Matrix<int, -1, 3, 0, -1, 3>::Index, std::vector<std::pair<Eigen::Matrix<int, -1, 3, 0, -1, 3>::Index, CGAL::Object>, std::allocator<std::pair<Eigen::Matrix<int, -1, 3, 0, -1, 3>::Index, CGAL::Object> > >, std::less<Eigen::Matrix<int, -1, 3, 0, -1, 3>::Index>, std::allocator<std::pair<Eigen::Matrix<int, -1, 3, 0, -1, 3>::Index const, std::vector<std::pair<Eigen::Matrix<int, -1, 3, 0, -1, 3>::Index, CGAL::Object>, std::allocator<std::pair<Eigen::Matrix<int, -1, 3, 0, -1, 3>::Index, CGAL::Object> > > > > > const&, bool, bool, Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Epeck::FT, -1, -1, 1, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
 //

+ 2 - 2
include/igl/copyleft/cgal/resolve_intersections.h

@@ -14,6 +14,8 @@ namespace igl
 {
   namespace copyleft
   {
+    namespace cgal
+    {
     /// Given a list of possible intersecting segments with endpoints, split
     /// segments to overlap only at endpoints
     ///
@@ -24,8 +26,6 @@ namespace igl
     /// @param[out] EI  #EI by 2 list of segment indices into V, #EI ≥ #E
     /// @param[out] J  #EI list of indices into E revealing "parent segments"
     /// @param[out] IM  #VI list of indices into VV of unique vertices.
-    namespace cgal
-    {
       template <
         typename DerivedV, 
         typename DerivedE, 

+ 4 - 4
include/igl/copyleft/comiso/frame_field.cpp

@@ -7,10 +7,10 @@
 // obtain one at http://mozilla.org/MPL/2.0/.
 #include "frame_field.h"
 
-#include <igl/triangle_triangle_adjacency.h>
-#include <igl/edge_topology.h>
-#include <igl/per_face_normals.h>
-#include <igl/copyleft/comiso/nrosy.h>
+#include "../../triangle_triangle_adjacency.h"
+#include "../../edge_topology.h"
+#include "../../per_face_normals.h"
+#include "nrosy.h"
 #include <iostream>
 
 namespace igl

+ 2 - 2
include/igl/copyleft/comiso/frame_field.h

@@ -8,8 +8,8 @@
 #ifndef IGL_COMISO_FRAMEFIELD_H
 #define IGL_COMISO_FRAMEFIELD_H
 
-#include <igl/igl_inline.h>
-#include <igl/PI.h>
+#include "../../igl_inline.h"
+#include "../../PI.h"
 #include <Eigen/Dense>
 #include <vector>
 

+ 4 - 4
include/igl/copyleft/comiso/nrosy.cpp

@@ -8,10 +8,10 @@
 
 #include "nrosy.h"
 
-#include <igl/copyleft/comiso/nrosy.h>
-#include <igl/triangle_triangle_adjacency.h>
-#include <igl/edge_topology.h>
-#include <igl/per_face_normals.h>
+#include "nrosy.h"
+#include "../../triangle_triangle_adjacency.h"
+#include "../../edge_topology.h"
+#include "../../per_face_normals.h"
 
 #include <stdexcept>
 #include "../../PI.h"

+ 1 - 2
include/igl/cotmatrix.cpp

@@ -80,7 +80,6 @@ IGL_INLINE void igl::cotmatrix(
 
 #include "massmatrix.h"
 #include "cotmatrix_entries.h"
-#include "diag.h"
 #include "massmatrix.h"
 #include <Eigen/Geometry>
 #include <Eigen/QR>
@@ -198,7 +197,7 @@ IGL_INLINE void igl::cotmatrix(
   const Eigen::SparseMatrix<Scalar> PTMP = P.transpose() * Mf * P;
   // Lump M
   const VectorXS Mdiag = PTMP * VectorXS::Ones(n,1);
-  igl::diag(Mdiag,M);
+  M = Eigen::SparseMatrix<Scalar>(Mdiag.asDiagonal());
 
   MatrixXS Vf = P*V;
   Eigen::MatrixXi Ff(I.size(),3);

+ 0 - 1
include/igl/covariance_scatter_matrix.cpp

@@ -8,7 +8,6 @@
 #include "covariance_scatter_matrix.h"
 #include "arap_linear_block.h"
 #include "cotmatrix.h"
-#include "diag.h"
 #include "sum.h"
 #include "edges.h"
 #include "verbose.h"

+ 7 - 7
include/igl/cross_field_mismatch.cpp

@@ -11,13 +11,13 @@
 #include <cmath>
 #include <vector>
 #include <deque>
-#include <igl/comb_cross_field.h>
-#include <igl/per_face_normals.h>
-#include <igl/is_border_vertex.h>
-#include <igl/vertex_triangle_adjacency.h>
-#include <igl/triangle_triangle_adjacency.h>
-#include <igl/rotation_matrix_from_directions.h>
-#include <igl/PI.h>
+#include "comb_cross_field.h"
+#include "per_face_normals.h"
+#include "is_border_vertex.h"
+#include "vertex_triangle_adjacency.h"
+#include "triangle_triangle_adjacency.h"
+#include "rotation_matrix_from_directions.h"
+#include "PI.h"
 
 namespace igl {
   template <typename DerivedV, typename DerivedF, typename DerivedM>

+ 4 - 4
include/igl/cut_mesh.cpp

@@ -5,10 +5,10 @@
 // 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 <igl/cut_mesh.h>
-#include <igl/triangle_triangle_adjacency.h>
-#include <igl/HalfEdgeIterator.h>
-#include <igl/is_border_vertex.h>
+#include "cut_mesh.h"
+#include "triangle_triangle_adjacency.h"
+#include "HalfEdgeIterator.h"
+#include "is_border_vertex.h"
 
 // wrapper for input/output style
 template <typename DerivedV, typename DerivedF, typename DerivedC>

+ 2 - 2
include/igl/cut_mesh_from_singularities.cpp

@@ -8,8 +8,8 @@
 
 #include "cut_mesh_from_singularities.h"
 
-#include <igl/triangle_triangle_adjacency.h>
-#include <igl/edge_topology.h>
+#include "triangle_triangle_adjacency.h"
+#include "edge_topology.h"
 
 #include <vector>
 #include <deque>

+ 0 - 51
include/igl/deprecated.h

@@ -1,51 +0,0 @@
-// This file is part of libigl, a simple c++ geometry processing library.
-// 
-// Copyright (C) 2015 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_DEPRECATED_H
-#define IGL_DEPRECATED_H
-// Macro for marking a function as deprecated.
-// Use C++14 feature [[deprecated]] if available.
-// See also https://stackoverflow.com/questions/295120/c-mark-as-deprecated/21265197#21265197
-
-#ifdef __has_cpp_attribute
-#  define IGL_HAS_CPP_ATTRIBUTE(x) __has_cpp_attribute(x)
-#else
-#  define IGL_HAS_CPP_ATTRIBUTE(x) 0
-#endif
-
-#ifdef _MSC_VER
-#  define IGL_MSC_VER _MSC_VER
-#else
-#  define IGL_MSC_VER 0
-#endif
-
-#ifndef IGL_DEPRECATED
-#  if (IGL_HAS_CPP_ATTRIBUTE(deprecated) && __cplusplus >= 201402L) || \
-      IGL_MSC_VER >= 1900
-#    define IGL_DEPRECATED [[deprecated]]
-#  else
-#    if defined(__GNUC__) || defined(__clang__)
-#      define IGL_DEPRECATED __attribute__((deprecated))
-#    elif IGL_MSC_VER
-#      define IGL_DEPRECATED __declspec(deprecated)
-#    else
-#      pragma message("WARNING: You need to implement IGL_DEPRECATED for this compiler")
-#      define IGL_DEPRECATED /* deprecated */
-#    endif
-#  endif
-#endif
-
-// Usage:
-//
-//     template <typename T>
-//     IGL_INLINE void my_func(Arg1 a);
-//
-// becomes
-//
-//     template <typename T>
-//     IGL_DEPRECATED IGL_INLINE void my_func(Arg1 a);
-#endif

+ 0 - 75
include/igl/diag.cpp

@@ -1,75 +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 "diag.h"
-
-#include "verbose.h"
-
-// Bug in unsupported/Eigen/SparseExtra needs iostream first
-#include <iostream>
-#include <unsupported/Eigen/SparseExtra>
-
-template <typename T>
-IGL_INLINE void igl::diag(
-  const Eigen::SparseMatrix<T>& X,
-  Eigen::SparseVector<T>& V)
-{
-  assert(false && "Just call X.diagonal().sparseView() directly");
-  V = X.diagonal().sparseView();
-}
-
-template <typename T,typename DerivedV>
-IGL_INLINE void igl::diag(
-  const Eigen::SparseMatrix<T>& X,
-  Eigen::MatrixBase<DerivedV> & V)
-{
-  assert(false && "Just call X.diagonal() directly");
-  V = X.diagonal();
-}
-
-template <typename T>
-IGL_INLINE void igl::diag(
-  const Eigen::SparseVector<T>& V,
-  Eigen::SparseMatrix<T>& X)
-{
-  // clear and resize output
-  std::vector<Eigen::Triplet<double> > Xijv;
-  const int n = V.size();
-  const int nnz = V.nonZeros();
-  Xijv.reserve(nnz);
-  // loop over non-zeros
-  for(typename Eigen::SparseVector<T>::InnerIterator it(V); it; ++it)
-  {
-    Xijv.emplace_back(it.index(),it.index(),it.value());
-  }
-  X.resize(n,n);
-  X.setFromTriplets(Xijv.begin(),Xijv.end());
-}
-
-template <typename T, typename DerivedV>
-IGL_INLINE void igl::diag(
-  const Eigen::MatrixBase<DerivedV> & V,
-  Eigen::SparseMatrix<T>& X)
-{
-  assert(V.rows() == 1 || V.cols() == 1);
-  // clear and resize output
-  std::vector<Eigen::Triplet<double> > Xijv;
-  const int n = V.size();
-  Xijv.reserve(n);
-  // loop over non-zeros
-  for(int i = 0;i<n;i++) { Xijv.emplace_back(i,i,V(i)); }
-  X.resize(n,n);
-  X.setFromTriplets(Xijv.begin(),Xijv.end());
-}
-
-#ifdef IGL_STATIC_LIBRARY
-// Explicit template instantiation
-template void igl::diag<double, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::SparseMatrix<double, 0, int> const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&);
-template void igl::diag<double>(Eigen::SparseMatrix<double, 0, int> const&, Eigen::SparseVector<double, 0, int>&);
-template void igl::diag<double, Eigen::Matrix<double, -1, 1, 0, -1, 1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> > const&, Eigen::SparseMatrix<double, 0, int>&);
-template void igl::diag<double>(Eigen::SparseVector<double, 0, int> const&, Eigen::SparseMatrix<double, 0, int>&);
-#endif

+ 0 - 60
include/igl/diag.h

@@ -1,60 +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_DIAG_H
-#define IGL_DIAG_H
-#include "igl_inline.h"
-#define EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET
-#include <Eigen/Sparse>
-
-namespace igl
-{
-  /// Extracts the main diagonal of a matrix as a vector. Like matlab's `diag`.
-  ///
-  ///
-  /// @tparam T  should be a eigen sparse matrix primitive type like int or double
-  /// @param[in] X  an m by n sparse matrix
-  /// @param[out] V  a min(m,n) sparse vector
-  ///
-  /// http://forum.kde.org/viewtopic.php?f=74&t=117476&p=292388#p292388
-  ///
-  /// \deprecated Use 
-  ///   `VectorXd V = X.diagonal()` and 
-  ///   `SparseVector<double> V = X.diagonal().sparseView()`
-  ///   `SparseMatrix<double> X = V.asDiagonal().sparseView()`
-  ///
-  ///
-  template <typename T>
-  IGL_INLINE void diag(
-    const Eigen::SparseMatrix<T>& X, 
-    Eigen::SparseVector<T>& V);
-  /// \overload
-  template <typename T,typename DerivedV>
-  IGL_INLINE void diag(
-    const Eigen::SparseMatrix<T>& X, 
-    Eigen::MatrixBase<DerivedV>& V);
-  /// Builds a sparse matrix with a given vector along the main diagonal.
-  ///
-  /// @tparam T  should be a eigen sparse matrix primitive type like int or double
-  /// @param[in] V  a m sparse vector
-  /// @param[out] X  a m by m sparse matrix
-  template <typename T>
-  IGL_INLINE void diag(
-    const Eigen::SparseVector<T>& V,
-    Eigen::SparseMatrix<T>& X);
-  /// \overload
-  template <typename T, typename DerivedV>
-  IGL_INLINE void diag(
-    const Eigen::MatrixBase<DerivedV>& V,
-    Eigen::SparseMatrix<T>& X);
-}
-
-#ifndef IGL_STATIC_LIBRARY
-#  include "diag.cpp"
-#endif
-
-#endif

+ 3 - 1
include/igl/dot_row.h

@@ -20,7 +20,9 @@ namespace igl
   /// @param[in] B  eigen matrix r by c
   /// @param[out] d a column vector with r entries that contains the dot product of each corresponding row of A and B
   ///
-  /// \deprecated Use Eigen's `.rowwise().dot()` instead
+  /// \note Unfortunately, Eigen does not support `A.rowwise().dot(B.rowwise())`
+  /// so this function is a wrapper around the less obvious and less convenient
+  /// `(A.array() * B.array()).rowwise().sum()`.
   template <typename DerivedV>
   IGL_INLINE DerivedV dot_row(
     const Eigen::PlainObjectBase<DerivedV>& A,

+ 2 - 2
include/igl/ears.cpp

@@ -2,7 +2,7 @@
 #include "on_boundary.h"
 #include "find.h"
 #include "slice.h"
-#include "mat_min.h"
+#include "min.h"
 #include <cassert>
 
 template <
@@ -24,7 +24,7 @@ IGL_INLINE void igl::ears(
   Eigen::Array<bool, Eigen::Dynamic, 3> Bear;
   slice(B, ear, 1, Bear);
   Eigen::Array<bool, Eigen::Dynamic, 1> M;
-  mat_min(Bear,2,M,ear_opp);
+  igl::min(Bear,2,M,ear_opp);
 }
 
 #ifdef IGL_STATIC_LIBRARY

+ 1 - 1
include/igl/embree/EmbreeIntersector.cpp

@@ -2,7 +2,7 @@
 #include "EmbreeIntersector.h"
 
 // Implementation
-#include <igl/EPS.h>
+#include "../EPS.h"
 
 IGL_INLINE igl::embree::EmbreeIntersector::EmbreeIntersector()
   :

+ 1 - 1
include/igl/embree/EmbreeRenderer.h

@@ -13,7 +13,7 @@
 #ifndef IGL_EMBREE_EMBREE_RENDERER_H
 #define IGL_EMBREE_EMBREE_RENDERER_H
 
-#include <igl/colormap.h>
+#include "../colormap.h"
 
 #include <Eigen/Geometry>
 #include <Eigen/Core>

+ 2 - 2
include/igl/embree/bone_heat.cpp

@@ -11,7 +11,7 @@
 #include "../project_to_line_segment.h"
 #include "../cotmatrix.h"
 #include "../massmatrix.h"
-#include "../mat_min.h"
+#include "../min.h"
 #include <Eigen/Sparse>
 
 bool igl::embree::bone_heat(
@@ -81,7 +81,7 @@ bool igl::embree::bone_heat(
   VectorXd min_D;
   VectorXd Hdiag = VectorXd::Zero(n);
   VectorXi J;
-  mat_min(D,2,min_D,J);
+  igl::min(D,2,min_D,J);
   for(int i = 0;i<n;i++)
   {
     PP(i,J(i)) = 1;

+ 1 - 1
include/igl/embree/bone_visible.h

@@ -7,7 +7,7 @@
 // obtain one at http://mozilla.org/MPL/2.0/.
 #ifndef IGL_EMBREE_BONE_VISIBLE_H
 #define IGL_EMBREE_BONE_VISIBLE_H
-#include <igl/igl_inline.h>
+#include "../igl_inline.h"
 #include <Eigen/Core>
 #include "EmbreeIntersector.h"
 namespace igl

+ 2 - 2
include/igl/embree/line_mesh_intersection.cpp

@@ -12,8 +12,8 @@
 #include <cstdio>
 #include <vector>
 
-#include <igl/per_vertex_normals.h>
-#include <igl/embree/EmbreeIntersector.h>
+#include "../per_vertex_normals.h"
+#include "EmbreeIntersector.h"
 
 template <typename ScalarMatrix, typename IndexMatrix>
 IGL_INLINE ScalarMatrix igl::embree::line_mesh_intersection

+ 1 - 1
include/igl/embree/line_mesh_intersection.h

@@ -7,7 +7,7 @@
 // obtain one at http://mozilla.org/MPL/2.0/.
 #ifndef IGL_EMBREE_LINE_MESH_INTERSECTION_H
 #define IGL_EMBREE_LINE_MESH_INTERSECTION_H
-#include <igl/igl_inline.h>
+#include "../igl_inline.h"
 
 #include <Eigen/Dense>
 #include <Eigen/Sparse>

+ 1 - 1
include/igl/embree/unproject_in_mesh.h

@@ -7,7 +7,7 @@
 // obtain one at http://mozilla.org/MPL/2.0/.
 #ifndef IGL_EMBREE_UNPROJECT_IN_MESH
 #define IGL_EMBREE_UNPROJECT_IN_MESH
-#include <igl/igl_inline.h>
+#include "../igl_inline.h"
 #include <Eigen/Core>
 
 #include <vector>

+ 1 - 1
include/igl/embree/unproject_onto_mesh.h

@@ -7,7 +7,7 @@
 // obtain one at http://mozilla.org/MPL/2.0/.
 #ifndef IGL_EMBREE_UNPROJECT_ONTO_MESH_H
 #define IGL_EMBREE_UNPROJECT_ONTO_MESH_H
-#include <igl/igl_inline.h>
+#include "../igl_inline.h"
 #include <Eigen/Core>
 
 #include <vector>

+ 0 - 19
include/igl/euler_characteristic.cpp

@@ -9,24 +9,6 @@
 
 #include "edge_topology.h"
 #include "edges.h"
-
-template <typename Scalar, typename Index>
-IGL_INLINE int igl::euler_characteristic(
-  const Eigen::MatrixBase<Scalar> & V,
-  const Eigen::MatrixBase<Index> & F)
-{
-
-  int euler_v = V.rows();
-  Eigen::MatrixXi EV, FE, EF;
-  igl::edge_topology(V, F, EV, FE, EF);
-  int euler_e = EV.rows();
-  int euler_f = F.rows();
-
-  int euler_char = euler_v - euler_e + euler_f;
-  return euler_char;
-
-}
-
 template <typename DerivedF>
 IGL_INLINE int igl::euler_characteristic(
   const Eigen::MatrixBase<DerivedF> & F)
@@ -41,6 +23,5 @@ IGL_INLINE int igl::euler_characteristic(
 
 #ifdef IGL_STATIC_LIBRARY
 // Explicit template instantiation
-template int igl::euler_characteristic<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 int igl::euler_characteristic<Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&);
 #endif

+ 0 - 15
include/igl/euler_characteristic.h

@@ -22,21 +22,6 @@ namespace igl
   template <typename DerivedF>
   IGL_INLINE int euler_characteristic(
     const Eigen::MatrixBase<DerivedF> & F);
-  /// Computes the Euler characteristic of a given mesh (V,F)
-  /// 
-  /// @tparam Scalar  should be a floating point number type
-  /// @tparam Index   should be an integer type
-  /// @param[in] V       #V by dim list of mesh vertex positions
-  /// @param[in] F       #F by dim list of mesh faces (must be triangles)
-  /// @return int containing the Euler characteristic
-  ///
-  /// \deprecated This version is inferior to the one above because it
-  /// unecessarily requires V and expensively calls edge_topology
-  template <typename Scalar, typename Index>
-  IGL_INLINE int euler_characteristic(
-    const Eigen::MatrixBase<Scalar> & V,
-    const Eigen::MatrixBase<Index> & F);
-
 }
 
 #ifndef IGL_STATIC_LIBRARY

+ 1 - 1
include/igl/exact_geodesic.cpp

@@ -12,7 +12,7 @@
 //Code from https://code.google.com/archive/p/geodesic/
 // Compiled into a single file by Zhongshi Jiang
 
-#include <igl/PI.h>
+#include "PI.h"
 #include <algorithm>
 #include <cassert>
 #include <cmath>

+ 1 - 1
include/igl/false_barycentric_subdivision.cpp

@@ -9,7 +9,7 @@
 
 #include "verbose.h"
 #include <algorithm>
-#include <igl/barycenter.h>
+#include "barycenter.h"
 
 template <typename Scalar, typename Index>
 IGL_INLINE void igl::false_barycentric_subdivision(

+ 6 - 1
include/igl/fast_winding_number.h

@@ -130,13 +130,18 @@ namespace igl
     const Eigen::MatrixBase<DerivedQ>& Q,
     Eigen::PlainObjectBase<DerivedWN>& WN);
   /// @private
-  namespace FastWindingNumber { namespace HDK_Sample{ template <typename T1, typename T2> class UT_SolidAngle;} }
+  namespace FastWindingNumber { 
+    /// @private
+    namespace HDK_Sample{ 
+      /// @private
+      template <typename T1, typename T2> class UT_SolidAngle;} }
   /// Structure for caching precomputation for fast winding number for triangle
   /// soups
   struct FastWindingNumberBVH {
     /// @private
     FastWindingNumber::HDK_Sample::UT_SolidAngle<float,float> ut_solid_angle;
     // Need copies of these so they stay alive between calls.
+    /// @private
     std::vector<FastWindingNumber::HDK_Sample::UT_Vector3T<float> > U;
     std::vector<int> F;
   };

+ 4 - 4
include/igl/find_cross_field_singularities.cpp

@@ -9,10 +9,10 @@
 #include "find_cross_field_singularities.h"
 
 #include <vector>
-#include <igl/cross_field_mismatch.h>
-#include <igl/is_border_vertex.h>
-#include <igl/vertex_triangle_adjacency.h>
-#include <igl/is_border_vertex.h>
+#include "cross_field_mismatch.h"
+#include "is_border_vertex.h"
+#include "vertex_triangle_adjacency.h"
+#include "is_border_vertex.h"
 
 
 template <typename DerivedV, typename DerivedF, typename DerivedM, typename DerivedO>

+ 3 - 3
include/igl/frame_field_deformer.cpp

@@ -11,9 +11,9 @@
 #include <Eigen/Sparse>
 #include <vector>
 
-#include <igl/cotmatrix_entries.h>
-#include <igl/cotmatrix.h>
-#include <igl/vertex_triangle_adjacency.h>
+#include "cotmatrix_entries.h"
+#include "cotmatrix.h"
+#include "vertex_triangle_adjacency.h"
 
 namespace igl
 {

+ 2 - 2
include/igl/frame_to_cross_field.cpp

@@ -6,8 +6,8 @@
 // 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 "frame_to_cross_field.h"
-#include <igl/local_basis.h>
-#include <igl/dot_row.h>
+#include "local_basis.h"
+#include "dot_row.h"
 
 IGL_INLINE void igl::frame_to_cross_field(
   const Eigen::MatrixXd& V,

+ 16 - 0
include/igl/get_seconds.cpp

@@ -6,6 +6,21 @@
 // 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 "get_seconds.h"
+
+#if _WIN32
+// Alec: Why is this more "hires" than chrono?
+#  include <windows.h>
+#  include <cassert>
+IGL_INLINE double igl::get_seconds()
+{
+  LARGE_INTEGER li_freq, li_current;
+  const bool ret = QueryPerformanceFrequency(&li_freq);
+  const bool ret2 = QueryPerformanceCounter(&li_current);
+  assert(ret && ret2);
+  assert(li_freq.QuadPart > 0);
+  return double(li_current.QuadPart) / double(li_freq.QuadPart);
+}
+#else
 #include <chrono>
 IGL_INLINE double igl::get_seconds()
 {
@@ -13,3 +28,4 @@ IGL_INLINE double igl::get_seconds()
     std::chrono::duration<double>(
       std::chrono::system_clock::now().time_since_epoch()).count();
 }
+#endif

+ 9 - 0
include/igl/get_seconds.h

@@ -9,6 +9,15 @@
 #define IGL_GET_SECONDS_H
 #include "igl_inline.h"
 
+#define IGL_TICTOC_LAMBDA \
+      const auto & tictoc = []() \
+      { \
+        static double t_start = igl::get_seconds(); \
+        double diff = igl::get_seconds()-t_start; \
+        t_start += diff; \
+        return diff; \
+      };
+
 namespace igl
 {
   /// Current time in seconds 

+ 0 - 29
include/igl/get_seconds_hires.cpp

@@ -1,29 +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 "get_seconds_hires.h"
-
-#if _WIN32
-#  include <windows.h>
-#  include <cassert>
-IGL_INLINE double igl::get_seconds_hires()
-{
-  LARGE_INTEGER li_freq, li_current;
-  const bool ret = QueryPerformanceFrequency(&li_freq);
-  const bool ret2 = QueryPerformanceCounter(&li_current);
-  assert(ret && ret2);
-  assert(li_freq.QuadPart > 0);
-  return double(li_current.QuadPart) / double(li_freq.QuadPart);
-}
-#else
-#  include "get_seconds.h"
-IGL_INLINE double igl::get_seconds_hires()
-{
-  // Sorry I've no idea how performance counters work on Mac...
-  return igl::get_seconds();
-}
-#endif

+ 0 - 26
include/igl/get_seconds_hires.h

@@ -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/.
-#ifndef IGL_GET_SECONDS_HIRES_H
-#define IGL_GET_SECONDS_HIRES_H
-#include "igl_inline.h"
-
-namespace igl
-{
-  /// Current time in seconds 
-  ///
-  /// @return the current time in seconds using performance counters
-  ///
-  /// \deprecated just use get_seconds instead
-  IGL_INLINE double get_seconds_hires();
-}
-
-#ifndef IGL_STATIC_LIBRARY
-#  include "get_seconds_hires.cpp"
-#endif
-
-#endif

+ 5 - 7
include/igl/harmonic.cpp

@@ -8,7 +8,6 @@
 #include "harmonic.h"
 #include "adjacency_matrix.h"
 #include "cotmatrix.h"
-#include "diag.h"
 #include "invert_diag.h"
 #include "isdiag.h"
 #include "massmatrix.h"
@@ -59,12 +58,11 @@ IGL_INLINE bool igl::harmonic(
   SparseMatrix<Scalar> A;
   adjacency_matrix(F,A);
   // sum each row
-  SparseVector<Scalar> Asum;
-  sum(A,1,Asum);
-  // Convert row sums into diagonal of sparse matrix
-  SparseMatrix<Scalar> Adiag;
-  diag(Asum,Adiag);
-  SparseMatrix<Scalar> L = A-Adiag;
+  Eigen::VectorXd Asum;
+  igl::sum(A,1,Asum);
+  // Eigen 3.4 still struggles to do arithmetic with sparse and diagonal matrices
+  Eigen::SparseMatrix<Scalar> L = A - Eigen::SparseMatrix<Scalar>(Asum.asDiagonal());
+
   SparseMatrix<Scalar> M;
   speye(L.rows(),M);
   return harmonic(L,M,b,bc,k,W);

+ 0 - 1
include/igl/internal_angles.h

@@ -8,7 +8,6 @@
 #ifndef IGL_INTERNAL_ANGLES_H
 #define IGL_INTERNAL_ANGLES_H
 #include "igl_inline.h"
-#include "deprecated.h"
 #include <Eigen/Core>
 namespace igl
 {

+ 0 - 1
include/igl/is_border_vertex.h

@@ -8,7 +8,6 @@
 #ifndef IGL_IS_BORDER_VERTEX_H
 #define IGL_IS_BORDER_VERTEX_H
 #include "igl_inline.h"
-#include "deprecated.h"
 #include <Eigen/Core>
 #include <vector>
 

+ 1 - 1
include/igl/kelvinlets.h

@@ -3,7 +3,7 @@
 
 #include <Eigen/Core>
 #include <array>
-#include <igl/igl_inline.h>
+#include "igl_inline.h"
 
 namespace igl {
 

+ 11 - 11
include/igl/line_field_mismatch.cpp

@@ -10,17 +10,17 @@
 
 #include <vector>
 #include <deque>
-#include <igl/comb_line_field.h>
-#include <igl/rotate_vectors.h>
-#include <igl/comb_cross_field.h>
-#include <igl/comb_line_field.h>
-#include <igl/per_face_normals.h>
-#include <igl/is_border_vertex.h>
-#include <igl/vertex_triangle_adjacency.h>
-#include <igl/triangle_triangle_adjacency.h>
-#include <igl/rotation_matrix_from_directions.h>
-#include <igl/local_basis.h>
-#include <igl/PI.h>
+#include "comb_line_field.h"
+#include "rotate_vectors.h"
+#include "comb_cross_field.h"
+#include "comb_line_field.h"
+#include "per_face_normals.h"
+#include "is_border_vertex.h"
+#include "vertex_triangle_adjacency.h"
+#include "triangle_triangle_adjacency.h"
+#include "rotation_matrix_from_directions.h"
+#include "local_basis.h"
+#include "PI.h"
 
 namespace igl {
 template <typename DerivedV, typename DerivedF, typename DerivedO>

+ 3 - 3
include/igl/loop.cpp

@@ -8,9 +8,9 @@
 
 #include "loop.h"
 
-#include <igl/adjacency_list.h>
-#include <igl/triangle_triangle_adjacency.h>
-#include <igl/unique.h>
+#include "adjacency_list.h"
+#include "triangle_triangle_adjacency.h"
+#include "unique.h"
 
 #include <vector>
 

+ 1 - 1
include/igl/loop.h

@@ -9,7 +9,7 @@
 #ifndef IGL_LOOP_H
 #define IGL_LOOP_H
 
-#include <igl/igl_inline.h>
+#include "igl_inline.h"
 #include <Eigen/Core>
 #include <Eigen/Sparse>
 

+ 0 - 1
include/igl/massmatrix.cpp

@@ -8,7 +8,6 @@
 #include "massmatrix.h"
 #include "massmatrix_intrinsic.h"
 #include "edge_lengths.h"
-#include "normalize_row_sums.h"
 #include "sparse.h"
 #include "doublearea.h"
 #include "volume.h"

+ 3 - 2
include/igl/massmatrix_intrinsic.cpp

@@ -7,7 +7,6 @@
 // obtain one at http://mozilla.org/MPL/2.0/.
 #include "massmatrix_intrinsic.h"
 #include "edge_lengths.h"
-#include "normalize_row_sums.h"
 #include "sparse.h"
 #include "doublearea.h"
 #include "repmat.h"
@@ -82,7 +81,9 @@ IGL_INLINE void igl::massmatrix_intrinsic(
         cosines.col(2) = 
           (l.col(1).array().pow(2)+l.col(0).array().pow(2)-l.col(2).array().pow(2))/(l.col(0).array()*l.col(1).array()*2.0);
         Matrix<Scalar,Dynamic,3> barycentric = cosines.array() * l.array();
-        normalize_row_sums(barycentric,barycentric);
+        // Replace this: normalize_row_sums(barycentric,barycentric);
+        barycentric  = (barycentric.array().colwise() / barycentric.array().rowwise().sum()).eval();
+
         Matrix<Scalar,Dynamic,3> partial = barycentric;
         partial.col(0).array() *= dblA.array() * 0.5;
         partial.col(1).array() *= dblA.array() * 0.5;

+ 0 - 46
include/igl/mat_max.cpp

@@ -1,46 +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 "mat_max.h"
-
-template <typename DerivedX, typename DerivedY, typename DerivedI>
-IGL_INLINE void igl::mat_max(
-  const Eigen::DenseBase<DerivedX> & X,
-  const int dim,
-  Eigen::PlainObjectBase<DerivedY> & Y,
-  Eigen::PlainObjectBase<DerivedI> & I)
-{
-  assert(dim==1||dim==2);
-
-  // output size
-  int n = (dim==1?X.cols():X.rows());
-  // resize output
-  Y.resize(n);
-  I.resize(n);
-
-  // loop over dimension opposite of dim
-  for(int j = 0;j<n;j++)
-  {
-    typename DerivedX::Index PHONY,i;
-    typename DerivedX::Scalar  m;
-    if(dim==1)
-    {
-      m = X.col(j).maxCoeff(&i,&PHONY);
-    }else
-    {
-      m = X.row(j).maxCoeff(&PHONY,&i);
-    }
-    Y(j) = m;
-    I(j) = i;
-  }
-}
-
-#ifdef IGL_STATIC_LIBRARY
-// Explicit template instantiation
-// generated by autoexplicit.sh
-template void igl::mat_max<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::DenseBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, int, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
-#endif

+ 0 - 44
include/igl/mat_max.h

@@ -1,44 +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_MAT_MAX_H
-#define IGL_MAT_MAX_H
-#include "igl_inline.h"
-#include <Eigen/Dense>
-
-namespace igl
-{
-  /// Max function for matrices to act like matlab's max function. Specifically
-  /// like [Y,I] = max(X,[],dim);
-  ///
-  /// @tparam T  should be a eigen matrix primitive type like int or double
-  /// @param[in] X  m by n matrix
-  /// @param[in] dim  dimension along which to take max
-  /// @param[out] Y  n-long vector (if dim == 1), or
-  ///                m-long vector (if dim == 2)
-  /// @param[out] I  vector the same size as Y containing the indices along dim
-  ///   of maximum entries
-  ///
-  /// Compare to:
-  ///
-  ///     X.colwise().maxCoeff() 
-  ///     X.rowwise().maxCoeff() 
-  ///
-  /// \see mat_min
-  template <typename DerivedX, typename DerivedY, typename DerivedI>
-  IGL_INLINE void mat_max(
-    const Eigen::DenseBase<DerivedX> & X,
-    const int dim,
-    Eigen::PlainObjectBase<DerivedY> & Y,
-    Eigen::PlainObjectBase<DerivedI> & I);
-}
-
-#ifndef IGL_STATIC_LIBRARY
-#  include "mat_max.cpp"
-#endif
-
-#endif

+ 0 - 59
include/igl/mat_min.cpp

@@ -1,59 +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 "mat_min.h"
-
-template <typename DerivedX, typename DerivedY, typename DerivedI>
-IGL_INLINE void igl::mat_min(
-  const Eigen::DenseBase<DerivedX> & X,
-  const int dim,
-  Eigen::PlainObjectBase<DerivedY> & Y,
-  Eigen::PlainObjectBase<DerivedI> & I)
-{
-  assert(dim==1||dim==2);
-
-  // output size
-  int n = (dim==1?X.cols():X.rows());
-  // resize output
-  Y.resize(n,1);
-  I.resize(n,1);
-
-  // loop over dimension opposite of dim
-  for(int j = 0;j<n;j++)
-  {
-    typename DerivedX::Index PHONY,i;
-    typename DerivedX::Scalar  m;
-    if(dim==1)
-    {
-      m = X.col(j).minCoeff(&i,&PHONY);
-    }else
-    {
-      m = X.row(j).minCoeff(&PHONY,&i);
-    }
-    Y(j) = m;
-    I(j) = i;
-  }
-}
-
-//template <typename T>
-//IGL_INLINE Eigen::Matrix<T,Eigen::Dynamic,1> igl::mat_min(
-//  const Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic> & X,
-//  const int dim)
-//{
-//  Eigen::Matrix<T,Eigen::Dynamic,1> Y;
-//  Eigen::Matrix<int,Eigen::Dynamic,1> I;
-//  mat_min(X,dim,Y,I);
-//  return Y;
-//}
-
-#ifdef IGL_STATIC_LIBRARY
-// Explicit template instantiation
-// generated by autoexplicit.sh
-template void igl::mat_min<Eigen::Array<bool, -1, 3, 0, -1, 3>, Eigen::Array<bool, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::DenseBase<Eigen::Array<bool, -1, 3, 0, -1, 3> > const&, int, Eigen::PlainObjectBase<Eigen::Array<bool, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
-// generated by autoexplicit.sh
-template void igl::mat_min<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::DenseBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, int, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
-#endif

+ 0 - 44
include/igl/mat_min.h

@@ -1,44 +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_MAT_MIN_H
-#define IGL_MAT_MIN_H
-#include "igl_inline.h"
-#include <Eigen/Dense>
-
-namespace igl
-{
-  /// Min function for matrices to act like matlab's min function. Specifically
-  /// like [Y,I] = min(X,[],dim);
-  ///
-  /// @tparam T  should be a eigen matrix primitive type like int or double
-  /// @param[in] X  m by n matrix
-  /// @param[in] dim  dimension along which to take min
-  /// @param[out] Y  n-long vector (if dim == 1), or
-  ///                m-long vector (if dim == 2)
-  /// @param[out] I  vector the same size as Y containing the indices along dim
-  ///   of minimum entries
-  ///
-  /// Compare to:
-  ///
-  ///     X.colwise().minCoeff() 
-  ///     X.rowwise().minCoeff() 
-  ///
-  /// \see mat_max
-  template <typename DerivedX, typename DerivedY, typename DerivedI>
-  IGL_INLINE void mat_min(
-    const Eigen::DenseBase<DerivedX> & X,
-    const int dim,
-    Eigen::PlainObjectBase<DerivedY> & Y,
-    Eigen::PlainObjectBase<DerivedI> & I);
-}
-
-#ifndef IGL_STATIC_LIBRARY
-#  include "mat_min.cpp"
-#endif
-
-#endif

+ 1 - 1
include/igl/matlab/matlabinterface.cpp

@@ -5,7 +5,7 @@
 // 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 <igl/matlab/matlabinterface.h>
+#include "matlabinterface.h"
 
 // Implementation
 

+ 1 - 1
include/igl/matlab/parse_rhs.h

@@ -7,7 +7,7 @@
 // obtain one at http://mozilla.org/MPL/2.0/.
 #ifndef IGL_MATLAB_PARSE_RHS_H
 #define IGL_MATLAB_PARSE_RHS_H
-#include <igl/igl_inline.h>
+#include "../igl_inline.h"
 #include <mex.h>
 #include <Eigen/Dense>
 #include <Eigen/Sparse>

+ 1 - 1
include/igl/matlab/prepare_lhs.h

@@ -7,7 +7,7 @@
 // obtain one at http://mozilla.org/MPL/2.0/.
 #ifndef IGL_MATLAB_PREPARE_LHS_H
 #define IGL_MATLAB_PREPARE_LHS_H
-#include <igl/igl_inline.h>
+#include "../igl_inline.h"
 #include <mex.h>
 #include <Eigen/Dense>
 #include <Eigen/Sparse>

+ 33 - 1
include/igl/max.cpp

@@ -39,8 +39,40 @@ IGL_INLINE void igl::max(
   }
 }
 
+template <typename DerivedX, typename DerivedY, typename DerivedI>
+IGL_INLINE void igl::max(
+  const Eigen::DenseBase<DerivedX> & X,
+  const int dim,
+  Eigen::PlainObjectBase<DerivedY> & Y,
+  Eigen::PlainObjectBase<DerivedI> & I)
+{
+  assert(dim==1||dim==2);
+
+  // output size
+  int n = (dim==1?X.cols():X.rows());
+  // resize output
+  Y.resize(n);
+  I.resize(n);
+
+  // loop over dimension opposite of dim
+  for(int j = 0;j<n;j++)
+  {
+    typename DerivedX::Index PHONY,i;
+    typename DerivedX::Scalar  m;
+    if(dim==1)
+    {
+      m = X.col(j).maxCoeff(&i,&PHONY);
+    }else
+    {
+      m = X.row(j).maxCoeff(&PHONY,&i);
+    }
+    Y(j) = m;
+    I(j) = i;
+  }
+}
+
 #ifdef IGL_STATIC_LIBRARY
 // Explicit template instantiation
-// generated by autoexplicit.sh
+template void igl::max<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::DenseBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, int, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
 template void igl::max<bool, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::SparseMatrix<bool, 0, int> const&, int, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
 #endif

+ 13 - 4
include/igl/max.h

@@ -5,20 +5,29 @@
 #include <Eigen/Sparse>
 namespace igl
 {
+  /// Compute the maximum along dimension dim of a matrix X
+  ///
   /// \param[in] X  m by n matrix
   /// \param[in] dim  dimension along which to take max
-  /// \param[out] Y  n-long vector (if dim == 1) 
-  ///   or
+  /// @param[out] Y
+  ///   n-long vector (if dim == 1) 
   ///   Y  m-long vector (if dim == 2)
-  ///   I  vector the same size as Y containing the indices along dim of maximum
+  /// @param[out] I  vector the same size as Y containing the indices along dim of minimum
   ///     entries
-  /// \deprecated seems like a duplicate of mat_max
+  ///
   template <typename AType, typename DerivedB, typename DerivedI>
   IGL_INLINE void max(
     const Eigen::SparseMatrix<AType> & A,
     const int dim,
     Eigen::PlainObjectBase<DerivedB> & B,
     Eigen::PlainObjectBase<DerivedI> & I);
+  /// \overload
+  template <typename DerivedX, typename DerivedY, typename DerivedI>
+  IGL_INLINE void max(
+    const Eigen::DenseBase<DerivedX> & X,
+    const int dim,
+    Eigen::PlainObjectBase<DerivedY> & Y,
+    Eigen::PlainObjectBase<DerivedI> & I);
 }
 #ifndef IGL_STATIC_LIBRARY
 #  include "max.cpp"

+ 37 - 0
include/igl/min.cpp

@@ -39,3 +39,40 @@ IGL_INLINE void igl::min(
   }
 }
 
+template <typename DerivedX, typename DerivedY, typename DerivedI>
+IGL_INLINE void igl::min(
+  const Eigen::DenseBase<DerivedX> & X,
+  const int dim,
+  Eigen::PlainObjectBase<DerivedY> & Y,
+  Eigen::PlainObjectBase<DerivedI> & I)
+{
+  assert(dim==1||dim==2);
+
+  // output size
+  int n = (dim==1?X.cols():X.rows());
+  // resize output
+  Y.resize(n,1);
+  I.resize(n,1);
+
+  // loop over dimension opposite of dim
+  for(int j = 0;j<n;j++)
+  {
+    typename DerivedX::Index PHONY,i;
+    typename DerivedX::Scalar  m;
+    if(dim==1)
+    {
+      m = X.col(j).minCoeff(&i,&PHONY);
+    }else
+    {
+      m = X.row(j).minCoeff(&PHONY,&i);
+    }
+    Y(j) = m;
+    I(j) = i;
+  }
+}
+
+#ifdef IGL_STATIC_LIBRARY
+// Explicit template instantiation
+template void igl::min<Eigen::Array<bool, -1, 3, 0, -1, 3>, Eigen::Array<bool, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::DenseBase<Eigen::Array<bool, -1, 3, 0, -1, 3> > const&, int, Eigen::PlainObjectBase<Eigen::Array<bool, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
+template void igl::min<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::DenseBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, int, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
+#endif

+ 11 - 4
include/igl/min.h

@@ -5,21 +5,28 @@
 #include <Eigen/Sparse>
 namespace igl
 {
+  /// Compute the minimum along dimension dim of a matrix X
+  ///
   /// @param[in] X  m by n matrix
   /// @param[in] dim  dimension along which to take min
   /// @param[out] Y
-  ///   Y  n-long vector (if dim == 1) 
-  ///   or
+  ///   n-long vector (if dim == 1) 
   ///   Y  m-long vector (if dim == 2)
-  ///   I  vector the same size as Y containing the indices along dim of minimum
+  /// @param[out] I  vector the same size as Y containing the indices along dim of minimum
   ///     entries
-  ///  \deprecated seems like a duplicate of mat_min
   template <typename AType, typename DerivedB, typename DerivedI>
   IGL_INLINE void min(
     const Eigen::SparseMatrix<AType> & A,
     const int dim,
     Eigen::PlainObjectBase<DerivedB> & B,
     Eigen::PlainObjectBase<DerivedI> & I);
+  /// \overload
+  template <typename DerivedX, typename DerivedY, typename DerivedI>
+  IGL_INLINE void min(
+    const Eigen::DenseBase<DerivedX> & X,
+    const int dim,
+    Eigen::PlainObjectBase<DerivedY> & Y,
+    Eigen::PlainObjectBase<DerivedI> & I);
 }
 #ifndef IGL_STATIC_LIBRARY
 #  include "min.cpp"

+ 1 - 1
include/igl/min_quad_with_fixed.impl.h

@@ -23,7 +23,7 @@
 #include <unsupported/Eigen/SparseExtra>
 #include <cassert>
 #include <cstdio>
-#include <igl/matlab_format.h>
+#include "matlab_format.h"
 #include <type_traits>
 
 template <typename T, typename Derivedknown>

+ 0 - 33
include/igl/normalize_row_lengths.cpp

@@ -1,33 +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 "normalize_row_lengths.h"
-
-template <typename DerivedV>
-IGL_INLINE void igl::normalize_row_lengths(
-  const Eigen::PlainObjectBase<DerivedV>& A,
-  Eigen::PlainObjectBase<DerivedV> & B)
-{
-  // Resize output
-  B.resizeLike(A);
-
-  // loop over rows
-  for(int i = 0; i < A.rows();i++)
-  {
-    B.row(i) = A.row(i).normalized();
-  }
-  //// Or just:
-  //B = A;
-  //B.rowwise().normalize();
-}
-#ifdef IGL_STATIC_LIBRARY
-// Explicit template instantiation
-// generated by autoexplicit.sh
-template void igl::normalize_row_lengths<Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&);
-template void igl::normalize_row_lengths<Eigen::Matrix<double, -1, 3, 1, -1, 3> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 1, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 1, -1, 3> >&);
-template void igl::normalize_row_lengths<Eigen::Matrix<double, -1, 3, 0, -1, 3> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> >&);
-#endif

+ 0 - 36
include/igl/normalize_row_lengths.h

@@ -1,36 +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_NORMALIZE_ROW_LENGTHS_H
-#define IGL_NORMALIZE_ROW_LENGTHS_H
-#include "igl_inline.h"
-#include <Eigen/Core>
-
-// History:
-// March 24, 2012: Alec changed function name from normalize_rows to
-//   normalize_row_lengths to avoid confusion with normalize_row_sums
-
-namespace igl
-{
-  /// \deprecated just use A.rowwise().normalize() or B=A.rowwise().normalized();
-  ///
-  /// Normalize the rows in A so that their lengths are each 1 and place the new
-  /// entries in B
-  ///
-  /// @param[in] A  #rows by k input matrix
-  /// @param[out] B  #rows by k input matrix, can be the same as A
-  template <typename DerivedV>
-  IGL_INLINE void normalize_row_lengths(
-   const Eigen::PlainObjectBase<DerivedV>& A,
-   Eigen::PlainObjectBase<DerivedV> & B);
-}
-
-#ifndef IGL_STATIC_LIBRARY
-#  include "normalize_row_lengths.cpp"
-#endif
-
-#endif

+ 0 - 29
include/igl/normalize_row_sums.cpp

@@ -1,29 +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 "normalize_row_sums.h"
-
-template <typename DerivedA, typename DerivedB>
-IGL_INLINE void igl::normalize_row_sums(
-  const Eigen::MatrixBase<DerivedA>& A,
-  Eigen::MatrixBase<DerivedB> & B)
-{
-#ifndef NDEBUG
-  // loop over rows
-  for(int i = 0; i < A.rows();i++)
-  {
-    typename DerivedB::Scalar sum = A.row(i).sum();
-    assert(sum != 0);
-  }
-#endif
-  B = (A.array().colwise() / A.rowwise().sum().array()).eval();
-}
-#ifdef IGL_STATIC_LIBRARY
-// Explicit template instantiation
-template void igl::normalize_row_sums<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&);
-template void igl::normalize_row_sums<Eigen::Matrix<double, -1, 3, 0, -1, 3>, Eigen::Matrix<double, -1, 3, 0, -1, 3> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> >&);
-#endif

+ 0 - 35
include/igl/normalize_row_sums.h

@@ -1,35 +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_NORMALIZE_ROW_SUMS_H
-#define IGL_NORMALIZE_ROW_SUMS_H
-#include "igl_inline.h"
-#include <Eigen/Core>
-
-namespace igl
-{
-  /// Normalize the rows in A so that their sums are each 1 and place the new
-  /// entries in B
-  ///
-  /// @param[in] A  #rows by k input matrix
-  /// @param[out] B  #rows by k input matrix, can be the same as A
-  ///
-  /// \deprecated This is just calling an Eigen one-liner: 
-  ///
-  ///      B  = A.array().colwise() / A.array().rowwise().sum();
-  ///
-  template <typename DerivedA, typename DerivedB>
-  IGL_INLINE void normalize_row_sums(
-    const Eigen::MatrixBase<DerivedA>& A,
-    Eigen::MatrixBase<DerivedB> & B);
-}
-
-#ifndef IGL_STATIC_LIBRARY
-#  include "normalize_row_sums.cpp"
-#endif
-
-#endif

+ 1 - 1
include/igl/opengl/MeshGL.h

@@ -9,7 +9,7 @@
 #define IGL_OPENGL_MESHGL_H
 
 
-#include <igl/igl_inline.h>
+#include "../igl_inline.h"
 #include <Eigen/Core>
 
 namespace igl

+ 3 - 3
include/igl/opengl/ViewerCore.h

@@ -8,9 +8,9 @@
 #ifndef IGL_OPENGL_VIEWERCORE_H
 #define IGL_OPENGL_VIEWERCORE_H
 
-#include <igl/opengl/MeshGL.h>
+#include "MeshGL.h"
 
-#include <igl/igl_inline.h>
+#include "../igl_inline.h"
 #include <Eigen/Geometry>
 #include <Eigen/Core>
 
@@ -237,7 +237,7 @@ public:
 }
 }
 
-#include <igl/serialize.h>
+#include "../serialize.h"
 namespace igl {
   namespace serialization {
 

+ 3 - 3
include/igl/opengl/ViewerData.h

@@ -9,8 +9,8 @@
 #define IGL_VIEWERDATA_H
 
 #include "MeshGL.h"
-#include <igl/igl_inline.h>
-#include <igl/colormap.h>
+#include "../igl_inline.h"
+#include "../colormap.h"
 #include <cassert>
 #include <cstdint>
 #include <Eigen/Core>
@@ -363,7 +363,7 @@ public:
 
 ////////////////////////////////////////////////////////////////////////////////
 
-#include <igl/serialize.h>
+#include "../serialize.h"
 namespace igl
 {
   namespace serialization

+ 17 - 17
include/igl/opengl/glfw/Viewer.cpp

@@ -27,23 +27,23 @@
 #include <limits>
 #include <cassert>
 
-#include <igl/project.h>
-#include <igl/get_seconds.h>
-#include <igl/readOBJ.h>
-#include <igl/read_triangle_mesh.h>
-#include <igl/adjacency_list.h>
-#include <igl/writeOBJ.h>
-#include <igl/writeOFF.h>
-#include <igl/massmatrix.h>
-#include <igl/file_dialog_open.h>
-#include <igl/file_dialog_save.h>
-#include <igl/quat_mult.h>
-#include <igl/axis_angle_to_quat.h>
-#include <igl/trackball.h>
-#include <igl/two_axis_valuator_fixed_up.h>
-#include <igl/snap_to_canonical_view_quat.h>
-#include <igl/unproject.h>
-#include <igl/serialize.h>
+#include "../../project.h"
+#include "../../get_seconds.h"
+#include "../../readOBJ.h"
+#include "../../read_triangle_mesh.h"
+#include "../../adjacency_list.h"
+#include "../../writeOBJ.h"
+#include "../../writeOFF.h"
+#include "../../massmatrix.h"
+#include "../../file_dialog_open.h"
+#include "../../file_dialog_save.h"
+#include "../../quat_mult.h"
+#include "../../axis_angle_to_quat.h"
+#include "../../trackball.h"
+#include "../../two_axis_valuator_fixed_up.h"
+#include "../../snap_to_canonical_view_quat.h"
+#include "../../unproject.h"
+#include "../../serialize.h"
 
 // Internal global variables used for glfw event handling
 static igl::opengl::glfw::Viewer * __viewer;

+ 1 - 1
include/igl/opengl/glfw/ViewerPlugin.h

@@ -14,7 +14,7 @@
 // * remove Preview3D from comments
 // * clean comments
 #include <string>
-#include <igl/igl_inline.h>
+#include "../../igl_inline.h"
 #include <vector>
 
 namespace igl

+ 1 - 1
include/igl/opengl/glfw/imgui/ImGuiPlugin.cpp

@@ -9,7 +9,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 #include "ImGuiPlugin.h"
 #include "ImGuiHelpers.h"
-#include <igl/project.h>
+#include "../../../project.h"
 #include <backends/imgui_impl_glfw.h>
 #include <backends/imgui_impl_opengl3.h>
 #include <imgui.h>

+ 1 - 1
include/igl/opengl/verasansmono_compressed.h

@@ -1,7 +1,7 @@
 #ifndef IGL_OPENGL_VERASANSMONO_COMPRESSED_H
 #define IGL_OPENGL_VERASANSMONO_COMPRESSED_H
 
-#include <igl/opengl/../igl_inline.h>
+#include "../igl_inline.h"
 
 namespace igl
 {

+ 1 - 1
include/igl/opengl/vertex_array.cpp

@@ -1,5 +1,5 @@
 #include "vertex_array.h"
-#include <igl/opengl/report_gl_error.h>
+#include "report_gl_error.h"
 
 template <
   typename DerivedV,

+ 2 - 2
include/igl/opengl/vertex_array.h

@@ -1,7 +1,7 @@
 #ifndef IGL_OPENGL_VERTEX_ARRAY_H
 #define IGL_OPENGL_VERTEX_ARRAY_H
-#include <igl/opengl/../igl_inline.h>
-#include <igl/opengl/gl.h>
+#include "../igl_inline.h"
+#include "gl.h"
 #include <Eigen/Core>
 namespace igl
 {

+ 1 - 1
include/igl/orientable_patches.h

@@ -7,7 +7,7 @@
 // obtain one at http://mozilla.org/MPL/2.0/.
 #ifndef IGL_ORIENTABLE_PATCHES_H
 #define IGL_ORIENTABLE_PATCHES_H
-#include <igl/igl_inline.h>
+#include "igl_inline.h"
 #include <Eigen/Core>
 #include <Eigen/Sparse>
 namespace igl

+ 1 - 1
include/igl/parallel_transport_angles.cpp

@@ -5,7 +5,7 @@
 // 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 <igl/parallel_transport_angles.h>
+#include "parallel_transport_angles.h"
 #include <Eigen/Geometry>
 
 template <typename DerivedV, typename DerivedF, typename DerivedK>

+ 2 - 2
include/igl/partition.cpp

@@ -6,7 +6,7 @@
 // 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 "partition.h"
-#include "mat_min.h"
+#include "min.h"
 
 IGL_INLINE void igl::partition(
   const Eigen::MatrixXd & W,
@@ -51,7 +51,7 @@ IGL_INLINE void igl::partition(
     // get minimum of old D and distance to this seed, C == 1 if new distance
     // was smaller
     Eigen::Matrix<int,Eigen::Dynamic,1> C;
-    igl::mat_min(DDs,2,D,C);
+    igl::min(DDs,2,D,C);
     G = (C.array() ==0).select(G,i);
   }
 

+ 2 - 3
include/igl/pinv.h

@@ -1,7 +1,6 @@
 #ifndef IGL_PINV_H
 #define IGL_PINV_H
 #include "igl_inline.h"
-#include "deprecated.h"
 #include <Eigen/Core>
 namespace igl
 {
@@ -15,13 +14,13 @@ namespace igl
   /// \deprecated Use `Eigen::CompleteOrthogonalDecomposition<Eigen::MatrixXd>`
   /// `.solve()` or `.pseudoinverse()` instead.
   template <typename DerivedA, typename DerivedX>
-  IGL_DEPRECATED void pinv(
+  void pinv(
     const Eigen::MatrixBase<DerivedA> & A,
     typename DerivedA::Scalar tol,
     Eigen::PlainObjectBase<DerivedX> & X);
   /// \overload
   template <typename DerivedA, typename DerivedX>
-  IGL_DEPRECATED void pinv(
+  void pinv(
     const Eigen::MatrixBase<DerivedA> & A,
     Eigen::PlainObjectBase<DerivedX> & X);
 }

+ 1 - 1
include/igl/png/render_to_png.h

@@ -7,7 +7,7 @@
 // obtain one at http://mozilla.org/MPL/2.0/.
 #ifndef IGL_PNG_RENDER_TO_PNG_H
 #define IGL_PNG_RENDER_TO_PNG_H
-#include <igl/igl_inline.h>
+#include "../igl_inline.h"
 
 #include <string>
 namespace igl

+ 1 - 1
include/igl/png/render_to_png_async.h

@@ -7,7 +7,7 @@
 // obtain one at http://mozilla.org/MPL/2.0/.
 #ifndef IGL_PNG_RENDER_TO_PNG_ASYNC_H
 #define IGL_PNG_RENDER_TO_PNG_ASYNC_H
-#include <igl/igl_inline.h>
+#include "../igl_inline.h"
 #include <thread>
 //#include <boost/thread/thread.hpp>
 

+ 0 - 35
include/igl/png/texture_from_png.cpp

@@ -46,38 +46,3 @@ IGL_INLINE bool igl::png::texture_from_png(const std::string png_file, GLuint &
 }
 
 
-IGL_INLINE bool igl::png::texture_from_png(
-  const std::string png_file,
-  Eigen::Matrix<unsigned char,Eigen::Dynamic,Eigen::Dynamic>& R,
-  Eigen::Matrix<unsigned char,Eigen::Dynamic,Eigen::Dynamic>& G,
-  Eigen::Matrix<unsigned char,Eigen::Dynamic,Eigen::Dynamic>& B,
-  Eigen::Matrix<unsigned char,Eigen::Dynamic,Eigen::Dynamic>& A
-)
-{
-  int width,height,n;
-  unsigned char *data = stbi_load(png_file.c_str(), &width, &height, &n, 4);
-  if(data == NULL) {
-    return false;
-  }
-
-  R.resize(height,width);
-  G.resize(height,width);
-  B.resize(height,width);
-  A.resize(height,width);
-
-  for (unsigned j=0; j<height; ++j) {
-    for (unsigned i=0; i<width; ++i) {
-      // used to flip with libPNG, but I'm not sure if
-      // simply j*width + i wouldn't be better
-      // stb_image uses horizontal scanline an starts top-left corner
-      R(i,j) = data[4*( (width-1-i) + width * (height-1-j) )];
-      G(i,j) = data[4*( (width-1-i) + width * (height-1-j) ) + 1];
-      B(i,j) = data[4*( (width-1-i) + width * (height-1-j) ) + 2];
-      //A(i,j) = data[4*( (width-1-i) + width * (height-1-j) ) + 3];
-    }
-  }
-
-  stbi_image_free(data);
-
-  return true;
-}

+ 0 - 17
include/igl/png/texture_from_png.h

@@ -26,23 +26,6 @@ namespace igl
     IGL_INLINE bool texture_from_png(const std::string png_file, const bool flip, GLuint & id);
     /// \overload 
     IGL_INLINE bool texture_from_png(const std::string png_file, GLuint & id);
-    /// \deprecated use readPNG instead
-    // Read an image from a .png file and use it as a texture
-    //
-    // Input:
-    //  png_file  path to .png file
-    // Output:
-    //  R,G,B,A texture channels
-    // Returns true on success, false on failure
-    //
-    // Todo: this is an inappropriate function name. This is really just
-    // reading a png.... Not necessarily as a texture.
-    IGL_INLINE bool texture_from_png(const std::string png_file,
-    Eigen::Matrix<unsigned char,Eigen::Dynamic,Eigen::Dynamic>& R,
-    Eigen::Matrix<unsigned char,Eigen::Dynamic,Eigen::Dynamic>& G,
-    Eigen::Matrix<unsigned char,Eigen::Dynamic,Eigen::Dynamic>& B,
-    Eigen::Matrix<unsigned char,Eigen::Dynamic,Eigen::Dynamic>& A
-    );
   }
 }
 

+ 1 - 1
include/igl/predicates/ear_clipping.cpp

@@ -6,7 +6,7 @@
 // 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 <igl/slice.h>
+#include "../slice.h"
 #include "ear_clipping.h"
 #include "point_inside_convex_polygon.h"
 #include "predicates.h"

+ 2 - 1
include/igl/predicates/predicates.cpp

@@ -5,7 +5,8 @@
 // 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 <igl/predicates/predicates.h>
+#include "./predicates.h"
+// This is a different file also called predicates.h
 #include <predicates.h>
 #include <type_traits>
 

+ 1 - 1
include/igl/predicates/predicates.h

@@ -9,7 +9,7 @@
 #ifndef IGL_PREDICATES_PREDICATES_H
 #define IGL_PREDICATES_PREDICATES_H
 
-#include <igl/igl_inline.h>
+#include "../igl_inline.h"
 #include <Eigen/Core>
 
 namespace igl {

+ 2 - 2
include/igl/predicates/segment_segment_intersect.h

@@ -9,9 +9,9 @@
 #ifndef IGL_PREDICATES_SEGMENT_SEGMENT_INTERSECT_H
 #define IGL_PREDICATES_SEGMENT_SEGMENT_INTERSECT_H
 
-#include <igl/igl_inline.h>
-#include <Eigen/Core>
+#include "../igl_inline.h"
 #include "predicates.h"
+#include <Eigen/Core>
 namespace igl
 {
   namespace predicates

+ 5 - 5
include/igl/principal_curvature.cpp

@@ -18,11 +18,11 @@
 #include <Eigen/SparseCholesky>
 
 // Lib IGL includes
-#include <igl/adjacency_list.h>
-#include <igl/per_face_normals.h>
-#include <igl/per_vertex_normals.h>
-#include <igl/avg_edge_length.h>
-#include <igl/vertex_triangle_adjacency.h>
+#include "adjacency_list.h"
+#include "per_face_normals.h"
+#include "per_vertex_normals.h"
+#include "avg_edge_length.h"
+#include "vertex_triangle_adjacency.h"
 
 typedef enum
 {

+ 0 - 2
include/igl/principal_curvature.h

@@ -15,8 +15,6 @@
 #include <vector>
 
 #include "igl_inline.h"
-//#include <igl/cotmatrix.h>
-//#include <igl/writeOFF.h>
 
 
 

+ 1 - 1
include/igl/pso.h

@@ -1,6 +1,6 @@
 #ifndef IGL_PSO_H
 #define IGL_PSO_H
-#include <igl/igl_inline.h>
+#include "igl_inline.h"
 #include <Eigen/Core>
 #include <functional>
 

+ 1 - 1
include/igl/quad_grid.h

@@ -8,7 +8,7 @@
 #ifndef IGL_QUAD_GRID_H
 #define IGL_QUAD_GRID_H
 
-#include <igl/igl_inline.h>
+#include "igl_inline.h"
 #include <Eigen/Core>
 
 namespace igl

+ 1 - 1
include/igl/random_dir.cpp

@@ -6,7 +6,7 @@
 // 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 "random_dir.h"
-#include <igl/PI.h>
+#include "PI.h"
 #include <cmath>
 
 IGL_INLINE Eigen::Vector3d igl::random_dir()

Some files were not shown because too many files changed in this diff