Remove unused ray/half-edge intersection check

This commit is contained in:
Hanno Braun 2024-03-18 12:40:45 +01:00
parent ec4a05cec8
commit d5b8d989fb
2 changed files with 0 additions and 36 deletions

View File

@ -1,6 +1,5 @@
//! Intersection algorithms
pub mod ray_edge;
pub mod ray_segment;
mod line_segment;

View File

@ -1,35 +0,0 @@
//! Intersection between a ray and an edge in 2D
use fj_math::Segment;
use crate::{
algorithms::intersect::{HorizontalRayToTheRight, Intersect},
geometry::SurfacePath,
objects::HalfEdge,
storage::Handle,
};
use super::ray_segment::RaySegmentIntersection;
impl Intersect for (&HorizontalRayToTheRight<2>, &Handle<HalfEdge>) {
type Intersection = RaySegmentIntersection;
fn intersect(self) -> Option<Self::Intersection> {
let (ray, edge) = self;
let line = match edge.path() {
SurfacePath::Line(line) => line,
SurfacePath::Circle(_) => {
todo!("Casting rays against circles is not supported yet")
}
};
let points = edge
.boundary()
.inner
.map(|point| line.point_from_line_coords(point));
let segment = Segment::from_points(points);
(ray, &segment).intersect()
}
}