                                 thrust::device_vector<unsigned int>& leftIndices,
                                 thrust::device_vector<unsigned int>& rightIndices) {
 
+    // std::cout << "--SphereContainer::Partition--:" << std::endl;
+
     const unsigned int nextSize = rightIndices[rightIndices.size()-1];
     nextIndices.resize(nextSize);
 

                                     thrust::device_vector<unsigned int>& owners) {

    /*
    std::cout << "--PartitionLeafs--:" << std::endl;
    std::cout << "isLeaf:\n" << isLeaf << std::endl;
    std::cout << "leafNodeIndices:\n" << leafNodeIndices << std::endl;
    std::cout << "spherePartitions:\n" << spherePartitions << std::endl;

SphereContainer::SphereContainer(HyperCubes& cubes, SpheresGeometry& spheres,
                                 uint* spherePartitionStart)
    : spheres(spheres),
      indices1(spheres.Size()*cubes.Size()),
      indices2(spheres.Size()*cubes.Size()),
      currentIndices(indices1), 
      nextIndices(indices2),
      doneIndices(spheres.Size()*cubes.Size()) {
    
    nextIndices.resize(0);
    doneIndices.resize(0);

    thrust::device_vector<Cone> cones(cubes.Size());
    thrust::transform(cubes.Begin(), cubes.End(), cones.begin(), createCones);
    //std::cout << cones << std::endl;
