diff --git a/src/raycasting/mod.rs b/src/raycasting/mod.rs index 229c464..7917011 100644 --- a/src/raycasting/mod.rs +++ b/src/raycasting/mod.rs @@ -49,9 +49,14 @@ pub struct IntersectionInfo { } pub trait Intersect: Send + Sync { + /// Test if the ray intersects the object, and return information about the object and intersection. fn intersect<'a>(&'a self, ray: &Ray) -> Option>; } +pub trait IntersectP: Send + Sync { + /// Test if the ray intersects the object, without calculating any extra information. + fn intersect(&self, ray: &Ray) -> bool; +} #[cfg(test)] mod tests {