MSFCelestialArc
Objective-C
@interface MSFCelestialArc : MSFCelestialObject
Swift
class MSFCelestialArc : MSFCelestialObject
A curve drawn on the sky.
Two ways to define one, and the first is what a daily path is:
- as a CIRCLE about an axis: every direction at a fixed angle from the axis. The daily path of a distant body is exactly this - the axis is the rotation axis and the angle is the complement of the declination - so an application draws it with an axis and one angle rather than by sampling positions through the day.
- as an explicit list of directions, for a path that is not a circle: a satellite track, a flight plan, a sampled trajectory.
The curve is generated once and drawn as a line strip; its width is in pixels, so it stays legible at any field of view.
-
Undocumented
Declaration
Objective-C
-(id)init;Swift
init!() -
Defines the arc as a circle about an axis.
Declaration
Objective-C
- (void)setCircle:(float)axisAzimuth axisAltitude:(float)axisAltitude radius:(float)radius;Swift
func setCircle(_ axisAzimuth: Float, axisAltitude: Float, radius: Float)Parameters
axisAzimuthThe azimuth of the axis in degrees, clockwise from north.
axisAltitudeThe altitude of the axis in degrees above the horizon.
radiusThe angular radius in degrees: the angle between the axis and the curve.
-
Defines the arc as an explicit list of directions, each an (azimuth, altitude) pair in degrees. The curve runs through them in order and is not closed.
Declaration
Objective-C
- (void)setDirections:(MSFDoubleVector *)directions;Swift
func setDirections(_ directions: MSFDoubleVector!)Parameters
directionsThe directions, as alternating azimuth and altitude values in degrees.
-
Defines the arc as a list of SEPARATE segments: every pair of directions is one line and consecutive pairs are not joined. A figure drawn between fixed directions is exactly this - a set of lines that is not a single path - and it stays ONE object, so it is one draw call and one clickable thing.
Declaration
Objective-C
- (void)setSegments:(MSFDoubleVector *)directions;Swift
func setSegments(_ directions: MSFDoubleVector!)Parameters
directionsThe directions, as alternating azimuth and altitude values in degrees.
-
Returns true if the directions are read as separate segments rather than as a path.
Declaration
Objective-C
- (BOOL)isSegmented;Swift
func isSegmented() -> BoolReturn Value
True if the arc is a segment list.
-
Returns the directions of an explicitly defined arc.
Declaration
Objective-C
- (MSFDoubleVector *)getDirections;Swift
func getDirections() -> MSFDoubleVector!Return Value
The directions, as alternating azimuth and altitude values in degrees.
-
Returns the angular radius of a circular arc.
Declaration
Objective-C
- (float)getRadius;Swift
func getRadius() -> FloatReturn Value
The angular radius in degrees.
-
Returns the line width.
Declaration
Objective-C
- (float)getWidth;Swift
func getWidth() -> FloatReturn Value
The width in pixels.
-
Sets the line width.
Declaration
Objective-C
- (void)setWidth:(float)pixels;Swift
func setWidth(_ pixels: Float)Parameters
pixelsThe width in pixels.
-
Returns whether the part of the curve below the horizon is drawn.
Declaration
Objective-C
- (BOOL)isBelowHorizonVisible;Swift
func isBelowHorizonVisible() -> BoolReturn Value
True if the curve is drawn below the horizon.
-
Sets whether the part of the curve below the horizon is drawn. A daily path looks right with this off - the arc then rises and sets like the body on it does.
Declaration
Objective-C
- (void)setBelowHorizonVisible:(BOOL)visible;Swift
func setBelowHorizonVisible(_ visible: Bool)Parameters
visibleTrue to draw the curve below the horizon.
-
Returns the click radius of the curve.
Declaration
Objective-C
- (float)getClickRadius;Swift
func getClickRadius() -> FloatReturn Value
The click radius in degrees.
-
Sets the click radius of the curve: how far, in degrees, a touch ray may miss the curve and still hit it. A curve is a line a pixel or two wide, so without this nothing could ever be aimed at. 0 makes the curve unclickable. The default is 2 degrees.
Declaration
Objective-C
- (void)setClickRadius:(float)degrees;Swift
func setClickRadius(_ degrees: Float)Parameters
degreesThe click radius in degrees.
-
Undocumented
Declaration
Objective-C
-(void)dealloc;Swift
func dealloc()