C++ Implementation of a quaternion camera