Port physics to C++.