WhirlyGlobe  1.1
A 3D interactive globe toolkit for ios
VectorLayer Class Reference

#import <VectorLayer.h>

Inheritance diagram for VectorLayer:
<WhirlyGlobeLayer>

List of all members.

Public Member Functions

(void) - startWithThread:scene:
 Called in the layer thread.
(WhirlyGlobe::SimpleIdentity) - addVector:desc:
(WhirlyGlobe::SimpleIdentity) - addVectors:desc:
(void) - changeVector:desc:
(void) - removeVector:
 Removes a group of vectors from the display.
(DrawCost *) - getCost:

Detailed Description

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:

  • enable [NSNumber bool]
  • drawOffset [NSNumber int]
  • color [UIColor]
  • priority [NSNumber int]
  • minVis [NSNumber float]
  • maxVis [NSNumber float]

Member Function Documentation

- 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.

- (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


The documentation for this class was generated from the following file: