pub type Ray = Ray;Expand description
A ray that can be cast against colliders.
Aliased Type§
#[repr(C)]pub struct Ray {
pub origin: OPoint<f32, Const<3>>,
pub dir: Matrix<f32, Const<3>, Const<1>, ArrayStorage<f32, 3, 1>>,
}Fields§
§origin: OPoint<f32, Const<3>>Starting point of the ray.
This is where the ray begins. Points along the ray are computed as
origin + dir * t for t ≥ 0.
dir: Matrix<f32, Const<3>, Const<1>, ArrayStorage<f32, 3, 1>>Direction vector of the ray.
This vector points in the direction the ray travels. It does NOT need to be normalized, but using a normalized direction makes time-of-impact values represent actual distances.