libigl v2.5.0
Loading...
Searching...
No Matches
propagate_winding_numbers.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 Qingnan Zhou <qnzhou@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//
9#ifndef IGL_COPYLEFT_CGAL_PROPAGATE_WINDING_NUMBERS_H
10#define IGL_COPYLEFT_CGAL_PROPAGATE_WINDING_NUMBERS_H
11#include "../../igl_inline.h"
12#include <Eigen/Core>
13#include <vector>
14
15// The following methods compute the winding number on each side of each facet
16// or patch of a 3D mesh. The input mesh is valid if it splits the ambient
17// space, R^3, into subspaces with constant integer winding numbers. That is
18// the input mesh should be closed and for each directed edge the number of
19// clockwise facing facets should equal the number of counterclockwise facing
20// facets.
21
22namespace igl
23{
24 namespace copyleft
25 {
26 namespace cgal
27 {
47 template<
48 typename DerivedV,
49 typename DerivedF,
50 typename DerivedL,
51 typename DerivedW>
53 const Eigen::PlainObjectBase<DerivedV>& V,
54 const Eigen::PlainObjectBase<DerivedF>& F,
55 const Eigen::PlainObjectBase<DerivedL>& labels,
56 Eigen::PlainObjectBase<DerivedW>& W);
57 // \overload
58 //
59 // @param[in] uE #uE by 2 list of vertex_indices, represents undirected edges.
60 // @param[in] uEC #uE+1 list of cumsums of directed edges sharing each unique edge
61 // @param[in] uEE #E list of indices into E (see `igl::unique_edge_map`)
62 // @param[in] num_patches number of patches
63 // @param[in] P #F list of patch ids.
64 // @param[in] num_cells number of cells
65 // @param[in] C #P by 2 list of cell ids on each side of each patch.
66 template<
67 typename DerivedV,
68 typename DerivedF,
69 typename DeriveduE,
70 typename DeriveduEC,
71 typename DeriveduEE,
72 typename DerivedP,
73 typename DerivedC,
74 typename DerivedL,
75 typename DerivedW>
77 const Eigen::PlainObjectBase<DerivedV>& V,
78 const Eigen::PlainObjectBase<DerivedF>& F,
79 const Eigen::PlainObjectBase<DeriveduE>& uE,
80 const Eigen::PlainObjectBase<DeriveduEC>& uEC,
81 const Eigen::PlainObjectBase<DeriveduEE>& uEE,
82 const size_t num_patches,
83 const Eigen::PlainObjectBase<DerivedP>& P,
84 const size_t num_cells,
85 const Eigen::PlainObjectBase<DerivedC>& C,
86 const Eigen::PlainObjectBase<DerivedL>& labels,
87 Eigen::PlainObjectBase<DerivedW>& W);
88 }
89 }
90}
91
92#ifndef IGL_STATIC_LIBRARY
93# include "propagate_winding_numbers.cpp"
94#endif
95#endif
#define IGL_INLINE
Definition igl_inline.h:15
bool propagate_winding_numbers(const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedF > &F, const Eigen::PlainObjectBase< DerivedL > &labels, Eigen::PlainObjectBase< DerivedW > &W)
Compute winding number on each side of the face.
Definition AABB.h:17