.TH "MPSIntersectionDistancePrimitiveIndexInstanceIndex" 3 "Mon Jul 9 2018" "Version MetalPerformanceShaders-119.3" "MetalPerformanceShaders.framework" \" -*- nroff -*- .ad l .nh .SH NAME MPSIntersectionDistancePrimitiveIndexInstanceIndex \- Intersection result which contains the distance from the ray origin to the intersection point, the index of the intersected primitive, and the index of the intersected instance\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .SS "Public Attributes" .in +1c .ti -1c .RI "float \fBdistance\fP" .br .RI "Distance 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\&. " .ti -1c .RI "unsigned int \fBprimitiveIndex\fP" .br .RI "Index of the intersected primitive\&. Undefined if the ray does not intersect a primitive or if the intersection type is MPSIntersectionTypeAny\&. " .ti -1c .RI "unsigned int \fBinstanceIndex\fP" .br .RI "Index of the intersected instance\&. Undefined if the ray does not intersect a primitive, if the acceleration structure is not an instance acceleration structure, or if the intersection type is MPSIntersectionTypeAny\&. " .in -1c .SH "Detailed Description" .PP Intersection result which contains the distance from the ray origin to the intersection point, the index of the intersected primitive, and the index of the intersected instance\&. This type is available from the Metal Shading Language by including the MetalPerformanceShaders/MetalPerformanceShaders\&.h header\&. .SH "Member Data Documentation" .PP .SS "float MPSIntersectionDistancePrimitiveIndexInstanceIndex::distance" .PP Distance 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\&. .SS "unsigned int MPSIntersectionDistancePrimitiveIndexInstanceIndex::instanceIndex" .PP Index of the intersected instance\&. Undefined if the ray does not intersect a primitive, if the acceleration structure is not an instance acceleration structure, or if the intersection type is MPSIntersectionTypeAny\&. .SS "unsigned int MPSIntersectionDistancePrimitiveIndexInstanceIndex::primitiveIndex" .PP Index of the intersected primitive\&. Undefined if the ray does not intersect a primitive or if the intersection type is MPSIntersectionTypeAny\&. .SH "Author" .PP Generated automatically by Doxygen for MetalPerformanceShaders\&.framework from the source code\&.