Merge pull request #9162 from jordan-woyak/quaternion Replace stateful rotational matrices with quaternions.