Skip to content

Commit

Permalink
Merge pull request #1040 from Geode-solutions/feat/polygon-intersecti…
Browse files Browse the repository at this point in the history
…on-detection

feat(IntersectionDetection): first implementation of polygon intersec…
  • Loading branch information
MelchiorSchuh authored Oct 30, 2024
2 parents 1df50ed + eeeff31 commit 4022c5e
Show file tree
Hide file tree
Showing 3 changed files with 372 additions and 4 deletions.
38 changes: 38 additions & 0 deletions include/geode/mesh/helpers/detail/mesh_intersection_detection.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Copyright (c) 2019 - 2024 Geode-solutions
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/

#pragma once

#include <geode/mesh/common.hpp>
#include <geode/mesh/core/surface_mesh.hpp>

namespace geode
{
namespace detail
{
template < typename Mesh >
bool polygons_intersection_detection( const Mesh& mesh,
const PolygonVertices& polygon,
const PolygonVertices& other_polygon );
} // namespace detail
} // namespace geode
10 changes: 6 additions & 4 deletions src/geode/mesh/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,12 @@ add_geode_library(
"helpers/detail/component_identifier.cpp"
"helpers/detail/create_mesh.cpp"
"helpers/detail/curve_merger.cpp"
"helpers/detail/split_along_solid_facets.cpp"
"helpers/detail/debug.cpp"
"helpers/detail/element_identifier.cpp"
"helpers/detail/element_identifier.cpp"
"helpers/detail/mesh_intersection_detection.cpp"
"helpers/detail/point_set_merger.cpp"
"helpers/detail/solid_merger.cpp"
"helpers/detail/split_along_solid_facets.cpp"
"helpers/detail/surface_merger.cpp"
"helpers/detail/vertex_merger.cpp"
"helpers/internal/copy.cpp"
Expand Down Expand Up @@ -301,14 +302,15 @@ add_geode_library(
"core/detail/facet_storage.hpp"
"core/detail/geode_elements.hpp"
"core/detail/vertex_cycle.hpp"
"helpers/detail/curve_merger.hpp"
"helpers/detail/split_along_solid_facets.hpp"
"helpers/detail/component_identifier.hpp"
"helpers/detail/create_mesh.hpp"
"helpers/detail/curve_merger.hpp"
"helpers/detail/debug.hpp"
"helpers/detail/element_identifier.hpp"
"helpers/detail/mesh_intersection_detection.hpp"
"helpers/detail/point_set_merger.hpp"
"helpers/detail/solid_merger.hpp"
"helpers/detail/split_along_solid_facets.hpp"
"helpers/detail/surface_merger.hpp"
"helpers/detail/vertex_merger.hpp"
INTERNAL_HEADERS
Expand Down
Loading

0 comments on commit 4022c5e

Please sign in to comment.