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

GeometryGraph and PreparedGeometry multi-threaded (Send) #1198

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
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
clone preparedgeom + flip add_intersections if necessary
  • Loading branch information
gauteh authored and urschrei committed Oct 28, 2024
commit b26ba4c2ffbfa5400b140d02c1ffe34d5e2f5b08
Original file line number Diff line number Diff line change
@@ -27,6 +27,7 @@ use rstar::{RTree, RTreeNum};
/// assert!(prepared_polygon.relate(&contained_line).is_contains());
///
/// ```
#[derive(Clone)]
pub struct PreparedGeometry<'a, F: GeoFloat + RTreeNum = f64> {
geometry_graph: GeometryGraph<'a, F>,
}
Original file line number Diff line number Diff line change
@@ -41,7 +41,12 @@ where

let edge_0 = &mut e0[mi];
let edge_1 = &mut e1[mx - (mi + 1)];
segment_intersector.add_intersections(edge_0, mi, edge_1, mx);

if segment_0.edge_idx > segment_1.edge_idx {
segment_intersector.add_intersections(edge_1, mx, edge_0, mi);
} else {
segment_intersector.add_intersections(edge_0, mi, edge_1, mx);
}
}
}
}