Class MPSBoundingBoxIntersectionTestType


  • public final class MPSBoundingBoxIntersectionTestType
    extends java.lang.Object
    Options for the MPSRayIntersector bounding box intersection test type property
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static long AxisAligned
      This intersection test is potentially slower than MPSBoundingBoxIntersectionTestTypeFast but does not generate false negatives for axis aligned rays (i.e. rays which have one or more components of their direction set to zero).
      static long Default
      Use the default MPSBoundingBoxIntersectionTestTypeAxisAligned ray/bounding box intersection test.
      static long Fast
      This intersection test is potentially faster than MPSBoundingBoxIntersectionTestTypeAxisAligned but can generate false negatives for axis aligned rays (i.e. rays which have one or more components of their direction set to zero).
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • Default

        public static final long Default
        Use the default MPSBoundingBoxIntersectionTestTypeAxisAligned ray/bounding box intersection test. Note: this option was equivalent to MPSBoundingBoxIntersectionTestTypeFast in macOS 10.14/iOS 12.0. This option was changed in macOS 10.15/iOS 13.0 to handle axis-aligned rays correctly by default. The old behavior can be restored by explicitly setting the intersection test type to MPSBoundingBoxIntersectionTestTypeFast on macOS 10.15/iOS 13.0 and above.
        See Also:
        Constant Field Values
      • AxisAligned

        public static final long AxisAligned
        This intersection test is potentially slower than MPSBoundingBoxIntersectionTestTypeFast but does not generate false negatives for axis aligned rays (i.e. rays which have one or more components of their direction set to zero). These rays often do not come up in practice due to perspective projections and randomized ray distributions. However, synthetic ray distributions or orthographic projections can generate these rays. It may be faster to slightly perturb the ray direction and use the fast intersection test type.
        See Also:
        Constant Field Values
      • Fast

        public static final long Fast
        This intersection test is potentially faster than MPSBoundingBoxIntersectionTestTypeAxisAligned but can generate false negatives for axis aligned rays (i.e. rays which have one or more components of their direction set to zero). These rays often do not come up in practice due to perspective projections and randomized ray distributions. However, synthetic ray distributions or orthographic projections can generate these rays.
        See Also:
        Constant Field Values