MSFLightStop

Objective-C


@interface MSFLightStop : NSObject {
  void *swigCPtr;
  BOOL swigCMemOwn;
}

Swift

class MSFLightStop : NSObject

One point on a day-cycle light curve: the scene light at a given sun height.

A list of these IS the “formula” that turns an hour into a look. Everything downstream is derived from the two lights it names - the colour every 2D surface is graded by, the sun and ambient the 3D buildings and the terrain are lit with, and the brightness a style reads as view::brightness - so replacing the list replaces the whole map’s palette at every hour, in 2D and in 3D, without a second theme and without a re-decode.

The default list is MapBox Standard’s own four light setups, which is why a converted Standard renders as its day preset at noon and its dusk preset at 19h.

  • Checks if this object is equal to the specified object.

    Declaration

    Objective-C

    - (BOOL)isEqual:(id)object;

    Swift

    func isEqual(_ object: Any!) -> Bool

    Parameters

    object

    The reference object.

    Return Value

    True when objects are equal, false otherwise.

  • Returns the hash value of this object.

    Declaration

    Objective-C

    - (NSUInteger)hash;

    Swift

    func hash() -> UInt

    Return Value

    The hash value of this object.

  • Constructs an empty LightStop, a white light at the horizon.

    Declaration

    Objective-C

    - (id)init;

    Swift

    init!()
  • Constructs a LightStop.

    Declaration

    Objective-C

    - (id)initWithSunAltitude:(float)sunAltitude
                 ambientColor:(MSFColor *)ambientColor
             ambientIntensity:(float)ambientIntensity
                     sunColor:(MSFColor *)sunColor
                 sunIntensity:(float)sunIntensity;

    Swift

    init!(sunAltitude: Float, ambientColor: MSFColor!, ambientIntensity: Float, sunColor: MSFColor!, sunIntensity: Float)

    Parameters

    sunAltitude

    The sun height this light belongs to, in degrees above the horizon.

    ambientColor

    The ambient (sky) colour.

    ambientIntensity

    The ambient intensity, 0-1.

    sunColor

    The directional (sun) colour.

    sunIntensity

    The directional intensity, 0-1.

  • Returns the sun height this light belongs to.

    Declaration

    Objective-C

    - (float)getSunAltitude;

    Swift

    func getSunAltitude() -> Float

    Return Value

    The sun height, in degrees above the horizon.

  • Returns the ambient colour.

    Declaration

    Objective-C

    - (MSFColor *)getAmbientColor;

    Swift

    func getAmbientColor() -> MSFColor!

    Return Value

    The ambient colour.

  • Returns the ambient intensity.

    Declaration

    Objective-C

    - (float)getAmbientIntensity;

    Swift

    func getAmbientIntensity() -> Float

    Return Value

    The ambient intensity, 0-1.

  • Returns the directional colour.

    Declaration

    Objective-C

    - (MSFColor *)getSunColor;

    Swift

    func getSunColor() -> MSFColor!

    Return Value

    The directional colour.

  • Returns the directional intensity.

    Declaration

    Objective-C

    - (float)getSunIntensity;

    Swift

    func getSunIntensity() -> Float

    Return Value

    The directional intensity, 0-1.

  • Undocumented

    Declaration

    Objective-C

    -(BOOL)isEqualInternal: (MSFLightStop*)other;

    Swift

    func isEqualInternal(_ other: MSFLightStop!) -> Bool
  • Returns the hash value of this object.

    Declaration

    Objective-C

    - (int)hashInternal;

    Swift

    func hashInternal() -> Int32

    Return Value

    The hash value of this object.

  • Creates a string representation of this light stop, useful for logging.

    Declaration

    Objective-C

    - (NSString *)description;

    Swift

    func description() -> String!

    Return Value

    The string representation of this light stop.

  • Undocumented

    Declaration

    Objective-C

    -(void)dealloc;

    Swift

    func dealloc()