ambient_occlusion.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef IGL_AMBIENT_OCCLUSION_H
  2. #define IGL_AMBIENT_OCCLUSION_H
  3. #include <igl/igl_inline.h>
  4. #include <Eigen/Core>
  5. namespace igl
  6. {
  7. // Forward define
  8. template <
  9. typename PointMatrixType,
  10. typename FaceMatrixType,
  11. typename RowVector3>
  12. class EmbreeIntersector;
  13. // Compute ambient occlusion per given point
  14. //
  15. // Inputs:
  16. // ei EmbreeIntersector containing (V,F)
  17. // P #P by 3 list of origin points
  18. // N #P by 3 list of origin normals
  19. // Outputs:
  20. // S #P list of ambient occlusion values between 1 (fully occluded) and 0
  21. // (not occluded)
  22. //
  23. template <
  24. typename PointMatrixType,
  25. typename FaceMatrixType,
  26. typename RowVector3,
  27. typename DerivedP,
  28. typename DerivedN,
  29. typename DerivedS >
  30. void ambient_occlusion(
  31. const igl::EmbreeIntersector<PointMatrixType,FaceMatrixType,RowVector3> & ei,
  32. const Eigen::PlainObjectBase<DerivedP> & P,
  33. const Eigen::PlainObjectBase<DerivedN> & N,
  34. const int num_samples,
  35. Eigen::PlainObjectBase<DerivedS> & S);
  36. };
  37. #endif