Skip to content

Commit 4022c5e

Browse files
Merge pull request #1040 from Geode-solutions/feat/polygon-intersection-detection
feat(IntersectionDetection): first implementation of polygon intersec…
2 parents 1df50ed + eeeff31 commit 4022c5e

File tree

3 files changed

+372
-4
lines changed

3 files changed

+372
-4
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Copyright (c) 2019 - 2024 Geode-solutions
3+
*
4+
* Permission is hereby granted, free of charge, to any person obtaining a copy
5+
* of this software and associated documentation files (the "Software"), to deal
6+
* in the Software without restriction, including without limitation the rights
7+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
* copies of the Software, and to permit persons to whom the Software is
9+
* furnished to do so, subject to the following conditions:
10+
*
11+
* The above copyright notice and this permission notice shall be included in
12+
* all copies or substantial portions of the Software.
13+
*
14+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20+
* SOFTWARE.
21+
*
22+
*/
23+
24+
#pragma once
25+
26+
#include <geode/mesh/common.hpp>
27+
#include <geode/mesh/core/surface_mesh.hpp>
28+
29+
namespace geode
30+
{
31+
namespace detail
32+
{
33+
template < typename Mesh >
34+
bool polygons_intersection_detection( const Mesh& mesh,
35+
const PolygonVertices& polygon,
36+
const PolygonVertices& other_polygon );
37+
} // namespace detail
38+
} // namespace geode

src/geode/mesh/CMakeLists.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,12 @@ add_geode_library(
118118
"helpers/detail/component_identifier.cpp"
119119
"helpers/detail/create_mesh.cpp"
120120
"helpers/detail/curve_merger.cpp"
121-
"helpers/detail/split_along_solid_facets.cpp"
122121
"helpers/detail/debug.cpp"
123-
"helpers/detail/element_identifier.cpp"
122+
"helpers/detail/element_identifier.cpp"
123+
"helpers/detail/mesh_intersection_detection.cpp"
124124
"helpers/detail/point_set_merger.cpp"
125125
"helpers/detail/solid_merger.cpp"
126+
"helpers/detail/split_along_solid_facets.cpp"
126127
"helpers/detail/surface_merger.cpp"
127128
"helpers/detail/vertex_merger.cpp"
128129
"helpers/internal/copy.cpp"
@@ -301,14 +302,15 @@ add_geode_library(
301302
"core/detail/facet_storage.hpp"
302303
"core/detail/geode_elements.hpp"
303304
"core/detail/vertex_cycle.hpp"
304-
"helpers/detail/curve_merger.hpp"
305-
"helpers/detail/split_along_solid_facets.hpp"
306305
"helpers/detail/component_identifier.hpp"
307306
"helpers/detail/create_mesh.hpp"
307+
"helpers/detail/curve_merger.hpp"
308308
"helpers/detail/debug.hpp"
309309
"helpers/detail/element_identifier.hpp"
310+
"helpers/detail/mesh_intersection_detection.hpp"
310311
"helpers/detail/point_set_merger.hpp"
311312
"helpers/detail/solid_merger.hpp"
313+
"helpers/detail/split_along_solid_facets.hpp"
312314
"helpers/detail/surface_merger.hpp"
313315
"helpers/detail/vertex_merger.hpp"
314316
INTERNAL_HEADERS

0 commit comments

Comments
 (0)