ArcGIS Runtime SDK for iOS
100.15
|
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.
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 |
AGSPoint * | targetLocation |
- (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.
targetLocation | to orbit around. |
cameraLocation | specifying the position from which to begin the orbit. |
- (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.
targetLocation | to orbit around. |
distance | in meters from the targetLocation at which to orbit. |
- (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.
distanceDelta | the change in distance to apply in the animation, in meters. |
headingDelta | the change in heading to apply in the animation, in degrees. |
pitchDelta | the change in pitch to apply in the animation, in degrees. |
duration | of the animation, in seconds. |
completion | block which is invoked when operation completes. The finished argument indicates whether animation finished without any user interruption. |
+ (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.
targetLocation | to orbit around. |
cameraLocation | specifying the position from which to begin the orbit. |
+ (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.
targetLocation | to orbit around. |
distance | in meters from the targetLocation at which to orbit. |
|
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.
|
readwritenonatomicassign |
Indicates if the camera's distance to the target can be changed by user-interaction, for example zooming.
|
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:
cameraHeadingOffset
< minCameraHeadingOffset
, then 360
will be added until the new value is above minCameraHeadingOffset
. If the new value is less than maxCameraHeadingOffset
, it will be used. Otherwise, the value will be set to minCameraHeadingOffset
. cameraHeadingOffset
> maxCameraHeadingOffset
, then 360
will be subtracted until the new value is below maxCameraHeadingOffset
. If the new value is greater than minCameraHeadingOffset
, it will be used. Otherwise, the value will be set to maxCameraHeadingOffset
.
|
readwritenonatomicassign |
Indicates if the camera's heading relative to the target can be changed by user-interaction, for example panning horizontally.
|
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
.
|
readwritenonatomicassign |
Indicates if the camera's pitch relative to the target can be changed by user-interaction, for example panning vertically.
|
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
.
|
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
.
|
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
.
|
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
.
|
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
.
|
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
.
|
readnonatomicstrong |
The location that the camera should orbit.