Show / Hide Table of Contents

Class Camera

Used for defining the perspective of a scene. It is a visual snapshot of an observation of the Earth with various layers displayed in a SceneView.

Inheritance
System.Object
Camera
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Esri.ArcGISRuntime.Mapping
Assembly: Esri.ArcGISRuntime.dll
Syntax
public class Camera
Remarks

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:

  • Location - The 3D point in space where the camera is located.
  • Heading - The angle around the z-axis the camera is rotated. The angle is clockwise from north in the East, North, Up (ENU) ground reference frame. The value is between 0 to 360. 0 is looking North and 90 is looking East.
  • Pitch - The angle around the y-axis the camera is rotated. The value is between 0 to 180. 0 is looking straight down, 180 is looking straight up.
  • Roll - The angle around the x-axis the camera is rotated. The value is between 0 to 360. 0 is horizontal, 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 Esri.ArcGISRuntime.UI.Controls.SceneView.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 (Esri.ArcGISRuntime.UI.Controls.GlobeCameraController) allows users to freely move and focus the camera anywhere in the scene. Other camera controllers provide specialized behavior, such as:

  • The Esri.ArcGISRuntime.UI.Controls.OrbitGeoElementCameraController locks the camera to maintain focus on a (possibly moving) GeoElement.
  • The Esri.ArcGISRuntime.UI.Controls.OrbitLocationCameraController locks the camera to orbit and to maintain focus on a fixed location.

Constructors

Name Description
Camera(MapPoint, Double, Double, Double)

Initializes a new instance of the Camera class with the specified location, heading, pitch, and roll.

Camera(MapPoint, Double, Double, Double, Double)

Initializes a new instance of the Camera class based on a point to look at, the distance to this point, heading, pitch, and roll.

Camera(TransformationMatrix)

Initializes a new instance of the Camera class using a transformation matrix.

Camera(Double, Double, Double, Double, Double, Double)

Initializes a new instance of the Camera class with the specified latitude, longitude, altitude, heading, pitch, and roll.

Properties

Name Description
Heading

Gets the heading of the camera.

Location

Gets the point geometry containing the 3D location of the camera (x,y,z).

Pitch

Gets the pitch of the camera.

Roll

Gets the roll of the camera.

Transformation

Gets the camera's Transformation Matrix.

Methods

Name Description
Elevate(Double)

Returns a new Camera with applied elevation.

MoveForward(Double)

Returns a new Camera with its location moved by the specified distance in the direction the camera is facing.

MoveTo(MapPoint)

Returns a new Camera with a new center position. Location is the point in space where the camera is located. Setting the location can be done using this Method or establish the location as part of one of the Camera Constructors.

MoveToward(MapPoint, Double)

Returns a new Camera moved in the direction of a target point by the specified distance.

RotateAround(MapPoint, Double, Double, Double)

Returns a new Camera with the heading and pitch rotated from a specified target point by the delta angles in degrees.

RotateTo(Double, Double, Double)

Returns a new Camera with the specified heading, pitch and roll values.

ZoomToward(MapPoint, Double)

Returns a new Camera with its location moved in the direction of a target point by the specified zoom factor.

Applies to

TargetVersions
.NET Standard 2.0100.3 - 200.7
.NET100.13 - 200.7
.NET Windows100.13 - 200.7
.NET Android200.0 - 200.7
.NET iOS200.0 - 200.7
.NET Framework100.0 - 200.7
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 200.7

Relevant samples

Add an integrated mesh layer: View an integrated mesh layer from a scene service.
Change atmosphere effect: Changes the appearance of the atmosphere in a scene.
In This Article
Back to top Copyright © 2022 Esri.