MSFCelestialObject
Objective-C
@interface MSFCelestialObject : NSObject {
void *swigCPtr;
BOOL swigCMemOwn;
}
Swift
class MSFCelestialObject : NSObject
A base class for objects placed in the sky, anchored by direction (azimuth, altitude, optional distance; 0 = infinitely far, no parallax) or by map position plus an altitude in meters. Clicks are reported through the layer’s listener; terrain in front wins the hit.
-
Checks if this object is equal to the specified object.
Declaration
Objective-C
- (BOOL)isEqual:(id)object;Swift
func isEqual(_ object: Any!) -> BoolParameters
objectThe reference object.
Return Value
True when objects are equal, false otherwise.
-
Returns the hash value of this object.
Declaration
Objective-C
- (NSUInteger)hash;Swift
func hash() -> UIntReturn Value
The hash value of this object.
-
Returns true if the object is anchored by direction, false if by geographic position.
Declaration
Objective-C
- (BOOL)isDirectionAnchored;Swift
func isDirectionAnchored() -> BoolReturn Value
True if the object is anchored by direction.
-
Returns the azimuth of a direction-anchored object.
Declaration
Objective-C
- (float)getAzimuth;Swift
func getAzimuth() -> FloatReturn Value
The azimuth in degrees, clockwise from north.
-
Returns the altitude of a direction-anchored object.
Declaration
Objective-C
- (float)getAltitude;Swift
func getAltitude() -> FloatReturn Value
The altitude in degrees above the horizon.
-
Returns the distance of a direction-anchored object.
Declaration
Objective-C
- (double)getDistance;Swift
func getDistance() -> DoubleReturn Value
The distance in meters, or 0 for infinitely far.
-
Anchors the object by direction.
Declaration
Objective-C
- (void)setDirection:(float)azimuth altitude:(float)altitude distance:(double)distance;Swift
func setDirection(_ azimuth: Float, altitude: Float, distance: Double)Parameters
azimuthThe azimuth in degrees, clockwise from north.
altitudeThe altitude in degrees above the horizon.
distanceThe distance in meters. 0 means infinitely far, so the object never parallaxes when the camera moves.
-
Returns the altitude of a position-anchored object.
Declaration
Objective-C
- (double)getPositionAltitude;Swift
func getPositionAltitude() -> DoubleReturn Value
The altitude in meters above sea level.
-
Anchors the object above a place on the map, e.g. an aircraft.
Declaration
Objective-C
- (void)setPosition:(MSFMapPos *)pos altitude:(double)altitude;Swift
func setPosition(_ pos: MSFMapPos!, altitude: Double)Parameters
posThe position, as WGS84 longitude and latitude.
altitudeThe altitude in meters above sea level.
-
Returns the visibility of the object.
Declaration
Objective-C
- (BOOL)isVisible;Swift
func isVisible() -> BoolReturn Value
True if the object is drawn.
-
Sets the visibility of the object. An invisible object is neither drawn nor clickable.
Declaration
Objective-C
- (void)setVisible:(BOOL)visible;Swift
func setVisible(_ visible: Bool)Parameters
visibleThe new visibility.
-
Returns whether the map in front hides the object.
Declaration
Objective-C
- (BOOL)isOccludedByMap;Swift
func isOccludedByMap() -> BoolReturn Value
True if the terrain and the map cover the object where they are in front of it.
-
Sets whether the map in front hides the object. Default: true. Off draws it over the map, e.g. a label sitting on a skyline ridge.
Declaration
Objective-C
- (void)setOccludedByMap:(BOOL)occluded;Swift
func setOccludedByMap(_ occluded: Bool)Parameters
occludedTrue to let the map in front cover the object.
-
Returns a copy of the meta data map. Changes to the copy are not reflected in the object.
Declaration
Objective-C
- (MSFStringVariantMap *)getMetaData;Swift
func getMetaData() -> MSFStringVariantMap!Return Value
A copy of the meta data map.
-
Sets a new meta data map, replacing all previous values; carried through to the click listener.
Declaration
Objective-C
- (void)setMetaData:(MSFStringVariantMap *)metaData;Swift
func setMetaData(_ metaData: MSFStringVariantMap!)Parameters
metaDataThe new meta data map.
-
Returns a meta data value.
Declaration
Objective-C
- (MSFVariant *)getMetaDataElement:(NSString *)key;Swift
func getMetaDataElement(_ key: String!) -> MSFVariant!Parameters
keyThe key of the value.
Return Value
The value, or an empty variant if the key does not exist.
-
Sets a meta data value; carried through to the click listener.
Declaration
Objective-C
- (void)setMetaDataElement:(NSString *)key element:(MSFVariant *)element;Swift
func setMetaDataElement(_ key: String!, element: MSFVariant!)Parameters
keyThe key of the value.
elementThe value.
-
Undocumented
Declaration
Objective-C
-(void)dealloc;Swift
func dealloc()