Implementing in the Pov-Ray main program is still the best way on this topic.
I'm unable to write C++.
But if you can accept a rough version I still write a simple macro that just
place some spheres and cylinders to simulate the sphere sweep shape controlling
by the bezier points.