Namespace: Esri::GameEngine::View
Class: Esri/GameEngine/View/ArcGISView
Since: 1.0.0
Summary
A view for interaction with geographic content from an ArcGISMap.
Constructors
ArcGISView(ArcGISGameEngineType gameEngineType, ArcGISGlobeModel globeModel)
Create a new ArcGISView.
Since 1.0.0
Arguments
| Name | Type | Const | Summary |
|---|---|---|---|
game | ArcGISGameEngineType | No | Specifies the client game engine type. |
globe | ArcGISGlobeModel | No | Specifies the model used to represent a 3D globe. |
Properties
| Property | Type | Nullable | Readonly | Summary |
|---|---|---|---|---|
AttributionText | FString | No | Yes | The attribution text that must be displayed for the data in the application. |
Camera | ArcGISCamera | No | No | The current ArcGISCamera. |
DrawStatus | ArcGISDrawStatus | No | Yes | The current draw status for the ArcGISView. |
ElevationProvider | ArcGISElevationProvider | No | Yes | Manages the registration of positions that will get elevation updates. |
Map | ArcGISMap | Yes | No | The current ArcGISMap. |
SpatialReference | ArcGISSpatialReference | Yes | Yes | The current ArcGISSpatialReference that is defined by the layers of the ArcGISMap. |
ViewOptions | ArcGISViewOptions | No | No | The current view options for the ArcGISView. |
AttributionText
FString GetAttributionText() const
The attribution text that must be displayed for the data in the application.
The attribution text of all layers is concatenated into a single string to be displayed in the application. The property value will automatically and dynamically update, for example during navigation, as content from different layers, levels, and areas is loaded and unloaded in the view.
Camera
ArcGISCamera GetCamera() const
void SetCamera(const ArcGISCamera& camera)
The current ArcGISCamera.
ElevationProvider
ArcGISElevationProvider GetElevationProvider() const
Manages the registration of positions that will get elevation updates.
SpatialReference
ArcGISSpatialReference GetSpatialReference() const
The current ArcGISSpatialReference that is defined by the layers of the ArcGISMap.
ViewOptions
ArcGISViewOptions GetViewOptions() const
void SetViewOptions(const ArcGISViewOptions& viewOptions)
The current view options for the ArcGISView.
Methods
| Signature | Return Type | Summary |
|---|---|---|
GeographicToWorld(const ArcGISPoint&) | FVector3d | Transforms a geographic coordinate in a GCS or PCS to game engine world cartesian space. If the view has no spatial reference the returned coordinate will have NaN values. |
Retrieve the view's view state. | ||
GetViewState(const ArcGISElevationSource&) | Retrieve the elevation source's view state. | |
GetViewState(const ArcGISLayer&) | Retrieve the layer's view state. | |
Handle a platform low memory event. | ||
IdentifyLayerAsync(const ArcGISLayer&, const ArcGISPoint&, const ArcGISPoint&, int32_t) | ArcGISFuture<ArcGISIdentifyLayerResult> | Identifies a limited number of geoelements between the given geographic points, in each identifiable layer in the ArcGISView's ArcGISMap. |
IdentifyLayersAsync(const ArcGISPoint&, const ArcGISPoint&, int32_t) | ArcGISFuture<ArcGISImmutableCollection<ArcGISIdentifyLayerResult>> | Identifies a limited number of geoelements between the given geographic points, in each identifiable layer in the ArcGISView's ArcGISMap. |
Sets the quotas for system and video memory that can be used by the ArcGISView. | ||
SetViewportProperties(uint32_t, uint32_t, float, float, float) | Sets the viewport size and field of view. Either field of view angle can be set to 0 to indicate "unset". For example, if verticalFieldOfViewDegrees is 0.0, but horizontalFieldOfViewDegrees is greater than zero, then the viewport vertical field of view will be set to the appropriate value given the horizontal FOV and distortion factor. And vice versa. | |
WorldToGeographic(FVector3d) | Transforms a world coordinate to a geographic coordinate in the spatial reference of the view. If the view has no spatial reference the returned coordinate will have NaN values. |
GeographicToWorld
FVector3d GeographicToWorld(const ArcGISPoint& geographicCoordinate) const
Transforms a geographic coordinate in a GCS or PCS to game engine world cartesian space. If the view has no spatial reference the returned coordinate will have NaN values.
Since 1.0.0
Arguments
| Name | Type | Const | Summary |
|---|---|---|---|
geographic | ArcGISPoint | Yes | The geographic position in a GCS or PCS. |
Returns FVector3d
An FVector3d.
GetViewState
ArcGISViewState GetViewState() const
Retrieve the view's view state.
Since 1.0.0
Returns ArcGISViewState
An ArcGISViewState.
GetViewState
ArcGISElevationSourceViewState GetViewState(const ArcGISElevationSource& elevation) const
Retrieve the elevation source's view state.
Since 1.0.0
Arguments
| Name | Type | Const | Summary |
|---|---|---|---|
elevation | ArcGISElevationSource | Yes | An elevation object to get the view state for. |
Returns ArcGISElevationSourceViewState
GetViewState
ArcGISLayerViewState GetViewState(const ArcGISLayer& layer) const
Retrieve the layer's view state.
Since 1.0.0
Arguments
| Name | Type | Const | Summary |
|---|---|---|---|
layer | ArcGISLayer | Yes | A layer object to get the view state for. |
Returns ArcGISLayerViewState
HandleLowMemoryWarning
void HandleLowMemoryWarning()
Handle a platform low memory event.
Since 1.0.0
Returns void
IdentifyLayerAsync
ArcGISFuture<ArcGISIdentifyLayerResult> IdentifyLayerAsync(const ArcGISLayer& layer, const ArcGISPoint& start, const ArcGISPoint& end, int32_t maximumResultsPerLayer) const
Identifies a limited number of geoelements between the given geographic points, in each identifiable layer in the ArcGISView's ArcGISMap.
Since 2.2.0
Arguments
| Name | Type | Const | Summary |
|---|---|---|---|
layer | ArcGISLayer | Yes | The layer to identify against. |
start | ArcGISPoint | Yes | The geographic origin of the ray in a GCS or PCS to identify the geoelements. |
end | ArcGISPoint | Yes | The geographic target of the ray in a GCS or PCS to identify the geoelements. |
maximum | int32_t | Yes | The maximum number of geoelements returned in the ArcGISIdentifyLayerResult per layer or sublayer. A value of -1 indicates unlimited results. |
Returns ArcGISFuture<ArcGISIdentifyLayerResult>
A ArcGISFuture of ArcGISIdentifyLayerResult, containing the layer in the view that supports identify. Contains a collection of elements of the type contained by the ArcGISLayer.
IdentifyLayersAsync
ArcGISFuture<ArcGISImmutableCollection<ArcGISIdentifyLayerResult>> IdentifyLayersAsync(const ArcGISPoint& start, const ArcGISPoint& end, int32_t maximumResultsPerLayer) const
Identifies a limited number of geoelements between the given geographic points, in each identifiable layer in the ArcGISView's ArcGISMap.
Since 2.2.0
Arguments
| Name | Type | Const | Summary |
|---|---|---|---|
start | ArcGISPoint | Yes | The geographic origin of the ray in a GCS or PCS to identify the geoelements. |
end | ArcGISPoint | Yes | The geographic target of the ray in a GCS or PCS to identify the geoelements. |
maximum | int32_t | Yes | The maximum number of geoelements returned in the ArcGISIdentifyLayerResult per layer or sublayer. A value of -1 indicates unlimited results. |
Returns ArcGISFuture<ArcGISImmutableCollection<ArcGISIdentifyLayerResult>>
A ArcGISFuture of an immutable collection of ArcGISIdentifyLayerResult, containing one entry for each layer in the view that supports identify. Each entry contains a collection of elements of the type contained by the ArcGISLayer.
SetMemoryQuotas
Sets the quotas for system and video memory that can be used by the ArcGISView.
Since 1.0.0
Arguments
| Name | Type | Const | Summary |
|---|---|---|---|
system | int64 | Yes | The system memory quota in MiB. The minimum allowed value is 500. If the value provided is < 0, an internally calculated quota will be used. |
video | int64 | Yes | The video memory quota in MiB. The minimum allowed value is 500. If the value provided is < 0, an internally calculated quota will be used. |
Returns void
SetViewportProperties
void SetViewportProperties(uint32_t viewportWidthPixels, uint32_t viewportHeightPixels, float horizontalFieldOfViewDegrees, float verticalFieldOfViewDegrees, float verticalDistortionFactor)
Sets the viewport size and field of view. Either field of view angle can be set to 0 to indicate "unset". For example, if verticalFieldOfViewDegrees is 0.0, but horizontalFieldOfViewDegrees is greater than zero, then the viewport vertical field of view will be set to the appropriate value given the horizontal FOV and distortion factor. And vice versa.
Since 1.0.0
Arguments
| Name | Type | Const | Summary |
|---|---|---|---|
viewport | uint32_t | Yes | used in visible tile calculation, on the basis that DPI is 96. |
viewport | uint32_t | Yes | used in visible tile calculation, on the basis that DPI is 96. |
horizontal | float | Yes | A value in degrees. The valid range is 0 to 120. |
vertical | float | Yes | A value in degrees. The valid range is 0 to 120. |
vertical | float | Yes | Determines how much the vertical field of view is distorted. A distortion factor of 1.0 is default. A distortion factor less than 1.0 will cause the visuals to be stretched taller in comparison to their width. A distortion factor greater than 1.0 will cause the visuals to be shrunk shorter in comparison to their width. |
Returns void
WorldToGeographic
ArcGISPoint WorldToGeographic(FVector3d worldCoordinate) const
Transforms a world coordinate to a geographic coordinate in the spatial reference of the view. If the view has no spatial reference the returned coordinate will have NaN values.
Since 1.0.0
Arguments
| Name | Type | Const | Summary |
|---|---|---|---|
world | F | Yes | The game engine world coordinate. |
Returns ArcGISPoint
An ArcGISPoint.
Events
| Name | Type | Summary |
|---|---|---|
Attribution | ArcGISAttributionChangedEvent | Invokes the callback when the attribution text of the ArcGISView changes. |
Draw | ArcGISDrawStatusChangedEvent | Sets a callback to be invoked when the draw status changes for the view. |
Elevation | ArcGISElevationSourceViewStateChangedEvent | Sets a callback to be invoked when the elevation source view state changes for the view. |
Layer | ArcGISLayerViewStateChangedEvent | Sets a callback to be invoked when the layer view state changes for the view. |
Spatial | ArcGISViewSpatialReferenceChangedEvent | Sets a callback to be invoked when the View's spatial reference changes. |
View | ArcGISViewStateChangedEvent | Sets a callback to be invoked when the view state changes for the view. |