ArcGIS Runtime SDK for iOS: AGSOrbitLocationCameraController Class Reference
ArcGIS Runtime SDK for iOS  100.12
AGSOrbitLocationCameraController Class Reference

Description

A controller which allows a scene view's camera to orbit a fixed location.

Instances of this class represent a controller which allows a scene view's camera to orbit a stationary target location. Interactions on the scene view will pivot the camera around the target so that the camera is always looking at the target.

To activate this controller, you need to set it on the scene view using the AGSSceneView::cameraController property. Programmatically setting the viewpoint on the scene view will be disabled when this controller is active.

Since
100.1
Inheritance diagram for AGSOrbitLocationCameraController:
AGSCameraController AGSObject

Instance Methods

(instancetype) - initWithTargetLocation:cameraLocation:
 
(instancetype) - initWithTargetLocation:distance:
 
(id< AGSCancelable >) - moveCameraWithDistanceDelta:headingDelta:pitchDelta:duration:completion:
 

Class Methods

(instancetype) + orbitLocationCameraControllerWithTargetLocation:cameraLocation:
 
(instancetype) + orbitLocationCameraControllerWithTargetLocation:distance:
 

Properties

double cameraDistance
 
BOOL cameraDistanceInteractive
 
double cameraHeadingOffset
 
BOOL cameraHeadingOffsetInteractive
 
double cameraPitchOffset
 
BOOL cameraPitchOffsetInteractive
 
double maxCameraDistance
 
double maxCameraHeadingOffset
 
double maxCameraPitchOffset
 
double minCameraDistance
 
double minCameraHeadingOffset
 
double minCameraPitchOffset
 
AGSPointtargetLocation
 

Method Documentation

◆ initWithTargetLocation:cameraLocation:

- (instancetype) initWithTargetLocation: (AGSPoint *)  targetLocation
cameraLocation: (AGSPoint *)  cameraLocation 

Initializes a camera controller to orbit around the provided location starting from the specified camera position. The target location cannot be changed once specified.

Parameters
targetLocationto orbit around.
cameraLocationspecifying the position from which to begin the orbit.
Since
100.3

◆ initWithTargetLocation:distance:

- (instancetype) initWithTargetLocation: (AGSPoint *)  targetLocation
distance: (double)  distance 

Initializes a camera controller to orbit around the provided location at the specified distance. The target location cannot be changed once specified.

Parameters
targetLocationto orbit around.
distancein meters from the targetLocation at which to orbit.
Since
100.1

◆ moveCameraWithDistanceDelta:headingDelta:pitchDelta:duration:completion:

- (id<AGSCancelable>) moveCameraWithDistanceDelta: (double)  distanceDelta
headingDelta: (double)  headingDelta
pitchDelta: (double)  pitchDelta
duration: (NSTimeInterval)  duration
completion: (nullable void(^)(BOOL finished))  completion 

Moves the camera with animation to a new offset position.

Parameters
distanceDeltathe change in distance to apply in the animation, in meters.
headingDeltathe change in heading to apply in the animation, in degrees.
pitchDeltathe change in pitch to apply in the animation, in degrees.
durationof the animation, in seconds.
completionblock which is invoked when operation completes. The finished argument indicates whether animation finished without any user interruption.
Note
The heading and pitch delta values may be greater than 360 degrees and the angle is not normalized. For example, a heading delta of 720 will make the camera do two circles around the target within the duration time.
Returns
An operation that can be cancelled.
Since
100.1

◆ orbitLocationCameraControllerWithTargetLocation:cameraLocation:

+ (instancetype) orbitLocationCameraControllerWithTargetLocation: (AGSPoint *)  targetLocation
cameraLocation: (AGSPoint *)  cameraLocation 

Creates a camera controller to orbit around the provided location starting from the specified camera position. The target location cannot be changed once specified.

Parameters
targetLocationto orbit around.
cameraLocationspecifying the position from which to begin the orbit.
Returns
A new camera controller.
Since
100.3

◆ orbitLocationCameraControllerWithTargetLocation:distance:

+ (instancetype) orbitLocationCameraControllerWithTargetLocation: (AGSPoint *)  targetLocation
distance: (double)  distance 

Creates a camera controller to orbit around the provided location at the specified distance. The target location cannot be changed once specified.

Parameters
targetLocationto orbit around.
distancein meters from the targetLocation at which to orbit.
Returns
A new camera controller.
Since
100.1

Property Documentation

◆ cameraDistance

- (double) cameraDistance
readwritenonatomicassign

The distance between the camera and the target, in meters. The camera position is derived from this distance plus the camera heading and pitch offsets.

Since
100.1

◆ cameraDistanceInteractive

- (BOOL) cameraDistanceInteractive
readwritenonatomicassign

Indicates if the camera's distance to the target can be changed by user-interaction, for example zooming.

Since
100.1

◆ cameraHeadingOffset

- (double) cameraHeadingOffset
readwritenonatomicassign

The camera heading offset relative to the target, in degrees. It is a measure of the clockwise angle in the target location's horizontal plane starting from due South. The default value is 0 degrees.

If this value is not in the range between minCameraHeadingOffset and maxCameraHeadingOffset, it will be normalized as follows:

Since
100.1

◆ cameraHeadingOffsetInteractive

- (BOOL) cameraHeadingOffsetInteractive
readwritenonatomicassign

Indicates if the camera's heading relative to the target can be changed by user-interaction, for example panning horizontally.

Since
100.1

◆ cameraPitchOffset

- (double) cameraPitchOffset
readwritenonatomicassign

The camera pitch offset relative to the target, in degrees. It is a measure of the counterclockwise angle from the positive Z axis through the target to the target's horizontal plane. The default value is 45 degrees.

The value will be clamped to minCameraPitchOffset and maxCameraPitchOffset.

Since
100.1

◆ cameraPitchOffsetInteractive

- (BOOL) cameraPitchOffsetInteractive
readwritenonatomicassign

Indicates if the camera's pitch relative to the target can be changed by user-interaction, for example panning vertically.

Since
100.1

◆ maxCameraDistance

- (double) maxCameraDistance
readwritenonatomicassign

The maximum distance from the camera to the targetLocation in meters. Interactions and animations obey this limit. Serves as the max value for cameraDistance.

Since
100.1

◆ maxCameraHeadingOffset

- (double) maxCameraHeadingOffset
readwritenonatomicassign

The maximum camera heading offset relative to the target, in degrees. Default value is 180. Interactions and animations obey this limit. Serves as the max value for cameraHeadingOffset.

Since
100.1

◆ maxCameraPitchOffset

- (double) maxCameraPitchOffset
readwritenonatomicassign

The maximum camera pitch offset relative to the target, in degrees. Interactions and animations obey this limit. Serves as the max value for cameraPitchOffset.

Since
100.1

◆ minCameraDistance

- (double) minCameraDistance
readwritenonatomicassign

The minimum distance from the camera to the targetLocation in meters. Interactions and animations obey this limit. Serves as the min value for cameraDistance.

Since
100.1

◆ minCameraHeadingOffset

- (double) minCameraHeadingOffset
readwritenonatomicassign

The minimum camera heading offset relative to the target, in degrees. Default value is -180. Interactions and animations obey this limit. Serves as the min value for cameraHeadingOffset.

Since
100.1

◆ minCameraPitchOffset

- (double) minCameraPitchOffset
readwritenonatomicassign

The minimum camera pitch offset relative to the target, in degrees. Interactions and animations obey this limit. Serves as the min value for cameraPitchOffset.

Since
100.1

◆ targetLocation

- (AGSPoint*) targetLocation
readnonatomicstrong

The location that the camera should orbit.

Since
100.1