255{
256 const uint32_t nx =
m_res_x + 1;
257 const uint32_t ny =
m_res_y + 1;
258 const uint32_t nz =
m_res_z + 1;
259 const size_t total = static_cast<size_t>(nx) * ny * nz;
260
262 const glm::vec3 step {
263 extent.x /
static_cast<float>(
m_res_x),
264 extent.y /
static_cast<float>(
m_res_y),
265 extent.z /
static_cast<float>(
m_res_z),
266 };
267
268 auto* grid =
static_cast<float*
>(
m_grid_buf->get_mapped_ptr());
269
270 MayaFlux::Parallel::for_each(std::execution::par_unseq,
271 std::views::iota(0UZ, total).begin(),
272 std::views::iota(0UZ, total).end(),
273 [&](size_t idx) {
274 const uint32_t gix = idx % nx;
275 const uint32_t giy = (idx / nx) % ny;
276 const uint32_t giz = idx / (static_cast<size_t>(nx) * ny);
281 });
282}
std::shared_ptr< VKBuffer > m_grid_buf
Kinesis::SpatialField m_field