This is the method two of Quaternion rotation. (Quaternion rotation matrix) Rotation: a, z, arrow key. Zoom: m, n key Mouse / Key: space bar Reset: r key End all: e key This project updated on 12/04/2016 for Gimbal lock problem.
Project Reference: 1. Math-Quaternion-Martin Baker www.euclideanspace.com 2. Quaternions and spatial rotation - Wikipedia