MaplyQuadImageFrameLoader
Objective-C
@interface MaplyQuadImageFrameLoader : MaplyQuadImageLoaderBase
Swift
class MaplyQuadImageFrameLoader : MaplyQuadImageLoaderBase
The Maply Quad Image Frame Loader is for paging individual frames of image pyramids.
This works much like the Quad Image Loader, but handles more than one frame. You can animate between the frames with the QuadImageFrameAnimator
-
Initialize with multiple tile sources (one per frame).
Declaration
Objective-C
- (nullable instancetype) initWithParams:(MaplySamplingParams *_Nonnull)params tileInfos:(NSArray<NSObject<MaplyTileInfoNew> *> *_Nonnull)tileInfos viewC:(MaplyBaseViewController *_Nonnull)viewC;
Swift
init?(params: MaplySamplingParams, tileInfos: [MaplyTileInfoNew], viewC: MaplyBaseViewController)
Parameters
params
The sampling parameters describing how to break down the data for projection onto a globe or map.
tileInfos
A list of tile info objects to fetch for each frame.
viewC
the View controller (or renderer) to add objects to.
-
How frames are loaded (top down vs broad)
Declaration
Objective-C
@property (nonatomic) MaplyLoadFrameMode loadFrameMode;
Swift
var loadFrameMode: MaplyLoadFrameMode { get set }
-
Add another rendering focus to the frame loader.
Normally you’d have one point of focus for a frame loader resulting in one image to be displayed. But if you’re using render targets, you may want to have two and combine them in some way yourself. Or more. No idea why you’d do that.
If you’re going to do this, call addFocus right after you create the FrameLoader.
Declaration
Objective-C
- (void)addFocus;
Swift
func addFocus()
-
Return the number of focii. Normally it’s 1.
See addFocus for what these are. You probably don’t need to be using them.
Declaration
Objective-C
- (int)getNumFocus;
Swift
func getNumFocus() -> Int32
-
Set the interpolated location within the array of frames.
Each set of frames can be accessed from [0.0,numFrames]. Images will be interpolated between those values and may be snapped if data has not yet loaded.
This value is used once per frame, so feel free to call this as much as you’d like.
Declaration
Objective-C
- (void)setCurrentImage:(double)where;
Swift
func setCurrentImage(_ where: Double)
-
Set the currentImage for the given focus. See addFocus for what those are.
Declaration
Objective-C
- (void)setFocus:(int)focusID currentImage:(double)where;
Swift
func setFocus(_ focusID: Int32, currentImage where: Double)
-
Return the interpolated location within the array of frames.
Declaration
Objective-C
- (double)getCurrentImage;
Swift
func getCurrentImage() -> Double
-
Return the interpolated location within the array of frames for a given focus. See addFocus for what that means.
Declaration
Objective-C
- (double)getCurrentImageForFocus:(int)focusID;
Swift
func getCurrentImage(forFocus focusID: Int32) -> Double
-
Set whether we require the top tiles to be loaded before a frame can be displayed.
Normally the system wants all the top level tiles to be loaded (just one at level 0) to be in memory before it will display a frame at all. You can turn this off.
Declaration
Objective-C
- (void)setRequireTopTiles:(_Bool)newVal;
Swift
func setRequireTopTiles(_ newVal: Bool)
-
Number of tile sources passed in as individual frames.
Declaration
Objective-C
- (int)getNumFrames;
Swift
func getNumFrames() -> Int32
-
An optional render target for this loader.
The loader can draw to a render target rather than to the screen. You use this in a multi-pass rendering setup.
This version takes a specific focus. See addFocus for what that means.
Declaration
Objective-C
- (void)setFocus:(int)focusID renderTarget:(MaplyRenderTarget *_Nonnull)renderTarget;
Swift
func setFocus(_ focusID: Int32, renderTarget: MaplyRenderTarget)
-
Shader to use for rendering the image frames for a particular focus.
Consult addFocus for what this means.
Declaration
Objective-C
- (void)setFocus:(int)focusID shader:(MaplyShader *_Nullable)shader;
Swift
func setFocus(_ focusID: Int32, shader: MaplyShader?)
-
Get the frame stats for what’s loaded and what’s not.
Declaration
Objective-C
- (MaplyQuadImageFrameLoaderStats *_Nonnull)getFrameStats;
Swift
func getFrameStats() -> MaplyQuadImageFrameLoaderStats
-
Change the tile sources and reload all the data.
You can change the tile source data is being loaded from. This will force a reload and everything visual should change as the data comes in.Declaration
Objective-C
- (void)changeTileInfos:(NSArray<MaplyTileInfoNew> *_Nullable)tileInfo;
Swift
func changeTileInfos(_ tileInfo: [Any]?)
-
Turn off the image loader and shut things down. This unregisters us with the sampling layer and shuts down the various objects we created.
Declaration
Objective-C
- (void)shutdown;
Swift
func shutdown()