Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(universe_utils): reduce dependence on Boost.Geometry #8974

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
ignore holes in covered_by()
Signed-off-by: mitukou1109 <mitukou1109@gmail.com>
  • Loading branch information
mitukou1109 committed Oct 28, 2024
commit b4ef38875792ba803c02d76b5fccaacec9b2e6ac
Original file line number Diff line number Diff line change
@@ -298,7 +298,12 @@ bool covered_by(const alt::Point2d & point, const alt::ConvexPolygon2d & poly)

bool covered_by(const alt::Point2d & point, const alt::Polygon2d & poly)
{
for (const auto & triangle : triangulate(poly)) {
auto _poly = poly;
if (!poly.inners().empty()) {
_poly = alt::Polygon2d::create(poly.outer(), {}).value();
}

for (const auto & triangle : triangulate(_poly)) {
if (covered_by(point, triangle)) {
return true;
}