Controls a RenderCamera to be constrained to look at an interest point, with touch-surface user input. More...
#include <GlobeCameraController.h>
Public Member Functions | |
GlobeCameraController (const Eegeo::Resources::Terrain::Heights::TerrainHeightProvider &terrainHeightProvider, const Eegeo::Rendering::EnvironmentFlatteningService &environmentFlatteningService, const Streaming::ResourceCeilingProvider &resourceCeilingProvider, const GlobeCameraTouchController &touchController, const GlobeCameraControllerConfiguration &configuration, const Eegeo::Rendering::ScreenProperties &screenProperties) | |
virtual Camera::RenderCamera | GetRenderCamera () const |
virtual void | Update (float deltaSeconds) |
virtual void | UpdateScreenProperties (const Eegeo::Rendering::ScreenProperties &screenProperties) |
virtual const Space::EcefTangentBasis & | GetInterestBasis () const |
virtual float | GetDistanceToInterest () const |
dv3 | GetEcefInterestPoint () const |
virtual void | SetInterestBasis (const Space::EcefTangentBasis &interestBasis) |
virtual void | SetView (Space::EcefTangentBasis interestBasis, float distanceToInterest, bool snapToTerrain=false) |
virtual void | SetProjection (float fovRadians, float nearClipDistance, float farClipDistance) |
virtual bool | IsZoomDistanceAboveGlobeModeThreshold () const |
virtual const GlobeCameraTouchSettings & | GetTouchSettings () const |
virtual void | SetTouchSettings (const GlobeCameraTouchSettings &settings) |
virtual const GlobeCameraControllerConfiguration & | GetConfig () const |
virtual dv3 | ComputeNonFlattenedCameraPosition () const |
void | ApplyTilt (float tiltDegrees) |
const float | GetTiltDegrees () const |
virtual float | CalculatePitchDegrees () const |
virtual float | CalculateMaximumAltitude () const |
const GlobeCameraTouchController & | GetGlobeCameraTouchController () const |
CameraState | GetCameraState () const |
void | SetDistanceBasedPitchControl (IGlobeCameraDistanceBasedPitchControl *pDistanceBasedPitchControl) |
void | SetDistanceBasedFovControl (IGlobeCameraDistanceBasedFovControl *pDistanceBasedFovControl) |
void | SetScreenSpaceOffsetControl (IGlobeCameraScreenSpaceOffsetControl *pScreenSpaceOffsetControl) |
void | SetVerticallyLocked (bool isVerticallyLocked) |
Public Member Functions inherited from Eegeo::NonCopyable | |
NonCopyable (const NonCopyable &)=delete | |
NonCopyable & | operator= (const NonCopyable &)=delete |
Protected Member Functions | |
virtual float | CalculateFovDegrees () const |
Controls a RenderCamera to be constrained to look at an interest point, with touch-surface user input.
GlobeCameraController aggregates a RenderCamera object, and sets its transform to always look at an interest point. User interaction is consumed via a GlobeCameraTouchController. This allowing the interest point to be moved around the Earth's surface, the camera to be rotated around this point, and zoomed in and out. The controller is modal. Below a threshold altitude, in "city mode", touch pan gestures allow the user to drag the interest point around, and rotate about a local Earth surface-normal up axis. Above the threshold altitude, in "globe mode", orientation is constrained so that the globe appears with the Earth's axis vertical in screenspace, with North pole at top of screen. Touch pan gestures rotate the globe. The controller smoothly transitions between the two modes when moving across the threshold altitude The pitch angle of the camera is altered based on altitude - looking vertically down towards the earth surface at high altitudes, and tilting up towards the horizon at lower altitudes Camera field of view is altered based on altitude, narrowing at lower altitudes. Configuration of constants used by the controller can be made in the GlobeCameraControllerConfiguration constructor parameter.