pub mod face_point;
pub mod ray_edge;
pub mod ray_face;
pub mod ray_segment;
mod curve_edge;
mod curve_face;
mod face_face;
mod line_segment;
mod surface_surface;
use fj_math::{Point, Vector};
pub use self::{
curve_edge::CurveEdgeIntersection,
curve_face::{CurveFaceIntersection, CurveFaceIntersectionInterval},
face_face::FaceFaceIntersection,
line_segment::LineSegmentIntersection,
surface_surface::SurfaceSurfaceIntersection,
};
pub trait Intersect {
type Intersection;
fn intersect(self) -> Option<Self::Intersection>;
}
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub struct HorizontalRayToTheRight<const D: usize> {
pub origin: Point<D>,
}
impl<const D: usize> HorizontalRayToTheRight<D> {
pub fn direction(&self) -> Vector<D> {
let mut components = [0.; D];
components[0] = 1.;
components.into()
}
}
impl<P, const D: usize> From<P> for HorizontalRayToTheRight<D>
where
P: Into<Point<D>>,
{
fn from(point: P) -> Self {
Self {
origin: point.into(),
}
}
}