(origin: Vec3, direction: Vec3)
| 659 | |
| 660 | impl Ray { |
| 661 | fn new(origin: Vec3, direction: Vec3) -> Self { |
| 662 | let d = direction.normalize(); |
| 663 | Self { |
| 664 | origin, |
| 665 | direction: d, |
| 666 | inv_direction: Vec3::new(1.0 / d.x, 1.0 / d.y, 1.0 / d.z), |
| 667 | } |
| 668 | } |
| 669 | } |
| 670 | |
| 671 | struct Hit { |
no test coverage detected