use crate::rt::Hit;
#[non_exhaustive]
#[derive(Clone)]
pub enum Scan<'a, T> {
Boundary(f64),
Surface(Hit<'a, T>),
}
impl<'a, T> Scan<'a, T> {
#[inline]
#[must_use]
pub fn new_boundary(dist: f64) -> Self {
debug_assert!(dist > 0.0);
Self::Boundary(dist)
}
#[inline]
#[must_use]
pub fn new_surface(hit: Hit<'a, T>) -> Self {
debug_assert!(hit.dist > 0.0);
Self::Surface(hit)
}
}