MaplyStarsModel

Objective-C

@interface MaplyStarsModel : NSObject

Swift

class MaplyStarsModel : NSObject

The Stars Model parses and then displays a star field.

This is used to display a star field around the earth.

  • Read stars from the given file

    Declaration

    Objective-C

    - (nullable instancetype)initWithFileName:(NSString *_Nonnull)fileName;

    Swift

    init?(fileName: String)
  • Use the given image for each point. The given image will be sampled for individual points.

    Declaration

    Objective-C

    - (void)setImage:(id)image;

    Swift

    func setImage(_ image: Any!)
  • Add stars to the given view controller

    Turn the star positions into geometry to display. This object will track the resulting geometry objects.

    Declaration

    Objective-C

    - (void)addToViewC:(WhirlyGlobeViewController *_Nonnull)viewC
                  date:(NSDate *_Nonnull)date
                  desc:(NSDictionary *_Nullable)desc
                  mode:(MaplyThreadMode)mode;

    Swift

    func add(toViewC viewC: WhirlyGlobeViewController, date: Date, desc: [AnyHashable : Any]?, mode: MaplyThreadMode)

    Parameters

    viewC

    The view controller to add the start geometry to.

    date

    The date for the

    desc

    Additional parameters that may related to the geometry.

    mode

    Thread mode to use when adding the geometry.

  • Remove star geometry from the registered view controller.

    Removes any objects created for the star geometry.

    Declaration

    Objective-C

    - (void)removeFromViewC;

    Swift

    func removeFromViewC()