I think for most uses, ApplyForce should work just fine, but an object which (for example) lands on a planet ought to go to sleep.
I don't think there exists any provision for radial gravity that supports sleep, but I think it could be valuable: A planet might have its own b2World, and as objects approach it, once it is determined they are within its gravity well they get moved into this world. This would allow the planet to both move and rotate freely on its own and sleep would still work perfectly with those objects.
I propose an overload to the b2World::SetGravity() function, which accepts a variety of possible radial gravity configurations: position, mass, and parameters to indicate whether it should be constant gravity or inverse-square gravity or inverse-linear, and maybe some maximum value cutoff.
I don't think there exists any provision for radial gravity that supports sleep, but I think it could be valuable: A planet might have its own b2World, and as objects approach it, once it is determined they are within its gravity well they get moved into this world. This would allow the planet to both move and rotate freely on its own and sleep would still work perfectly with those objects.
I propose an overload to the b2World::SetGravity() function, which accepts a variety of possible radial gravity configurations: position, mass, and parameters to indicate whether it should be constant gravity or inverse-square gravity or inverse-linear, and maybe some maximum value cutoff.