piecewise_constant_winding_number.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2015 Alec Jacobson
  4. //
  5. // This Source Code Form is subject to the terms of the Mozilla Public License
  6. // v. 2.0. If a copy of the MPL was not distributed with this file, You can
  7. // obtain one at http://mozilla.org/MPL/2.0/.
  8. #ifndef IGL_COPYLEFT_CGAL_PIECEWISE_CONSTANT_WINDING_NUMBER_H
  9. #define IGL_COPYLEFT_CGAL_PIECEWISE_CONSTANT_WINDING_NUMBER_H
  10. #include "../../igl_inline.h"
  11. #include <Eigen/Core>
  12. #include <vector>
  13. namespace igl
  14. {
  15. namespace copyleft
  16. {
  17. namespace cgal
  18. {
  19. // PIECEWISE_CONSTANT_WINDING_NUMBER Determine if a given mesh induces a
  20. // piecewise constant winding number field: Is this mesh valid input to
  21. // solid set operations.
  22. //
  23. // Inputs:
  24. // V #V by 3 list of mesh vertex positions
  25. // F #F by 3 list of triangle indices into V
  26. // Returns true if the mesh _combinatorially_ induces a piecewise
  27. // constant winding number field.
  28. template <
  29. typename DerivedV,
  30. typename DerivedF>
  31. IGL_INLINE bool piecewise_constant_winding_number(
  32. const Eigen::PlainObjectBase<DerivedV> & V,
  33. const Eigen::PlainObjectBase<DerivedF>& F);
  34. }
  35. }
  36. }
  37. #ifndef IGL_STATIC_LIBRARY
  38. # include "piecewise_constant_winding_number.cpp"
  39. #endif
  40. #endif