blob: f5517ce252e45e2538bc5bdf25035cd598aae54a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
//! The ray class used when probing the 3d scene
use crate::core::Vector3f;
use crate::Float;
pub struct Ray {
pub origin: Vector3f,
pub direction: Vector3f,
}
impl Ray {
pub fn at(&self, t: Float) -> Vector3f {
self.origin + self.direction * t
}
}
|