MSFCelestialSprite
Objective-C
@interface MSFCelestialSprite : MSFCelestialObject
Swift
class MSFCelestialSprite : MSFCelestialObject
A flat, camera-facing object in the sky, sized either by angle in degrees (scales with the field of view) or in screen pixels. Without a bitmap it is drawn as a soft disc in its color.
-
Undocumented
Declaration
Objective-C
-(id)init;Swift
init!() -
Returns the angular size of the sprite.
Declaration
Objective-C
- (float)getAngularSize;Swift
func getAngularSize() -> FloatReturn Value
The angular diameter in degrees, or 0 if the sprite is sized in pixels.
-
Sets the angular size of the sprite.
Declaration
Objective-C
- (void)setAngularSize:(float)degrees;Swift
func setAngularSize(_ degrees: Float)Parameters
degreesThe angular diameter in degrees.
-
Returns the screen size of the sprite.
Declaration
Objective-C
- (float)getScreenSize;Swift
func getScreenSize() -> FloatReturn Value
The diameter in pixels, or 0 if the sprite is sized by angle.
-
Sets a fixed on-screen size, independent of the field of view, e.g. for icons.
Declaration
Objective-C
- (void)setScreenSize:(float)pixels;Swift
func setScreenSize(_ pixels: Float)Parameters
pixelsThe diameter in pixels.
-
Returns the edge softness of a disc sprite.
Declaration
Objective-C
- (float)getSoftness;Swift
func getSoftness() -> FloatReturn Value
The softness, 0 for a hard edge and 1 for a fully soft one.
-
Sets the edge softness of a disc sprite. It has no effect on a sprite with a bitmap.
Declaration
Objective-C
- (void)setSoftness:(float)softness;Swift
func setSoftness(_ softness: Float)Parameters
softnessThe softness, 0 for a hard edge and 1 for a fully soft one.
-
Returns the extra radius that responds to a click.
Declaration
Objective-C
- (float)getClickRadius;Swift
func getClickRadius() -> FloatReturn Value
The extra click radius in degrees.
-
Sets an extra angular radius that responds to a click, added to the sprite’s own size.
Declaration
Objective-C
- (void)setClickRadius:(float)degrees;Swift
func setClickRadius(_ degrees: Float)Parameters
degreesThe extra click radius in degrees.
-
Undocumented
Declaration
Objective-C
-(void)dealloc;Swift
func dealloc()