static void myRotateUpDown( ON_Viewport& viewport, double angle ) { // rotates camera around the screen x axis ON_3dVector camX; ON_3dPoint center; if ( glb_model ) center = glb_model->m_view.m_target; else viewport.GetFrustumCenter( center ); viewport.GetCameraFrame( NULL, camX, NULL, NULL ); myRotateView( viewport, camX, center, angle ); }
static void myRotateLeftRight( ON_Viewport& viewport, double angle ) { // ON_3dVector axis = ON_zaxis; // rotate camera about world z axis (z up feel) ON_3dVector axis = ON_zaxis; // rotate camera about world y axis (u up feel) ON_3dPoint center; if ( glb_model ) center = glb_model->m_view.m_target; else viewport.GetFrustumCenter( center ); myRotateView( viewport, axis, center, angle ); }