#[repr(C)]pub struct MPSRayOriginMaskDirectionMaxDistance {
pub origin: MPSPackedFloat3,
pub mask: c_uint,
pub direction: MPSPackedFloat3,
pub maxDistance: c_float,
}MPSRayIntersectorTypes only.Expand description
Represents a 3D ray with an origin, a direction, and a mask to filter out intersections
This type is available from the Metal Shading Language by including the MetalPerformanceShaders/MetalPerformanceShaders.h header.
See also Apple’s documentation
Fields§
§origin: MPSPackedFloat3Ray origin. The intersection test will be skipped if the origin contains NaNs or infinities.
mask: c_uintRay mask which is bitwise AND-ed with instance and primitive masks to filter out intersections. The intersection test will be skipped if the mask is zero.
direction: MPSPackedFloat3Ray direction. Does not need to be normalized. The intersection test will be skipped if the direction has length zero or contains NaNs or infinities.
maxDistance: c_floatMaximum intersection distance from the origin along the ray direction. May be infinite. The intersection test will be skipped if the maximum distance is less than zero or NaN.
Trait Implementations§
Source§impl Clone for MPSRayOriginMaskDirectionMaxDistance
Available on crate feature MPSRayIntersector only.
impl Clone for MPSRayOriginMaskDirectionMaxDistance
MPSRayIntersector only.Source§fn clone(&self) -> MPSRayOriginMaskDirectionMaxDistance
fn clone(&self) -> MPSRayOriginMaskDirectionMaxDistance
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MPSRayOriginMaskDirectionMaxDistance
Available on crate feature MPSRayIntersector only.
impl Debug for MPSRayOriginMaskDirectionMaxDistance
MPSRayIntersector only.Source§impl Encode for MPSRayOriginMaskDirectionMaxDistance
Available on crate feature MPSRayIntersector only.
impl Encode for MPSRayOriginMaskDirectionMaxDistance
MPSRayIntersector only.Source§impl PartialEq for MPSRayOriginMaskDirectionMaxDistance
Available on crate feature MPSRayIntersector only.
impl PartialEq for MPSRayOriginMaskDirectionMaxDistance
MPSRayIntersector only.Source§fn eq(&self, other: &MPSRayOriginMaskDirectionMaxDistance) -> bool
fn eq(&self, other: &MPSRayOriginMaskDirectionMaxDistance) -> bool
self and other values to be equal, and is used by ==.Source§impl RefEncode for MPSRayOriginMaskDirectionMaxDistance
Available on crate feature MPSRayIntersector only.
impl RefEncode for MPSRayOriginMaskDirectionMaxDistance
MPSRayIntersector only.Source§const ENCODING_REF: Encoding
const ENCODING_REF: Encoding
impl Copy for MPSRayOriginMaskDirectionMaxDistance
MPSRayIntersector only.impl StructuralPartialEq for MPSRayOriginMaskDirectionMaxDistance
MPSRayIntersector only.