MSFCelestialLayer
A layer of objects placed in the sky by direction rather than on the map (unless one asks, see CelestialObject::setPosition). Added first in the layer order, every object is behind the map and terrain hides what is behind a ridge. Objects are batched by bitmap, so thousands sharing one bitmap (or none) cost 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()