Background
I have a 3D scene, and I want to discretize the space of it so that every coordinate (x, y, z)
belongs to a specific cell.
Coordinates close to each other belongs to same cells. When I input a coordinate that lies on the surface of one of my tridimensional objects (mainly spheres), I need to retrieve the cell it belongs to.
For those familiar with Reinforcement learning, this operation will be used for Q-Learning, to map states (cells depending on coordinates) to Q-values
This is an example of what i am trying to achieve:
Possible solutions
I know that Voronoi diagram can help in this, but I also read that implementing it from scratch is complicated. I found some libraries in C++ to handle this, but they are mainly Voronoi 2D (CGAL). I don't specifically need Voronoi, I only need to discretize the space in a reasonable way and looking for libraries/implementation for it I stumbled upon Voronoi diagrams.
Question Is there anyone familiar with libraries or a public implementation to achieve this discretization in C++?