c++ equivalent of html5-physics