#[repr(C)]pub struct MPSIntersectionDistance {
pub distance: c_float,
}Available on crate features
MPSRayIntersector and MPSRayIntersectorTypes only.Expand description
Returned intersection result which contains the distance from the ray origin to the intersection point
This type is available from the Metal Shading Language by including the MetalPerformanceShaders/MetalPerformanceShaders.h header.
See also Apple’s documentation
Fields§
§distance: c_floatDistance from the ray origin to the intersection point along the ray direction vector such that intersection = ray.origin + ray.direction * distance. Is negative if there is no intersection. If the intersection type is MPSIntersectionTypeAny, is a positive value for a hit or a negative value for a miss.
Trait Implementations§
Source§impl Clone for MPSIntersectionDistance
impl Clone for MPSIntersectionDistance
Source§fn clone(&self) -> MPSIntersectionDistance
fn clone(&self) -> MPSIntersectionDistance
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 MPSIntersectionDistance
impl Debug for MPSIntersectionDistance
Source§impl Encode for MPSIntersectionDistance
impl Encode for MPSIntersectionDistance
Source§impl PartialEq for MPSIntersectionDistance
impl PartialEq for MPSIntersectionDistance
Source§fn eq(&self, other: &MPSIntersectionDistance) -> bool
fn eq(&self, other: &MPSIntersectionDistance) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl RefEncode for MPSIntersectionDistance
impl RefEncode for MPSIntersectionDistance
Source§const ENCODING_REF: Encoding
const ENCODING_REF: Encoding
The Objective-C type-encoding for a reference of this type. Read more
impl Copy for MPSIntersectionDistance
impl StructuralPartialEq for MPSIntersectionDistance
Auto Trait Implementations§
impl Freeze for MPSIntersectionDistance
impl RefUnwindSafe for MPSIntersectionDistance
impl Send for MPSIntersectionDistance
impl Sync for MPSIntersectionDistance
impl Unpin for MPSIntersectionDistance
impl UnsafeUnpin for MPSIntersectionDistance
impl UnwindSafe for MPSIntersectionDistance
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> EncodeArgument for Twhere
T: Encode,
impl<T> EncodeArgument for Twhere
T: Encode,
Source§const ENCODING_ARGUMENT: Encoding = T::ENCODING
const ENCODING_ARGUMENT: Encoding = T::ENCODING
The Objective-C type-encoding for this type.
Source§impl<T> EncodeReturn for Twhere
T: Encode,
impl<T> EncodeReturn for Twhere
T: Encode,
Source§const ENCODING_RETURN: Encoding = T::ENCODING
const ENCODING_RETURN: Encoding = T::ENCODING
The Objective-C type-encoding for this type.