ArcGIS Runtime SDK for macOS: AGSModelSceneSymbol Class Reference
ArcGIS Runtime SDK for macOS  100.5
AGSModelSceneSymbol Class Reference

Description

Instances of this class represent a marker symbol based on a 3D model that can be displayed in a scene by AGSSceneview.

Refer to the Open Asset Import Library (assimp) documentation for a list of supported file formats - https://github.com/assimp/assimp

Note
Digital Asset Exchange (*.dae) files that are added to your project will need to be renamed to use a different file extension, or their Type setting in Xcode File Inspector be changed to "Data" in order to work correctly with ArcGIS Runtime. This is because Xcode compresses such files by default which causes a failure when opening them.
Model symbols can't be used in static rendering mode. See AGSGraphicsOverlay::renderingMode for graphics and AGSFeatureLayer::renderingMode for feature layers.
Depending on the model file's default orientation, you may have to rotate the symbol to get your model in the desired orientation.
Since
100
Inheritance diagram for AGSModelSceneSymbol:
AGSMarkerSceneSymbol <AGSLoadable> <AGSRemoteResource> AGSSymbol AGSObject <AGSJSONSerializable>

Instance Methods

(void) - cancelLoad
 
(id< AGSCancelable >) - createSwatchWithCompletion:
 
(instancetype) - initWithName:extension:scale:
 
(instancetype) - initWithURL:scale:
 
(BOOL) - isEqualToSymbol:
 
(void) - loadWithCompletion:
 
(void) - retryLoadWithCompletion:
 
(nullable id) - toJSON:
 

Class Methods

(nullable id< AGSJSONSerializable >) + fromJSON:error:
 
(instancetype) + modelSceneSymbolWithName:extension:scale:
 
(instancetype) + modelSceneSymbolWithURL:scale:
 

Properties

AGSSceneSymbolAnchorPosition anchorPosition
 
AGSColor * color
 
AGSCredentialcredential
 
double depth
 
double heading
 
double height
 
NSError * loadError
 
AGSLoadStatus loadStatus
 
double pitch
 
AGSRequestConfigurationrequestConfiguration
 
double roll
 
AGSSymbolSizeUnits symbolSizeUnits
 
NSDictionary< NSString *, id > * unknownJSON
 
NSDictionary< NSString *, id > * unsupportedJSON
 
NSURL * URL
 
double width
 

Method Documentation

§ cancelLoad()

- (void) cancelLoad
requiredinherited

Cancels loading if it is in progress, otherwise it does nothing. This should be called carefully because other objects could be waiting for loadWithCompletion: or retryLoadWithCompletion: to complete and this will call them all back with the error of NSUserCancelledError

Since
100

§ createSwatchWithCompletion:()

- (id<AGSCancelable>) createSwatchWithCompletion: (void(^)(AGSImage *__nullable swatch, NSError *__nullable error))  completion

Creates swatch with provided background color. This method uses main screen's scale to determine the size of the image.

Parameters
completionblock that is invoked when operation completes.
Since
100

§ fromJSON:error:()

+ (nullable id<AGSJSONSerializable>) fromJSON: (id)  JSONObject
error: (NSError **)  error 
staticrequiredinherited

Initializes and returns an object from its JSON representation.

Parameters
JSONObjectNSDictionary or NSArray containing the JSON.
errorencountered during the operation, if any.
Since
100

§ initWithName:extension:scale:()

- (instancetype) initWithName: (NSString *)  name
extension: (NSString *)  extension
scale: (float)  scale 

Initialize a model marker symbol with a model file within the application bundle or shared documents directory.

Parameters
nameof the model file
extensionof the model file
scalefactor to adjust the size of the model
Returns
Initialized model marker symbol
Note
Digital Asset Exchange (*.dae) files that are added to your project will need to be renamed to use a different file extension, or their Type setting in Xcode File Inspector be changed to "Data" in order to work correctly with ArcGIS Runtime. This is because Xcode compresses such files by default which causes a failure when opening them.
Model symbols can't be used in static rendering mode. See AGSGraphicsOverlay::renderingMode for graphics and AGSFeatureLayer::renderingMode for feature layers.
Depending on the model file's default orientation, you may have to rotate the symbol to get your model in the desired orientation.
Since
100

§ initWithURL:scale:()

- (instancetype) initWithURL: (NSURL *)  URL
scale: (float)  scale 

Initialize a model marker symbol with a URL to a model file on the network or on disk.

Parameters
URLto the model file on the network or on disk
scalefactor to adjust the size of the model
Note
Model symbols can't be used in static rendering mode. See AGSGraphicsOverlay::renderingMode for graphics and AGSFeatureLayer::renderingMode for feature layers.
Depending on the model file's default orientation, you may have to rotate the symbol to get your model in the desired orientation.
Returns
Initialized model marker symbol
Since
100

§ isEqualToSymbol:()

- (BOOL) isEqualToSymbol: (AGSSymbol *)  other

Creates swatch with provided background color.

Parameters
backgroundColorDesired background color of the image
screenScreen that the swatch will be rendered for. If you specify nil then the main screen will be used.
completionblock that is invoked when operation completes.
Since
100 Creates swatch using provided geometry and other parameters. This is the most configurable of the methods to create swatches. You can pass the pixels per inch that you would like the image to be rendered at. This will determine how many pixels are used to render symbols of sizes that are specified in Points.
Parameters
geometryGeometry of the symbol to be drawn in the swatch image. The coordinates of the specified geometry are in pixels, with the point (0,0) located at the centerpoint of the swatch image. The x-axis increases towards the right-hand side of the swatch image. The y-axis increases towards the top of the swatch image. For example: when creating a swatch for a AGSSimpleMarkerSymbol, specifying a geometry of (10,10) will draw the marker 10 pixels up and to the right of the center of the swatch. The geometry (AGSPoint, AGSPolyline, AGSPolygon) correspond to the symbol (AGSSimpleMarkerSymbol, AGSSimpleLineSymbol, AGSSimpleFillSymbol). The geometry's spatial reference is ignored.
widthDesired width of the image in pixels
heightDesired height of the image in pixels
screenScreen that the swatch will be rendered for. If you specify nil then the main screen will be used.
backgroundColorDesired background color of the image
completionblock that is invoked when operation completes.
Since
100 Compares this symbol to another for equality
Parameters
othersymbol to compare this one to
Returns
whether the two symbols are equal or not
Since
100

§ loadWithCompletion:()

- (void) loadWithCompletion: (nullable void(^)(NSError *__nullable error))  completion
requiredinherited

Loads data for the object asynchronously. The completion block is invoked upon completion.

You can call this method any number of times, however only one attempt is made to load the data. If it is already loading, it will just continue to load (i.e. not force a reload). If it has already loaded successfully, the completion block will be invoked right away. If it has already failed to load, the completion block will be invoked right away with error previously encountered. This method supports multiple callers and will call them all back on completion. However, each caller's completion block will be invoked once and only once.

Parameters
completionblock that is invoked when object loads successfully or fails to load. An error is passed to the block if the object fails to load.
Note
The completion block is always invoked on the main thread.
Since
100
See also
- cancelLoad to cancel loading
- retryLoadWithCompletion: to force reload

§ modelSceneSymbolWithName:extension:scale:()

+ (instancetype) modelSceneSymbolWithName: (NSString *)  name
extension: (NSString *)  extension
scale: (float)  scale 

Initialize a model marker symbol with a model file within the application bundle or shared documents directory.

Parameters
nameof the model file
extensionof the model file
scalefactor to adjust the size of the model
Returns
Initialized model marker symbol
Note
Digital Asset Exchange (*.dae) files that are added to your project will need to be renamed to use a different file extension, or their Type setting in Xcode File Inspector be changed to "Data" in order to work correctly with ArcGIS Runtime. This is because Xcode compresses such files by default which causes a failure when opening them.
Model symbols can't be used in static rendering mode. See AGSGraphicsOverlay::renderingMode for graphics and AGSFeatureLayer::renderingMode for feature layers.
Depending on the model file's default orientation, you may have to rotate the symbol to get your model in the desired orientation.
Since
100

§ modelSceneSymbolWithURL:scale:()

+ (instancetype) modelSceneSymbolWithURL: (NSURL *)  URL
scale: (float)  scale 

Initialize a model marker symbol with a URL to a model file on the network or on disk.

Parameters
URLto the model file on the network or on disk
scalefactor to adjust the size of the model
Note
Model symbols can't be used in static rendering mode. See AGSGraphicsOverlay::renderingMode for graphics and AGSFeatureLayer::renderingMode for feature layers.
Depending on the model file's default orientation, you may have to rotate the symbol to get your model in the desired orientation.
Returns
Initialized model marker symbol
Since
100

§ retryLoadWithCompletion:()

- (void) retryLoadWithCompletion: (nullable void(^)(NSError *__nullable error))  completion
requiredinherited

Tries to reload when an object has failed to load. This method should be called judiciously. It should be called when:

  1. you didn't have network connectivity earlier when it failed and you want to retry now that you have connectivity
  2. the server was down earlier when it failed and you want to retry
  3. the request is taking too long and you want to cancel it and retry, in which case you will first call cancelLoad and then this method

If the data hasn't started loading, it will start loading. If it is already loading, it will just continue to load. If it has already loaded successfully, calls back right away. If it has already failed to load, tries again. This method supports multiple callers and will call them all back on completion. However, each caller's completion block will be invoked once and only once.

Parameters
completionblock that is invoked when object loads successfully or fails to load. An error is passed to the block if the object fails to load.
Note
The completion block is always invoked on the main thread.
Since
100

§ toJSON:()

- (nullable id) toJSON: (NSError **)  error
requiredinherited

Returns JSON representation for this object.

Parameters
errorencountered during the operation, if any.
Returns
NSDictionary or NSArray containing the JSON.
Since
100

Reimplemented in AGSPortalItem.

Property Documentation

§ anchorPosition

- (AGSSceneSymbolAnchorPosition) anchorPosition
readwritenonatomicassigninherited

Specifies how the symbol should be anchored in 3D space. Default is Bottom.

Since
100

§ color

- (AGSColor*) color
readwritenonatomicstronginherited

Color of the 3D marker symbol

Since
100

§ credential

- (AGSCredential*) credential
readwritenonatomicstronginherited

Security credentials to access the remote resource. Only applicable if the resource is secured.

Since
100

§ depth

- (double) depth
readwritenonatomicassigninherited

Depth of the 3D marker symbol, in meters.

Since
100

§ heading

- (double) heading
readwritenonatomicassigninherited

Heading of the 3D marker symbol, degrees. Default value is 0

Since
100

§ height

- (double) height
readwritenonatomicassigninherited

Height of the 3D marker symbol, in meters.

Since
100

§ loadError

- (NSError*) loadError
readnonatomicstronginherited

The error that was encountered during the most recent load operation. Will be nil if the operation succeeded.

Since
100

§ loadStatus

- (AGSLoadStatus) loadStatus
readrequirednonatomicassigninherited

Status of the load operation.

Since
100

§ pitch

- (double) pitch
readwritenonatomicassigninherited

Pitch of the 3D marker symbol, in degrees. Default value is 0.

Since
100

§ requestConfiguration

- (AGSRequestConfiguration*) requestConfiguration
readwritenonatomicstronginherited

The AGSRequestConfiguration object which defines the behavior and policies to use when accessing the remote resource. The default will be nil. If it is nil the [AGSRequestConfiguration globalConfiguration] will be used.

Since
100

§ roll

- (double) roll
readwritenonatomicassigninherited

Roll of the 3D marker symbol, in degrees. Default value is 0.

Since
100

§ symbolSizeUnits

- (AGSSymbolSizeUnits) symbolSizeUnits
readwritenonatomicassign

The size unit of the model scene symbol.

Since
100.5

§ unknownJSON

- (NSDictionary<NSString*,id>*) unknownJSON
readrequirednonatomiccopyinherited

A dictionary of values that was in the source JSON but was unparsed by API.

Returns
NSDictionary containing the unknown JSON.
Since
100

§ unsupportedJSON

- (NSDictionary<NSString*,id>*) unsupportedJSON
readnonatomiccopyinherited

A dictionary of values that are supported by the REST API, but not exposed through the SDK API.

Returns
NSDictionary containing the unsupported JSON.
Since
100

§ URL

- (NSURL*) URL
readrequirednonatomicstronginherited

The URL of the remote resource.

Since
100

§ width

- (double) width
readwritenonatomicassigninherited

Width of the 3D marker symbol, in meters.

Since
100