#[repr(C)]pub struct Ray {
pub origin: Vec3A,
pub direction: Vec3A,
pub inv_direction: Vec3A,
pub tmin: f32,
pub tmax: f32,
}Expand description
A struct representing a ray in 3D space.
Fields§
§origin: Vec3AThe starting point of the ray.
direction: Vec3AThe direction vector of the ray.
inv_direction: Vec3AThe inverse of the direction vector components. Used to avoid division in ray/aabb tests. Seems to improve performance in some cases on the cpu, but not the gpu in some others.
tmin: f32The minimum t (distance) value for intersection tests.
tmax: f32The maximum t (distance) value for intersection tests.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Ray
impl RefUnwindSafe for Ray
impl Send for Ray
impl Sync for Ray
impl Unpin for Ray
impl UnwindSafe for Ray
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more