Eegeo::Camera::GlobeCamera::GlobeCameraController* DefaultCameraControllerFactory::Create() { Eegeo::Camera::GlobeCamera::GlobeCameraController* pController = new Eegeo::Camera::GlobeCamera::GlobeCameraController( m_terrainModelModule.GetTerrainHeightProvider(), m_mapModule.GetEnvironmentFlatteningService(), m_mapModule.GetResourceCeilingProvider(), m_touchController, m_config, m_screenPropertiesProvider.GetScreenProperties()); // override default configuration to enable two-finger pan gesture to control additional camera pitch Eegeo::Camera::GlobeCamera::GlobeCameraTouchSettings touchSettings = pController->GetTouchSettings(); touchSettings.TiltEnabled = m_tiltEnabled; pController->SetTouchSettings(touchSettings); Eegeo::Space::LatLongAltitude location = Eegeo::Space::LatLongAltitude::FromDegrees(m_interestPointLatitudeDegrees, m_interestPointLongitudeDegrees, m_interestPointAltitudeMeters); Eegeo::Space::EcefTangentBasis cameraInterestBasis; Eegeo::Camera::CameraHelpers::EcefTangentBasisFromPointAndHeading(location.ToECEF(), m_cameraControllerOrientationDegrees, cameraInterestBasis); pController->SetView(cameraInterestBasis, m_cameraControllerDistanceFromInterestPointMeters); return pController; }
RouteDrawingExample::RouteDrawingExample(RouteService& routeService, EegeoWorld& world, Eegeo::Camera::GlobeCamera::GlobeCameraController& cameraController) :m_routeService(routeService) ,m_world(world) ,m_createdRoutes(false) ,m_globeCameraStateRestorer(cameraController) { Eegeo::Space::EcefTangentBasis cameraInterestBasis; Eegeo::Camera::CameraHelpers::EcefTangentBasisFromPointAndHeading( Eegeo::Space::LatLong::FromDegrees(37.793348, -122.399035).ToECEF(), 354.824249, cameraInterestBasis); cameraController.SetView(cameraInterestBasis, 1374.298706); }