/**
* Save the current camera position into the supplied ScenePreferences
* instance.
*/
public void saveCameraPosition(ScenePreferences prefs) {
CameraPosPreference prefsPos = prefs.getCameraPos();
if (null == prefsPos) {
prefsPos = CameraPosPreference.getDefaultCameraPos();
prefs.setCameraPos(prefsPos);
}
float[] scenePos = glPanel.getCameraPosition();
prefsPos.setX(scenePos[0]);
prefsPos.setY(scenePos[1]);
prefsPos.setZ(scenePos[2]);
}