libigl v2.5.0
Loading...
Searching...
No Matches
shape_diameter_function.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) 2017 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_SHAPE_DIAMETER_FUNCTION_H
9#define IGL_SHAPE_DIAMETER_FUNCTION_H
10#include "igl_inline.h"
11#include "AABB.h"
12#include <Eigen/Core>
13#include <functional>
14namespace igl
15{
28 template <
29 typename DerivedP,
30 typename DerivedN,
31 typename DerivedS >
33 const std::function<
34 double(
35 const Eigen::Vector3f&,
36 const Eigen::Vector3f&)
37 > & shoot_ray,
38 const Eigen::MatrixBase<DerivedP> & P,
39 const Eigen::MatrixBase<DerivedN> & N,
40 const int num_samples,
41 Eigen::PlainObjectBase<DerivedS> & S);
47 template <
48 typename DerivedV,
49 int DIM,
50 typename DerivedF,
51 typename DerivedP,
52 typename DerivedN,
53 typename DerivedS >
55 const igl::AABB<DerivedV,DIM> & aabb,
56 const Eigen::MatrixBase<DerivedV> & V,
57 const Eigen::MatrixBase<DerivedF> & F,
58 const Eigen::MatrixBase<DerivedP> & P,
59 const Eigen::MatrixBase<DerivedN> & N,
60 const int num_samples,
61 Eigen::PlainObjectBase<DerivedS> & S);
63 template <
64 typename DerivedV,
65 typename DerivedF,
66 typename DerivedP,
67 typename DerivedN,
68 typename DerivedS >
70 const Eigen::MatrixBase<DerivedV> & V,
71 const Eigen::MatrixBase<DerivedF> & F,
72 const Eigen::MatrixBase<DerivedP> & P,
73 const Eigen::MatrixBase<DerivedN> & N,
74 const int num_samples,
75 Eigen::PlainObjectBase<DerivedS> & S);
78 template <
79 typename DerivedV,
80 typename DerivedF,
81 typename DerivedS>
83 const Eigen::MatrixBase<DerivedV> & V,
84 const Eigen::MatrixBase<DerivedF> & F,
85 const bool per_face,
86 const int num_samples,
87 Eigen::PlainObjectBase<DerivedS> & S);
88};
89#ifndef IGL_STATIC_LIBRARY
90# include "shape_diameter_function.cpp"
91#endif
92
93#endif
94
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 shape_diameter_function(const std::function< double(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 shape diamater function per given point.