245{
246 const uint32_t nx =
m_res_x + 1;
247 const uint32_t ny =
m_res_y + 1;
248 const uint32_t nz =
m_res_z + 1;
249 const size_t total = static_cast<size_t>(nx) * ny * nz;
250
252 const glm::vec3 step {
253 extent.x /
static_cast<float>(
m_res_x),
254 extent.y /
static_cast<float>(
m_res_y),
255 extent.z /
static_cast<float>(
m_res_z),
256 };
257
258 auto* grid =
static_cast<float*
>(
m_grid_buf->get_mapped_ptr());
259
260 MayaFlux::Parallel::for_each(std::execution::par_unseq,
261 std::views::iota(0UZ, total).begin(),
262 std::views::iota(0UZ, total).end(),
263 [&](size_t idx) {
264 const uint32_t gix = idx % nx;
265 const uint32_t giy = (idx / nx) % ny;
266 const uint32_t giz = idx / (static_cast<size_t>(nx) * ny);
271 });
272}
std::shared_ptr< VKBuffer > m_grid_buf
Kinesis::SpatialField m_field