Camera class final

A camera represents an observer's location and their perspective of an ArcGISScene within an ArcGISSceneViewController.

A Camera object can be thought of as a camera that you look through to see a viewable area of a scene. What you see depends on how you orientate the camera and how far it is above the Surface. A camera has four main configurable properties:

The camera orientation uses a local right-handed XYZ coordinate system aligned to East, North, Up (ENU): X = East, Y = North, Z = Up.

  • Location - The 3D point in space where the camera is located. The camera will adopt the spatial reference of the point at the time of creation. If a spatial reference is not supplied, a spatial reference having a WGS84 horizontal coordinate system is assumed. When no vertical coordinate system is provided, a point's z value is inferred based on the horizontal coordinate system's unit, interpreted as a height-based value relative to the horizontal coordinate system's surface:
    • Projected coordinate systems use the unit of the horizontal coordinate system.
    • Geographic coordinate systems use meters.
  • Heading - The angle around the z-axis at which the camera is rotated. The angle is clockwise from north in the East, North, Up (ENU) ground reference frame. The value is between 0 and 360, where 0 is looking North and 90 is looking East.
  • Pitch - The angle around the x-axis at which the camera is rotated. The value is between 0 and 180, where 0 is looking straight down, 90 is looking towards the horizon, and 180 is looking straight up.
  • Roll - The angle around the y-axis (the direction of sight) at which the camera is rotated. Positive values rotate counterclockwise in view space (for example, when looking north, 90 means the top of the screen points west). The value is between 0 and 360, where 0 is horizontal and 180 is upside down.

You can construct a Camera based on these values or you can obtain it from the scene view's current viewpoint using ArcGISSceneViewController.getCurrentViewpointCamera. The Camera is immutable which means that once it is created it you cannot modify it.

You can define the user's camera interactions using the scene view's camera controller. The default camera controller (GlobeCameraController) allows users to freely move and focus the camera anywhere in the scene. Other camera controllers provide specialized behavior, such as:

Implemented types

Constructors

Camera.withLatLong({required double latitude, required double longitude, required double altitude, required double heading, required double pitch, required double roll})
Creates a camera with the specified latitude, longitude, altitude, heading, pitch, and roll. The Camera's spatial reference will be WGS84.
factory
Camera.withLocation({required ArcGISPoint location, required double heading, required double pitch, required double roll})
Creates a camera with the specified location, heading, pitch, and roll. The camera's spatial reference is derived from the locationPoint.
factory
Camera.withLookAtPoint({required ArcGISPoint lookAtPoint, required double distance, required double heading, required double pitch, required double roll})
Creates a camera based on a point to look at, the distance to this point, heading, pitch, and roll. The camera's spatial reference is derived from the lookAtPoint.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
heading double
The heading of the camera.
no setter
location ArcGISPoint
The point geometry containing the location and altitude of the camera.
no setter
pitch double
The pitch of the camera.
no setter
roll double
The roll of the camera.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

elevate({required double deltaAltitude}) Camera
Creates a copy of the camera with the specified change in altitude applied.
moveForward({required double distance}) Camera
Creates a copy of the camera moved by the specified distance in the direction it is facing.
moveTo({required ArcGISPoint location}) Camera
Creates a copy of the camera with a new location.
moveToward({required ArcGISPoint targetPoint, required double distance}) Camera
Creates a copy of the camera with the camera moved in the direction of a target point by the specified distance.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
rotateAround({required ArcGISPoint targetPoint, required double deltaHeading, required double deltaPitch, required double deltaRoll}) Camera
Creates a copy of the camera with the heading and pitch rotated from a specified target point by the delta angles in degrees.
rotateTo({required double heading, required double pitch, required double roll}) Camera
Creates a copy of the camera with the specified heading, pitch and roll values.
toString() String
A string representation of this object.
inherited
zoomToward({required ArcGISPoint targetPoint, required double factor}) Camera
Creates a copy of the camera with its location moved in the direction of a target point by the specified zoom factor.

Operators

operator ==(Object other) bool
The equality operator.
inherited