8 #ifndef HERD_INTERSECTION_UTILS
9 #define HERD_INTERSECTION_UTILS
24 template <
class GeoParams>
25 [[nodiscard]] std::vector<IntersectionResult>
Intersect(
const Line &line,
const GeoParams &geoParams) {
26 std::vector<IntersectionResult> result;
29 if (
const auto &bb_intersections = geoParams.BoundingBox().Intersections(line); !bb_intersections) {
33 for (
size_t id = 0;
id < geoParams.NTotElements(); ++id) {
34 if (
auto intersections = geoParams.ElementShape(
id).Intersections(line); intersections) {
43 #endif // HERD_INTERSECTION_UTILS