custom layers in globe

o be able to use custom layers in globe, your custom layer needs to implement the following four interfaces at the minimum: 

ESRI.ArcGIS.GlobeCore.ICustomGlobeLayer, 
ESRI.ArcGIS.Carto.ILayer, 
ESRI.ArcGIS.Geodatabase.IGeoDataset
ESRI.ArcGIS.Carto.ILayerExtensions 

The new addition obviously is the ICustomGlobeLayer interface. Some of the advantages a CustomGlobeLayer gives you are the control over properties such as DrawType, DrawMode and cache usage. 

The custom layers in globe can be classified according the DrawType they implement. The draw type defines the layers drawing mechanism. The supported draw types are esriGlobeCustomDrawRasterize, esriGlobeCustomDrawByTile and esriGlobeCustomDrawOpenGL. 

Let's call custom layers that implement each of the above draw types as RasterizedCustomLayers, TileBasedCustomLayers and OpenGLCustomLayers respectively. 

* RasterizedCustomLayers - are custom layers whose ILayer::Draw method is called by GlobeDisplay to get each rasterized data tile. The Draw method can use the regular IDisplay/IDraw methods to set symbols and draw primitives. This drawing type is useful if you have a custom layer that displays in ArcMap and you want to display it in Globe, too. The extent to be drawn can be accessed through the VisibleBounds property of the DisplayTransformation member of the IDisplay argument passed the the layers Draw method. In addition to the above 4 interfaces, RasterizedCustomLayers can implement ESRI.ArcGIS.Carto.ILayerEffects if support for layer effects such as transparency is desired. RasterizedCustomLayers can be used to draw feature and raster data into globe, the result of which is always rasterized (draped on the globe's surface). 

* TileBasedCustomLayers - are also rasterized similar to RasterizedCustomLayers, but the custom layer provides directly the pixel array for each tile when its ICustomGlobeLayer::GetTile method is called. This gives you the ability to directly write into a globe image tile. This will be useful, say, if you have a custom raster format that you already have pyramids built and want to directly write into the globe tile without going thru the ArcGIS image display pipeline. 

* OpenGLCustomLayers: The layer is drawn all at once by the implementation of ICustomGlobeLayer::DrawImmediate method, making OpenGL calls. The layer can use internal caching mechanisms like display lists or array vertices. You can use a OpenGLCustomLayer when you want to draw your own OpenGL primitives and objects. These are treated as 3D data seamlessly integrated with the globe layers. 

 

http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/d/0001000002ss000000.htm

posted @ 2014-12-01 20:20  zhh  阅读(264)  评论(0编辑  收藏  举报