A LateralGM port to C++