void RGLView::adjustFOVUpdate(int mouseX, int mouseY) { Viewpoint* viewpoint = scene->getViewpoint(); int dy = mouseY - fovBaseY; float py = ((float)dy/(float)height) * 180.0f; viewpoint->setFOV( viewpoint->getFOV() + py ); View::update(); fovBaseY = mouseY; }
void rgl_setFOV(int* successptr, double* fov) { int success = RGL_FAIL; Device* device = deviceManager->getAnyDevice(); if ( device ) { RGLView* rglview = device->getRGLView(); Scene* scene = rglview->getScene(); Viewpoint* viewpoint = scene->getViewpoint(); viewpoint->setFOV(*fov); rglview->update(); success = RGL_SUCCESS; } *successptr = success; }