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