pub struct RayMarchResult {
pub hit: bool,
pub t: f64,
pub steps: usize,
pub normal: [f64; 3],
}Expand description
Result of a single ray march step.
Fields§
§hit: boolWhether the ray hit a surface.
t: f64Ray parameter t at the hit point (or max_dist on miss).
steps: usizeNumber of sphere-marching steps taken.
normal: [f64; 3]Surface normal at the hit point (zero vector on miss).
Implementations§
Trait Implementations§
Source§impl Clone for RayMarchResult
impl Clone for RayMarchResult
Source§fn clone(&self) -> RayMarchResult
fn clone(&self) -> RayMarchResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RayMarchResult
impl Debug for RayMarchResult
impl Copy for RayMarchResult
Auto Trait Implementations§
impl Freeze for RayMarchResult
impl RefUnwindSafe for RayMarchResult
impl Send for RayMarchResult
impl Sync for RayMarchResult
impl Unpin for RayMarchResult
impl UnsafeUnpin for RayMarchResult
impl UnwindSafe for RayMarchResult
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,
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