WhirlyGlobeRenderController
Objective-C
@interface WhirlyGlobeRenderController : MaplyRenderController
Swift
class WhirlyGlobeRenderController : MaplyRenderController
The Globe Render Controller is a standalone renderer for the globe. This is separate from the WhirlyGlobeViewController, but performs a similar function for offline rendering.
-
Initialize with the size of the target rendering buffer
Declaration
Objective-C
- (instancetype _Nullable)initWithSize:(CGSize)screenSize mode:(MaplyRenderType)renderType;
Swift
init?(size screenSize: CGSize, mode renderType: MaplyRenderType)
-
Initialize as an offline renderer of a given target size with default renderer (Metal)
Declaration
Objective-C
- (instancetype _Nullable)initWithSize:(CGSize)size;
Swift
init?(size: CGSize)
-
Set this if you’re doing frame by frame animation. It will move particles along and run any animations you may have going. *
Declaration
Objective-C
@property (nonatomic) NSTimeInterval currentTime;
Swift
var currentTime: TimeInterval { get set }
-
Set the viewing state all at once
This sets the position, tilt, height, screen position and heading all at once.
Declaration
Objective-C
- (void)setViewState: (WhirlyGlobeViewControllerAnimationState *_Nonnull)viewState;
Swift
func setViewState(_ viewState: WhirlyGlobeViewControllerAnimationState)
-
Make a WhirlyGlobeViewControllerAnimationState object from the current view state.
This returns the current view parameters in a single WhirlyGlobeViewControllerAnimationState.
Declaration
Objective-C
- (nullable WhirlyGlobeViewControllerAnimationState *)getViewState;
Swift
func getViewState() -> WhirlyGlobeViewControllerAnimationState?
-
Takes a snapshot of the current OpenGL view and returns it.
Declaration
Objective-C
- (id)snapshot;
Swift
func snapshot() -> Any!
-
This version of snapshot just returns the raw NSData from the “screen”.
Declaration
Objective-C
- (NSData *_Nullable)snapshotData;
Swift
func snapshotData() -> Data?
-
If set, keep north facing upward on the screen as the user moves around.
Off by default.
Declaration
Objective-C
@property (nonatomic) _Bool keepNorthUp;
Swift
var keepNorthUp: Bool { get set }