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!) -> Bool

    Parameters

    object

    The 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() -> UInt

    Return 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() -> Bool

    Return 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() -> Float

    Return Value

    The azimuth in degrees, clockwise from north.

  • Returns the altitude of a direction-anchored object.

    Declaration

    Objective-C

    - (float)getAltitude;

    Swift

    func getAltitude() -> Float

    Return Value

    The altitude in degrees above the horizon.

  • Returns the distance of a direction-anchored object.

    Declaration

    Objective-C

    - (double)getDistance;

    Swift

    func getDistance() -> Double

    Return 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

    azimuth

    The azimuth in degrees, clockwise from north.

    altitude

    The altitude in degrees above the horizon.

    distance

    The distance in meters. 0 means infinitely far, so the object never parallaxes when the camera moves.

  • Returns the geographic position of a position-anchored object.

    Declaration

    Objective-C

    - (MSFMapPos *)getPosition;

    Swift

    func getPosition() -> MSFMapPos!

    Return Value

    The position, as WGS84 longitude and latitude.

  • Returns the altitude of a position-anchored object.

    Declaration

    Objective-C

    - (double)getPositionAltitude;

    Swift

    func getPositionAltitude() -> Double

    Return 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

    pos

    The position, as WGS84 longitude and latitude.

    altitude

    The altitude in meters above sea level.

  • Returns the color of the object.

    Declaration

    Objective-C

    - (MSFColor *)getColor;

    Swift

    func getColor() -> MSFColor!

    Return Value

    The color of the object.

  • Sets the color of the object. The color multiplies the bitmap, if there is one.

    Declaration

    Objective-C

    - (void)setColor:(MSFColor *)color;

    Swift

    func setColor(_ color: MSFColor!)

    Parameters

    color

    The new color.

  • Returns the visibility of the object.

    Declaration

    Objective-C

    - (BOOL)isVisible;

    Swift

    func isVisible() -> Bool

    Return 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

    visible

    The new visibility.

  • Returns whether the map in front hides the object.

    Declaration

    Objective-C

    - (BOOL)isOccludedByMap;

    Swift

    func isOccludedByMap() -> Bool

    Return 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

    occluded

    True 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

    metaData

    The new meta data map.

  • Returns a meta data value.

    Declaration

    Objective-C

    - (MSFVariant *)getMetaDataElement:(NSString *)key;

    Swift

    func getMetaDataElement(_ key: String!) -> MSFVariant!

    Parameters

    key

    The 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

    key

    The key of the value.

    element

    The value.

  • Undocumented

    Declaration

    Objective-C

    -(void)dealloc;

    Swift

    func dealloc()