bevy/crates/bevy_math/src/ray.rs

12 lines
354 B
Rust
Raw Normal View History

use crate::Vec3;
/// A ray is an infinite line starting at `origin`, going in `direction`.
#[derive(Default, Clone, Copy, Debug, PartialEq)]
#[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))]
pub struct Ray {
/// The origin of the ray.
pub origin: Vec3,
/// The direction of the ray.
pub direction: Vec3,
}