MSFCelestialLayer
A layer of objects that live in the sky rather than on the map: anything placed by a direction, an object overhead, or a curve traced across the sky.
Nothing here is tied to the map’s coordinates unless an object asks for it (see CelestialObject::setPosition), so panning the map does not drag the sky along. The layer is drawn in its place in the layer order, so adding it FIRST puts every object behind the map and lets terrain hide what is behind a ridge, which is what an object in the sky wants.
Objects are batched by bitmap, so a catalogue of thousands sharing one bitmap - or none - costs a single draw call.
-
Undocumented
Declaration
Objective-C
-(id)init;Swift
init!() -
Adds an object to the layer.
Declaration
Objective-C
- (void)add:(MSFCelestialObject *)object;Swift
func add(_ object: MSFCelestialObject!)Parameters
objectThe object to add.
-
Adds a list of objects to the layer. Cheaper than adding them one at a time, which rebuilds the batches per object.
Declaration
Objective-C
- (void)addAll:(MSFCelestialObjectVector *)objects;Swift
func addAll(_ objects: MSFCelestialObjectVector!)Parameters
objectsThe objects to add.
-
Removes an object from the layer.
Declaration
Objective-C
- (BOOL)remove:(MSFCelestialObject *)object;Swift
func remove(_ object: MSFCelestialObject!) -> BoolParameters
objectThe object to remove.
Return Value
True if the object was found and removed.
-
Removes every object from the layer.
Declaration
Objective-C
- (void)clear;Swift
func clear() -
Returns all objects of the layer.
Declaration
Objective-C
- (MSFCelestialObjectVector *)getAll;Swift
func getAll() -> MSFCelestialObjectVector!Return Value
The objects of the layer.
-
Returns the object event listener.
Declaration
Objective-C
- (MSFCelestialEventListener *)getCelestialEventListener;Swift
func getCelestialEventListener() -> MSFCelestialEventListener!Return Value
The object event listener.
-
Sets the object event listener, which reports clicks on objects of this layer.
Declaration
Objective-C
- (void)setCelestialEventListener:(MSFCelestialEventListener *)listener;Swift
func setCelestialEventListener(_ listener: MSFCelestialEventListener!)Parameters
listenerThe new object event listener.
-
Undocumented
Declaration
Objective-C
- (BOOL)isUpdateInProgress;Swift
func isUpdateInProgress() -> Bool -
Undocumented
Declaration
Objective-C
-(void)dealloc;Swift
func dealloc()