Browse Source

better name for always try never care defaults

Alec Jacobson 5 years ago
parent
commit
005ae90b67

+ 0 - 20
include/igl/always_try_never_care.h

@@ -1,20 +0,0 @@
-#ifndef IGL_ALWAYS_TRY_NEVER_CARE_H
-#define IGL_ALWAYS_TRY_NEVER_CARE_H
-#include "igl_inline.h"
-#include "decimate_func_types.h"
-namespace igl
-{
-  // Outputs:
-  //   always_try  function that always returns true
-  //   never_care  fuction that is always a no-op
-  IGL_INLINE void always_try_never_care(
-    decimate_pre_collapse_func  & always_try,
-    decimate_post_collapse_func & never_care);
-};
-
-#ifndef IGL_STATIC_LIBRARY
-#  include "always_try_never_care.cpp"
-#endif
-
-#endif 
-

+ 2 - 2
include/igl/collapse_edge.cpp

@@ -8,7 +8,7 @@
 #include "collapse_edge.h"
 #include "collapse_edge.h"
 #include "circulation.h"
 #include "circulation.h"
 #include "edge_collapse_is_valid.h"
 #include "edge_collapse_is_valid.h"
-#include "always_try_never_care.h"
+#include "decimate_always_try_never_care.h"
 #include <vector>
 #include <vector>
 
 
 IGL_INLINE bool igl::collapse_edge(
 IGL_INLINE bool igl::collapse_edge(
@@ -207,7 +207,7 @@ IGL_INLINE bool igl::collapse_edge(
   int e,e1,e2,f1,f2;
   int e,e1,e2,f1,f2;
   decimate_pre_collapse_func always_try;
   decimate_pre_collapse_func always_try;
   decimate_post_collapse_func never_care;
   decimate_post_collapse_func never_care;
-  always_try_never_care(always_try,never_care);
+  decimate_always_try_never_care(always_try,never_care);
   return 
   return 
     collapse_edge(
     collapse_edge(
       cost_and_placement,always_try,never_care,
       cost_and_placement,always_try,never_care,

+ 3 - 3
include/igl/decimate.cpp

@@ -8,7 +8,7 @@
 #include "decimate.h"
 #include "decimate.h"
 #include "collapse_edge.h"
 #include "collapse_edge.h"
 #include "edge_flaps.h"
 #include "edge_flaps.h"
-#include "always_try_never_care.h"
+#include "decimate_always_try_never_care.h"
 #include "is_edge_manifold.h"
 #include "is_edge_manifold.h"
 #include "remove_unreferenced.h"
 #include "remove_unreferenced.h"
 #include "slice_mask.h"
 #include "slice_mask.h"
@@ -52,7 +52,7 @@ IGL_INLINE bool igl::decimate(
   }
   }
   decimate_pre_collapse_func always_try;
   decimate_pre_collapse_func always_try;
   decimate_post_collapse_func never_care;
   decimate_post_collapse_func never_care;
-  always_try_never_care(always_try,never_care);
+  decimate_always_try_never_care(always_try,never_care);
   bool ret = decimate(
   bool ret = decimate(
     VO,
     VO,
     FO,
     FO,
@@ -102,7 +102,7 @@ IGL_INLINE bool igl::decimate(
 {
 {
   decimate_pre_collapse_func always_try;
   decimate_pre_collapse_func always_try;
   decimate_post_collapse_func never_care;
   decimate_post_collapse_func never_care;
-  always_try_never_care(always_try,never_care);
+  decimate_always_try_never_care(always_try,never_care);
   return igl::decimate(
   return igl::decimate(
     OV,OF,cost_and_placement,stopping_condition,always_try,never_care,U,G,J,I);
     OV,OF,cost_and_placement,stopping_condition,always_try,never_care,U,G,J,I);
 }
 }

+ 9 - 2
include/igl/always_try_never_care.cpp → include/igl/decimate_always_try_never_care.cpp

@@ -1,6 +1,13 @@
-#include "always_try_never_care.h"
+// This file is part of libigl, a simple c++ geometry processing library.
+// 
+// Copyright (C) 2020 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 "decimate_always_try_never_care.h"
 
 
-IGL_INLINE void igl::always_try_never_care(
+IGL_INLINE void igl::decimate_always_try_never_care(
     decimate_pre_collapse_func  & always_try,
     decimate_pre_collapse_func  & always_try,
     decimate_post_collapse_func & never_care)
     decimate_post_collapse_func & never_care)
 {
 {

+ 31 - 0
include/igl/decimate_always_try_never_care.h

@@ -0,0 +1,31 @@
+// This file is part of libigl, a simple c++ geometry processing library.
+// 
+// Copyright (C) 2020 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_DECIMATE_ALWAYS_TRY_NEVER_CARE_H
+#define IGL_DECIMATE_ALWAYS_TRY_NEVER_CARE_H
+#include "igl_inline.h"
+#include "decimate_func_types.h"
+namespace igl
+{
+  // Function to build trivial pre and post collapse actions. 
+  //
+  // Outputs:
+  //   always_try  function that always returns true (always attempt the next
+  //     edge collapse)
+  //   never_care  fuction that is always a no-op (never have a post collapse
+  //     response)
+  IGL_INLINE void decimate_always_try_never_care(
+    decimate_pre_collapse_func  & always_try,
+    decimate_post_collapse_func & never_care);
+};
+
+#ifndef IGL_STATIC_LIBRARY
+#  include "decimate_always_try_never_care.cpp"
+#endif
+
+#endif 
+