libigl v2.5.0
Loading...
Searching...
No Matches
fast_winding_number.h
Go to the documentation of this file.
1#ifndef IGL_FAST_WINDING_NUMBER
2#define IGL_FAST_WINDING_NUMBER
3#include "igl_inline.h"
4#include "FastWindingNumberForSoups.h"
5#include <Eigen/Core>
6#include <vector>
7namespace igl
8{
35 template <
36 typename DerivedP,
37 typename DerivedA,
38 typename DerivedN,
39 typename Index,
40 typename DerivedCH,
41 typename DerivedCM,
42 typename DerivedR,
43 typename DerivedEC>
45 const Eigen::MatrixBase<DerivedP>& P,
46 const Eigen::MatrixBase<DerivedN>& N,
47 const Eigen::MatrixBase<DerivedA>& A,
48 const std::vector<std::vector<Index> > & point_indices,
49 const Eigen::MatrixBase<DerivedCH>& CH,
50 const int expansion_order,
51 Eigen::PlainObjectBase<DerivedCM>& CM,
52 Eigen::PlainObjectBase<DerivedR>& R,
53 Eigen::PlainObjectBase<DerivedEC>& EC);
76 template <
77 typename DerivedP,
78 typename DerivedA,
79 typename DerivedN,
80 typename Index,
81 typename DerivedCH,
82 typename DerivedCM,
83 typename DerivedR,
84 typename DerivedEC,
85 typename DerivedQ,
86 typename BetaType,
87 typename DerivedWN>
89 const Eigen::MatrixBase<DerivedP>& P,
90 const Eigen::MatrixBase<DerivedN>& N,
91 const Eigen::MatrixBase<DerivedA>& A,
92 const std::vector<std::vector<Index> > & point_indices,
93 const Eigen::MatrixBase<DerivedCH>& CH,
94 const Eigen::MatrixBase<DerivedCM>& CM,
95 const Eigen::MatrixBase<DerivedR>& R,
96 const Eigen::MatrixBase<DerivedEC>& EC,
97 const Eigen::MatrixBase<DerivedQ>& Q,
98 const BetaType beta,
99 Eigen::PlainObjectBase<DerivedWN>& WN);
104 template <
105 typename DerivedP,
106 typename DerivedA,
107 typename DerivedN,
108 typename DerivedQ,
109 typename BetaType,
110 typename DerivedWN>
112 const Eigen::MatrixBase<DerivedP>& P,
113 const Eigen::MatrixBase<DerivedN>& N,
114 const Eigen::MatrixBase<DerivedA>& A,
115 const Eigen::MatrixBase<DerivedQ>& Q,
116 const int expansion_order,
117 const BetaType beta,
118 Eigen::PlainObjectBase<DerivedWN>& WN);
120 template <
121 typename DerivedP,
122 typename DerivedA,
123 typename DerivedN,
124 typename DerivedQ,
125 typename DerivedWN>
127 const Eigen::MatrixBase<DerivedP>& P,
128 const Eigen::MatrixBase<DerivedN>& N,
129 const Eigen::MatrixBase<DerivedA>& A,
130 const Eigen::MatrixBase<DerivedQ>& Q,
131 Eigen::PlainObjectBase<DerivedWN>& WN);
133 namespace FastWindingNumber {
135 namespace HDK_Sample{
137 template <typename T1, typename T2> class UT_SolidAngle;} }
140 struct FastWindingNumberBVH {
142 FastWindingNumber::HDK_Sample::UT_SolidAngle<float,float> ut_solid_angle;
143 // Need copies of these so they stay alive between calls.
145 std::vector<FastWindingNumber::HDK_Sample::UT_Vector3T<float> > U;
146 std::vector<int> F;
147 };
155 template <
156 typename DerivedV,
157 typename DerivedF,
158 typename DerivedQ,
159 typename DerivedW>
161 const Eigen::MatrixBase<DerivedV> & V,
162 const Eigen::MatrixBase<DerivedF> & F,
163 const Eigen::MatrixBase<DerivedQ> & Q,
164 Eigen::PlainObjectBase<DerivedW> & W);
173 template <
174 typename DerivedV,
175 typename DerivedF>
177 const Eigen::MatrixBase<DerivedV> & V,
178 const Eigen::MatrixBase<DerivedF> & F,
179 const int order,
180 FastWindingNumberBVH & fwn_bvh);
188 template <
189 typename DerivedQ,
190 typename DerivedW>
192 const FastWindingNumberBVH & fwn_bvh,
193 const float accuracy_scale,
194 const Eigen::MatrixBase<DerivedQ> & Q,
195 Eigen::PlainObjectBase<DerivedW> & W);
202 template <typename Derivedp>
203 IGL_INLINE typename Derivedp::Scalar fast_winding_number(
204 const FastWindingNumberBVH & fwn_bvh,
205 const float accuracy_scale,
206 const Eigen::MatrixBase<Derivedp> & p);
207}
208#ifndef IGL_STATIC_LIBRARY
209# include "fast_winding_number.cpp"
210#endif
211
212#endif
213
#define IGL_INLINE
Definition igl_inline.h:15
Definition AABB.h:17
void fast_winding_number(const Eigen::MatrixBase< DerivedP > &P, const Eigen::MatrixBase< DerivedN > &N, const Eigen::MatrixBase< DerivedA > &A, const std::vector< std::vector< Index > > &point_indices, const Eigen::MatrixBase< DerivedCH > &CH, const int expansion_order, Eigen::PlainObjectBase< DerivedCM > &CM, Eigen::PlainObjectBase< DerivedR > &R, Eigen::PlainObjectBase< DerivedEC > &EC)
Generate the precomputation for the fast winding number for point data [Barill et.