+/* Reset the trackball to the default unrotated state,
+ plus an optional initial rotation.
+ */
+void
+gltrackball_reset (trackball_state *ts, float x, float y)
+{
+ int bd = ts->button_down_p;
+ int ig = ts->ignore_device_rotation_p;
+ memset (ts, 0, sizeof(*ts));
+ ts->button_down_p = bd;
+ ts->ignore_device_rotation_p = ig;
+ trackball (ts->q, 0, 0, x, y);
+}
+
+