-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
cgalutils-corefine.cc
28 lines (21 loc) · 1.27 KB
/
cgalutils-corefine.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Portions of this file are Copyright 2021 Google LLC, and licensed under GPL2+. See COPYING.
#include "cgalutils.h"
#include "cgalutils-corefinement-visitor.h"
namespace CGALUtils {
#define COREFINEMENT_FUNCTION(functionName, cgalFunctionName) \
template <class TriangleMesh> \
bool functionName(TriangleMesh &lhs, TriangleMesh &rhs, TriangleMesh &out) \
{ \
CorefinementVisitor<TriangleMesh> visitor(lhs, rhs, out); \
auto param = PMP::parameters::visitor(visitor); \
auto result = cgalFunctionName(lhs, rhs, out, param, param, param); \
visitor.remeshSplitFaces(out); \
return result; \
}
COREFINEMENT_FUNCTION(corefineAndComputeUnion, PMP::corefine_and_compute_union);
COREFINEMENT_FUNCTION(corefineAndComputeIntersection, PMP::corefine_and_compute_intersection);
COREFINEMENT_FUNCTION(corefineAndComputeDifference, PMP::corefine_and_compute_difference);
template bool corefineAndComputeUnion(CGAL_HybridMesh& lhs, CGAL_HybridMesh& rhs, CGAL_HybridMesh& out);
template bool corefineAndComputeIntersection(CGAL_HybridMesh& lhs, CGAL_HybridMesh& rhs, CGAL_HybridMesh& out);
template bool corefineAndComputeDifference(CGAL_HybridMesh& lhs, CGAL_HybridMesh& rhs, CGAL_HybridMesh& out);
} // namespace CGALUtils