Struct RayCastResult

Source
pub struct RayCastResult<B: Backend, const N: usize> { /* private fields */ }
Expand description

Results from ray casting operations containing intersection data.

Contains the computed intersection points, distances, field values, and region information for a batch of rays cast against scalar field isosurfaces.

Implementations§

Source§

impl<B: Backend, const N: usize> RayCastResult<B, N>

Source

pub fn new( rays: Rays<B, N>, extensions: Origins<B, N>, field_values: Scalars<B>, region_indices: Tensor<B, 1>, ) -> Self

Creates a new ray cast result with automatic distance computation.

Distances are computed from ray origins to extension points.

Source

pub fn rays(&self) -> Rays<B, N>

Returns the original rays that were cast.

Source

pub fn distances(&self) -> Scalars<B>

Returns the computed distances from ray origins to intersection points.

Source

pub fn field_values(&self) -> Scalars<B>

Returns the field values at intersection points.

Source

pub fn extensions(&self) -> Origins<B, N>

Returns the ray intersection points (extensions).

Source

pub fn hits_on_surface(&self) -> Origins<B, N>

Returns only the intersection points that lie exactly on the surface.

Filters extensions to include only points where the field value is zero.

Source

pub fn region_indices(&self) -> Tensor<B, 1>

Returns the region indices identifying which surfaces were hit.

Source§

impl<B: Backend, const N: usize> RayCastResult<B, N>

Source

pub fn to_trajectory(&self, steps: usize) -> Trajectories<B, N>

Convert a RayCastResult to a trajectory sequence for animation All rays move at a constant speed per frame until they hit their target or until the furthest successful ray has stopped moving

Trait Implementations§

Source§

impl<B: Backend, const N: usize> Display for RayCastResult<B, N>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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> Downcast<T> for T

Source§

fn downcast(&self) -> &T

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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
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.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,