pub struct QuadHit {
pub position: Vec3,
pub t: f32,
pub u: f32,
pub v: f32,
}Expand description
Single hit result for ray-vs-quad intersection.
§Examples
use ailloli_ui_openxr::math::{QuadHit, Vec3};
let hit = QuadHit { position: Vec3::default(), t: 1.0, u: 0.5, v: 0.5 };
assert_eq!((hit.u, hit.v), (0.5, 0.5));Fields§
§position: Vec3Intersection point in world space.
t: f32Signed distance from ray origin along direction (t in origin + t*dir).
u: f32Horizontal local coordinate in [0..1] for the quad.
v: f32Vertical local coordinate in [0..1] for the quad.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for QuadHit
impl RefUnwindSafe for QuadHit
impl Send for QuadHit
impl Sync for QuadHit
impl Unpin for QuadHit
impl UnwindSafe for QuadHit
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
Source§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more