Skip to main content

IntersectLane

Struct IntersectLane 

Source
pub struct IntersectLane<'a, 'b, D: UserData> { /* private fields */ }
Expand description

A single active lane of an intersect callback’s packet, yielded by IntersectFunctionNArgs::for_each_active_lane. Its index is already known in-range and active, so the per-lane operations take no index argument.

Implementations§

Source§

impl<'a, 'b, D: UserData> IntersectLane<'a, 'b, D>

Source

pub fn index(&self) -> usize

This lane’s index in the packet.

Source

pub fn ray(&self) -> Ray

Gather this lane’s ray.

Source

pub fn filter_intersection(&mut self, ray: &mut Ray, hit: &mut Hit) -> bool

Run a candidate through the filter chain (see IntersectFunctionNArgs::filter_intersection).

Source

pub fn commit_hit(&mut self, ray: &Ray, hit: &Hit)

Commit a surviving hit to this lane (see IntersectFunctionNArgs::commit_hit).

Source

pub fn set_tfar(&mut self, tfar: f32)

Set this lane’s packet-ray tfar.

Source

pub fn geom_id(&self) -> u32

Geometry ID being intersected.

Source

pub fn prim_id(&self) -> u32

Primitive ID being intersected.

Source

pub fn user_data(&self) -> Option<&D>

Per-callback user data.

Auto Trait Implementations§

§

impl<'a, 'b, D> !Send for IntersectLane<'a, 'b, D>

§

impl<'a, 'b, D> !Sync for IntersectLane<'a, 'b, D>

§

impl<'a, 'b, D> !UnwindSafe for IntersectLane<'a, 'b, D>

§

impl<'a, 'b, D> Freeze for IntersectLane<'a, 'b, D>

§

impl<'a, 'b, D> RefUnwindSafe for IntersectLane<'a, 'b, D>
where D: RefUnwindSafe,

§

impl<'a, 'b, D> Unpin for IntersectLane<'a, 'b, D>

§

impl<'a, 'b, D> UnsafeUnpin for IntersectLane<'a, 'b, D>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.