Example #1
0
 public Voxel Query(int hashkey)
 {
     if (hashkey == key)
     {
         return(voxel);
     }
     if (hashkey < key)
     {
         if (leftTree == null)
         {
             return(null);
         }
         else
         {
             return(leftTree.Query(hashkey));
         }
     }
     else
     {
         if (rightTree == null)
         {
             return(null);
         }
         else
         {
             return(rightTree.Query(hashkey));
         }
     }
 }
Example #2
0
 public Voxel QueryVoxel(int x, int y, int z)
 {
     return(voxelStorage.Query(GetHashKey(x, y, z)));
 }