WhirlyGlobeViewControllerAnimationState

Objective-C

@interface WhirlyGlobeViewControllerAnimationState : NSObject

Swift

class WhirlyGlobeViewControllerAnimationState : NSObject

Animation State used by the WhirlyGlobeViewControllerAnimationDelegate.

You fill out one of these when you’re implementing the animation delegate. Return it and the view controller will set the respective values to match.

  • Heading is calculated from due north If not set or set to MAXFLOAT, this is ignored

    Declaration

    Objective-C

    @property (nonatomic) double heading;

    Swift

    var heading: Double { get set }
  • Height above the globe

    Declaration

    Objective-C

    @property (nonatomic) double height;

    Swift

    var height: Double { get set }
  • Tilt as used in the view controller If not set or set to MAXFLOAT, we calculate tilt the regular way

    Declaration

    Objective-C

    @property (nonatomic) double tilt;

    Swift

    var tilt: Double { get set }
  • Roll as used in the view controller

    Declaration

    Objective-C

    @property (nonatomic) double roll;

    Swift

    var roll: Double { get set }
  • pos

    Position to move to on the globe

    Declaration

    Objective-C

    @property (nonatomic) MaplyCoordinateD pos;

    Swift

    var pos: MaplyCoordinateD { get set }
  • If set, this is a point on the screen where pos should be. By default this is (-1,-1) meaning the screen position is just the middle. Otherwise, this is where the position should wind up on the screen, if it can.

    Declaration

    Objective-C

    @property (nonatomic) CGPoint screenPos;

    Swift

    var screenPos: CGPoint { get set }
  • If set, the globe will be centered at this point on the screen

    Declaration

    Objective-C

    @property (nonatomic) CGPoint globeCenter;

    Swift

    var globeCenter: CGPoint { get set }
  • Interpolate a new state between the given states A and B.

    This does a simple interpolation (lat/lon, not great circle) between the two animation states.

    Declaration

    Objective-C

    + (nonnull WhirlyGlobeViewControllerAnimationState *)
        Interpolate:(double)t
               from:(WhirlyGlobeViewControllerAnimationState *_Nonnull)stateA
                 to:(WhirlyGlobeViewControllerAnimationState *_Nonnull)stateB;

    Swift

    class func interpolate(_ t: Double, from stateA: WhirlyGlobeViewControllerAnimationState, to stateB: WhirlyGlobeViewControllerAnimationState) -> WhirlyGlobeViewControllerAnimationState