public void setSphericalCamera(SphericalCamera cam) { camera = cam; camera_mode = CAMERA_MODE.SPHERICAL_CAMERA; refreshView(); }
public static void refreshCamera(SphericalCamera camera) { bool up = pressed_keys[(int)Keys.W]; bool down = pressed_keys[(int)Keys.S]; bool right = pressed_keys[(int)Keys.D]; bool left = pressed_keys[(int)Keys.A]; bool closer = pressed_keys[(int)Keys.Add]; bool farther = pressed_keys[(int)Keys.Subtract]; if (up) camera.position.growTheta(); if (down) camera.position.shrinkTheta(); if (right) camera.position.growPhi(); if (left) camera.position.shrinkPhi(); if (closer) camera.position.moveForward(); if (farther) camera.position.moveBack(); }