pub struct ViewRay {
pub origin: Vec3,
pub direction: Vec3,
}Expand description
Where a pixel’s ray starts and where it goes — what
Camera::ray_through answers with.
A pair rather than a crcbl_phys::Ray: this crate does not depend on the
physics crate and must not, so the caller that wants to cast one builds it —
one line, and the widening from render space’s f32 to simulation space’s
f64 is that caller’s decision to make rather than this one’s to make for
it.
Fields§
§origin: Vec3Where the ray begins: the point on the near plane the pixel unprojects to.
direction: Vec3Unit direction, away from the viewer.
Trait Implementations§
impl Copy for ViewRay
impl StructuralPartialEq for ViewRay
Auto Trait Implementations§
impl Forget for ViewRay
impl Freeze for ViewRay
impl Move for ViewRay
impl RefUnwindSafe for ViewRay
impl Send for ViewRay
impl Sync for ViewRay
impl Unpin for ViewRay
impl UnsafeUnpin for ViewRay
impl UnwindSafe for ViewRay
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