Class KDTree

    • Constructor Detail

      • KDTree

        public KDTree()
      • KDTree

        public KDTree​(int maxPrims)
    • Method Detail

      • setDumpMode

        public static void setDumpMode​(boolean dump,
                                       java.lang.String prefix)
      • dumpObj

        private int dumpObj​(int offset,
                            int vertOffset,
                            int maxN,
                            BoundingBox bounds,
                            java.io.FileWriter file,
                            java.io.FileWriter mtlFile)
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • pack

        private static long pack​(float split,
                                 long type,
                                 int axis,
                                 int object)
      • unpackObject

        private static int unpackObject​(long p)
      • unpackAxis

        private static int unpackAxis​(long p)
      • unpackSplitType

        private static long unpackSplitType​(long p)
      • unpackSplit

        private static float unpackSplit​(long p)
      • radix12

        private static void radix12​(long[] splits,
                                    int n)
      • intersect

        public void intersect​(Ray r,
                              IntersectionState state)
        Description copied from interface: AccelerationStructure
        Intersect the specified ray with the geometry in local space. The ray will be provided in local space.
        Specified by:
        intersect in interface AccelerationStructure
        Parameters:
        r - ray in local space
        state - state to store the intersection into