![]() |
WhirlyGlobe
1.2
A 3D interactive globe toolkit for iOS
|
#import <VectorLayer.h>
Public Member Functions | |
(void) | - startWithThread:scene: |
Called in the layer thread. | |
(WhirlyGlobe::SimpleIdentity) | - addVector:desc: |
(WhirlyGlobe::SimpleIdentity) | - addVectors:desc: |
(WhirlyGlobe::SimpleIdentity) | - addVectors:desc:cacheName: |
This version will cache the drawables in to the given cache file. | |
(WhirlyGlobe::SimpleIdentity) | - addVectorsFromCache: |
(void) | - changeVector:desc: |
(void) | - removeVector: |
Removes a group of vectors from the display. | |
(DrawCost *) | - getCost: |
The Vector Display Layer will add vector objects on top of the globe as requested by a caller. To keep things efficient, you should add a whole group of shapes at once. Basically, the larger the group you can add, the better. The vector layer will handle chunking them out into multiple drawables if needed. When you add a group of shapes you will get back a unique ID that can be used to modify them or delete them later on.
Any of the valid methods can be called in any thread. We check to see which one we're in and pass the appropriate message to the layer thread and execute the work in there.
When adding a set of shapes, you can pass in an optional dictionary describing how they'll look. That can have any of these key/value pairs:
- WhirlyGlobe: | (WhirlyGlobe::VectorShapeRef) | shape | |
desc: | (NSDictionary *) | dict | |
Create geometry from the given vector. The dictionary controls how the vector will appear. We refer to that vector by the returned ID. Call the other version if you have more than one.
- WhirlyGlobe: | (WhirlyGlobe::ShapeSet *) | shapes | |
desc: | (NSDictionary *) | dict | |
Create geometry for the given group of vectors The dictionary controls how the vectors will appear and you can refer to the vectors in later calls with the returned ID.
- WhirlyGlobe: | (NSString *) | cacheName |
Read vectors from the given cache. Returns EmptyIdentity on failure
- (void) changeVector: | (WhirlyGlobe::SimpleIdentity) | vecID | |
desc: | (NSDictionary *) | dict | |
This lets you change how a set of vectors is represented visually. You specify a dictionary to change particular attributues Only enable, color, and visibility range are supported
- (DrawCost *) getCost: | (WhirlyGlobe::SimpleIdentity) | vecID |
Returns a cost estimate for the given vectors referred to by ID. This must be called in the layer thread