uint64_t unique_create(void) { uint64_t value = unique_insert(0); unique_remove(value); return (value); }
void scChunkManager::genChunks(point p, measure_type radius) { std::random_device rd; std::mt19937_64 mt(rd()); //use the crappy random generator to make the seed for the good one ChunkGenerator cgen {mt, attributes}; QRect allTileBounds (boundingRect(p, radius)); //TODO: can totally vectorize this shit. for (measure_type x = allTileBounds.topLeft().x(); x < allTileBounds.topRight().x(); x++) { for (measure_type y = allTileBounds.bottomLeft().y(); y < allTileBounds.topLeft().y(); y++) { point searchPoint (x, y); chunk_iterator f (find(chunkList, searchPoint)); unique_insert(chunkList, f, cgen(searchPoint)); } } }