Class UniformGrid

    • Field Detail

      • nx

        private int nx
      • ny

        private int ny
      • nz

        private int nz
      • cells

        private int[][] cells
      • voxelwx

        private float voxelwx
      • voxelwy

        private float voxelwy
      • voxelwz

        private float voxelwz
      • invVoxelwx

        private float invVoxelwx
      • invVoxelwy

        private float invVoxelwy
      • invVoxelwz

        private float invVoxelwz
    • Constructor Detail

      • UniformGrid

        public UniformGrid()
    • Method Detail

      • 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
      • getGridIndex

        private void getGridIndex​(float x,
                                  float y,
                                  float z,
                                  int[] i)