libigl v2.5.0
Loading...
Searching...
No Matches
ambient_occlusion.h
Go to the documentation of this file.
1// This file is part of libigl, a simple c++ geometry processing library.
2//
3// Copyright (C) 2015 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_AMBIENT_OCCLUSION_H
9#define IGL_AMBIENT_OCCLUSION_H
10#include "igl_inline.h"
11#include "AABB.h"
12#include <Eigen/Core>
13#include <functional>
14namespace igl
15{
27 template <
28 typename DerivedP,
29 typename DerivedN,
30 typename DerivedS >
32 const std::function<
33 bool(
34 const Eigen::Vector3f&,
35 const Eigen::Vector3f&)
36 > & shoot_ray,
37 const Eigen::MatrixBase<DerivedP> & P,
38 const Eigen::MatrixBase<DerivedN> & N,
39 const int num_samples,
40 Eigen::PlainObjectBase<DerivedS> & S);
44 // @param[in] AABB axis-aligned bounding box hierarchy around (V,F)
53 template <
54 typename DerivedV,
55 int DIM,
56 typename DerivedF,
57 typename DerivedP,
58 typename DerivedN,
59 typename DerivedS >
61 const igl::AABB<DerivedV,DIM> & aabb,
62 const Eigen::MatrixBase<DerivedV> & V,
63 const Eigen::MatrixBase<DerivedF> & F,
64 const Eigen::MatrixBase<DerivedP> & P,
65 const Eigen::MatrixBase<DerivedN> & N,
66 const int num_samples,
67 Eigen::PlainObjectBase<DerivedS> & S);
77 template <
78 typename DerivedV,
79 typename DerivedF,
80 typename DerivedP,
81 typename DerivedN,
82 typename DerivedS >
84 const Eigen::MatrixBase<DerivedV> & V,
85 const Eigen::MatrixBase<DerivedF> & F,
86 const Eigen::MatrixBase<DerivedP> & P,
87 const Eigen::MatrixBase<DerivedN> & N,
88 const int num_samples,
89 Eigen::PlainObjectBase<DerivedS> & S);
90
91};
92#ifndef IGL_STATIC_LIBRARY
93# include "ambient_occlusion.cpp"
94#endif
95
96#endif
Implementation of semi-general purpose axis-aligned bounding box hierarchy.
Definition AABB.h:30
#define IGL_INLINE
Definition igl_inline.h:15
Definition AABB.h:17
void ambient_occlusion(const std::function< bool(const Eigen::Vector3f &, const Eigen::Vector3f &) > &shoot_ray, const Eigen::MatrixBase< DerivedP > &P, const Eigen::MatrixBase< DerivedN > &N, const int num_samples, Eigen::PlainObjectBase< DerivedS > &S)
Compute ambient occlusion per given point using ray-mesh intersection function handle.