reorient_facets_raycast.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2013 Alec Jacobson <alecjacobson@gmail.com>
  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_ORIENT_OUTWARD_AO_H
  9. #define IGL_ORIENT_OUTWARD_AO_H
  10. #include "../igl_inline.h"
  11. #include <Eigen/Core>
  12. namespace igl
  13. {
  14. // Orient each component (identified by C) of a mesh (V,F) using ambient occlusion
  15. // such that the front side is less occluded than back side
  16. //
  17. // Inputs:
  18. // V #V by 3 list of vertex positions
  19. // F #F by 3 list of triangle indices
  20. // num_rays Total number of rays that will be shot
  21. // Outputs:
  22. // I #F list of whether face has been flipped
  23. template <
  24. typename DerivedV,
  25. typename DerivedF,
  26. typename DerivedI>
  27. IGL_INLINE void reorient_facets_raycast(
  28. const Eigen::PlainObjectBase<DerivedV> & V,
  29. const Eigen::PlainObjectBase<DerivedF> & F,
  30. int num_rays,
  31. bool use_parity,
  32. bool is_verbose,
  33. Eigen::PlainObjectBase<DerivedI> & I);
  34. };
  35. #ifdef IGL_HEADER_ONLY
  36. # include "reorient_facets_raycast.cpp"
  37. #endif
  38. #endif