#include "ambient_occlusion.h" #include "EmbreeIntersector.h" #include template < typename PointMatrixType, typename FaceMatrixType, typename RowVector3, typename DerivedP, typename DerivedN, typename DerivedS > void igl::ambient_occlusion( const igl::EmbreeIntersector & ei, const Eigen::PlainObjectBase & P, const Eigen::PlainObjectBase & N, const int num_samples, Eigen::PlainObjectBase & S) { using namespace Eigen; using namespace igl; const int n = P.rows(); // Resize output S.resize(n,1); // Embree seems to be parallel when constructing but not when tracing rays #pragma omp parallel for // loop over mesh vertices for(int p = 0;p void igl::ambient_occlusion( const Eigen::PlainObjectBase & V, const Eigen::PlainObjectBase & F, const Eigen::PlainObjectBase & P, const Eigen::PlainObjectBase & N, const int num_samples, Eigen::PlainObjectBase & S) { using namespace igl; using namespace Eigen; EmbreeIntersector< PlainObjectBase, PlainObjectBase, Matrix > ei(V,F); return ambient_occlusion(ei,P,N,num_samples,S); } #ifndef IGL_HEADER_ONLY // Explicit template instanciation template void igl::ambient_occlusion, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(igl::EmbreeIntersector, Eigen::Matrix, Eigen::Matrix > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, const int, Eigen::PlainObjectBase >&); template void igl::ambient_occlusion, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, int, Eigen::PlainObjectBase >&); #endif