Class MPSIntersectionDistancePrimitiveIndex


  • public final class MPSIntersectionDistancePrimitiveIndex
    extends org.moe.natj.c.StructObject
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      float distance()
      Distance from the ray origin to the intersection point along the ray direction vector such that intersection = ray.origin + ray.direction * distance.
      int primitiveIndex()
      Index of the intersected primitive.
      void setDistance​(float value)
      Distance from the ray origin to the intersection point along the ray direction vector such that intersection = ray.origin + ray.direction * distance.
      void setPrimitiveIndex​(int value)
      Index of the intersected primitive.
      • Methods inherited from class org.moe.natj.general.NativeObject

        finalize, getPeer, getPeerPointer
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MPSIntersectionDistancePrimitiveIndex

        public MPSIntersectionDistancePrimitiveIndex()
      • MPSIntersectionDistancePrimitiveIndex

        protected MPSIntersectionDistancePrimitiveIndex​(org.moe.natj.general.Pointer peer)
      • MPSIntersectionDistancePrimitiveIndex

        public MPSIntersectionDistancePrimitiveIndex​(float distance,
                                                     int primitiveIndex)
    • Method Detail

      • distance

        public float distance()
        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.
      • setDistance

        public void setDistance​(float value)
        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.
      • primitiveIndex

        public int primitiveIndex()
        Index of the intersected primitive. Undefined if the ray does not intersect a primitive or if the intersection type is MPSIntersectionTypeAny.
      • setPrimitiveIndex

        public void setPrimitiveIndex​(int value)
        Index of the intersected primitive. Undefined if the ray does not intersect a primitive or if the intersection type is MPSIntersectionTypeAny.