mini_collide/
ray.rs

1use mini_math::{Point, Vector3};
2
3/// An infinite ray
4#[derive(Debug)]
5pub struct Ray {
6    /// The starting point of the ray
7    pub origin: Point,
8    /// The direction of the ray
9    pub direction: Vector3,
10}
11
12impl Ray {
13    /// Construct a ray from a starting point and direction
14    pub fn new(origin: Point, direction: Vector3) -> Self {
15        Self { origin, direction }
16    }
17}