libigl v2.5.0
Loading...
Searching...
No Matches
mesh_boolean.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// Qingnan Zhou <qnzhou@gmail.com>
5//
6// This Source Code Form is subject to the terms of the Mozilla Public License
7// v. 2.0. If a copy of the MPL was not distributed with this file, You can
8// obtain one at http://mozilla.org/MPL/2.0/.
9//
10#ifndef IGL_COPYLEFT_CGAL_MESH_BOOLEAN_H
11#define IGL_COPYLEFT_CGAL_MESH_BOOLEAN_H
12
13#include "../../igl_inline.h"
14#include "../../MeshBooleanType.h"
15#include <Eigen/Core>
16#include <functional>
17#include <vector>
18
19namespace igl
20{
21 namespace copyleft
22 {
23 namespace cgal
24 {
40 template <
41 typename DerivedVA,
42 typename DerivedFA,
43 typename DerivedVB,
44 typename DerivedFB,
45 typename DerivedVC,
46 typename DerivedFC,
47 typename DerivedJ>
49 const Eigen::MatrixBase<DerivedVA > & VA,
50 const Eigen::MatrixBase<DerivedFA > & FA,
51 const Eigen::MatrixBase<DerivedVB > & VB,
52 const Eigen::MatrixBase<DerivedFB > & FB,
53 const MeshBooleanType & type,
54 Eigen::PlainObjectBase<DerivedVC > & VC,
55 Eigen::PlainObjectBase<DerivedFC > & FC,
56 Eigen::PlainObjectBase<DerivedJ > & J);
59 template <
60 typename DerivedVA,
61 typename DerivedFA,
62 typename DerivedVB,
63 typename DerivedFB,
64 typename DerivedVC,
65 typename DerivedFC,
66 typename DerivedJ>
68 const Eigen::MatrixBase<DerivedVA > & VA,
69 const Eigen::MatrixBase<DerivedFA > & FA,
70 const Eigen::MatrixBase<DerivedVB > & VB,
71 const Eigen::MatrixBase<DerivedFB > & FB,
72 const std::string & type_str,
73 Eigen::PlainObjectBase<DerivedVC > & VC,
74 Eigen::PlainObjectBase<DerivedFC > & FC,
75 Eigen::PlainObjectBase<DerivedJ > & J);
82 template <
83 typename DerivedVA,
84 typename DerivedFA,
85 typename DerivedVB,
86 typename DerivedFB,
87 typename DerivedVC,
88 typename DerivedFC,
89 typename DerivedJ>
91 const Eigen::MatrixBase<DerivedVA> & VA,
92 const Eigen::MatrixBase<DerivedFA> & FA,
93 const Eigen::MatrixBase<DerivedVB> & VB,
94 const Eigen::MatrixBase<DerivedFB> & FB,
95 const std::function<int(const Eigen::Matrix<int,1,Eigen::Dynamic>) >& wind_num_op,
96 const std::function<int(const int, const int)> & keep,
97 Eigen::PlainObjectBase<DerivedVC > & VC,
98 Eigen::PlainObjectBase<DerivedFC > & FC,
99 Eigen::PlainObjectBase<DerivedJ > & J);
115 template <
116 typename DerivedV,
117 typename DerivedF,
118 typename DerivedVC,
119 typename DerivedFC,
120 typename DerivedJ>
122 const std::vector<DerivedV > & Vlist,
123 const std::vector<DerivedF > & Flist,
124 const std::function<int(const Eigen::Matrix<int,1,Eigen::Dynamic>) >& wind_num_op,
125 const std::function<int(const int, const int)> & keep,
126 Eigen::PlainObjectBase<DerivedVC > & VC,
127 Eigen::PlainObjectBase<DerivedFC > & FC,
128 Eigen::PlainObjectBase<DerivedJ > & J);
130 template <
131 typename DerivedV,
132 typename DerivedF,
133 typename DerivedVC,
134 typename DerivedFC,
135 typename DerivedJ>
137 const std::vector<DerivedV > & Vlist,
138 const std::vector<DerivedF > & Flist,
139 const MeshBooleanType & type,
140 Eigen::PlainObjectBase<DerivedVC > & VC,
141 Eigen::PlainObjectBase<DerivedFC > & FC,
142 Eigen::PlainObjectBase<DerivedJ > & J);
152 template <
153 typename DerivedVV,
154 typename DerivedFF,
155 typename Derivedsizes,
156 typename DerivedVC,
157 typename DerivedFC,
158 typename DerivedJ>
160 const Eigen::MatrixBase<DerivedVV > & VV,
161 const Eigen::MatrixBase<DerivedFF > & FF,
162 const Eigen::MatrixBase<Derivedsizes> & sizes,
163 const std::function<int(const Eigen::Matrix<int,1,Eigen::Dynamic>) >& wind_num_op,
164 const std::function<int(const int, const int)> & keep,
165 Eigen::PlainObjectBase<DerivedVC > & VC,
166 Eigen::PlainObjectBase<DerivedFC > & FC,
167 Eigen::PlainObjectBase<DerivedJ > & J);
169 template <
170 typename DerivedVA,
171 typename DerivedFA,
172 typename DerivedVB,
173 typename DerivedFB,
174 typename DerivedVC,
175 typename DerivedFC>
177 const Eigen::MatrixBase<DerivedVA > & VA,
178 const Eigen::MatrixBase<DerivedFA > & FA,
179 const Eigen::MatrixBase<DerivedVB > & VB,
180 const Eigen::MatrixBase<DerivedFB > & FB,
181 const MeshBooleanType & type,
182 Eigen::PlainObjectBase<DerivedVC > & VC,
183 Eigen::PlainObjectBase<DerivedFC > & FC);
184 }
185 }
186}
187
188#ifndef IGL_STATIC_LIBRARY
189# include "mesh_boolean.cpp"
190#endif
191
192#endif
#define IGL_INLINE
Definition igl_inline.h:15
bool mesh_boolean(const Eigen::MatrixBase< DerivedVA > &VA, const Eigen::MatrixBase< DerivedFA > &FA, const Eigen::MatrixBase< DerivedVB > &VB, const Eigen::MatrixBase< DerivedFB > &FB, const MeshBooleanType &type, Eigen::PlainObjectBase< DerivedVC > &VC, Eigen::PlainObjectBase< DerivedFC > &FC, Eigen::PlainObjectBase< DerivedJ > &J)
Compute Boolean csg operations on "solid", consistently oriented meshes.
Definition AABB.h:17
MeshBooleanType
Boolean operation types.
Definition MeshBooleanType.h:14