mirror of
https://github.com/hannobraun/Fornjot
synced 2025-09-21 00:28:40 +00:00
Remove unused ray/half-edge intersection check
This commit is contained in:
parent
ec4a05cec8
commit
d5b8d989fb
@ -1,6 +1,5 @@
|
||||
//! Intersection algorithms
|
||||
|
||||
pub mod ray_edge;
|
||||
pub mod ray_segment;
|
||||
|
||||
mod line_segment;
|
||||
|
@ -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()
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user