In the current version of ArcGIS Runtime, multipatch geometry is not supported. This kind of geometry is available in ArcGIS Desktop and ArcGIS Engine via ArcObjects
. With multipatch geometry, it is possible to virtually create any shape, such as the clearance cones around a missile's trajectory, by using triangle strips, triangle fans, triangles, and rings. Here's an example:
This kind of capability will eventually make it to ArcGIS Runtime as the 3D capabilities are expanded. For now, you can still create multisided shapes with the example code that follows, and apply PictureFillSymbol
to them as a form of texture if needed:
// outline SimpleLineSymbol sls = new SimpleLineSymbol() { Color = Colors.Black, Style = SimpleLineStyle.Solid, Width = 2 }; // fill symbol SimpleFillSymbol sfs = new SimpleFillSymbol() { Color = Colors.Red, Style = SimpleFillStyle.Null, Outline = sls }; // renderer SimpleRenderer sr = new SimpleRenderer(); sr.Symbol = sfs; // Graphics Overlap GraphicsOverlay graphicsOverlay = new GraphicsOverlay() { RenderingMode = GraphicsRenderingMode.Dynamic, Renderer = sr, SceneProperties = new LayerSceneProperties() { SurfacePlacement = SurfacePlacement.Relative } }; // bottom of box List<MapPoint> bottomList = new List<MapPoint>(); bottomList.Add(new MapPoint(71.75, 36.5, 10000, SpatialReferences.Wgs84)); bottomList.Add(new MapPoint(71.75, 37.5, 10000, SpatialReferences.Wgs84)); bottomList.Add(new MapPoint(72.75, 37.5, 10000, SpatialReferences.Wgs84)); bottomList.Add(new MapPoint(72.75, 36.5, 10000, SpatialReferences.Wgs84)); // West Side of box List<MapPoint> westSideList = new List<MapPoint>(); westSideList.Add(new MapPoint(71.75, 36.5, 10000, SpatialReferences.Wgs84)); westSideList.Add(new MapPoint(71.75, 36.5, 60000, SpatialReferences.Wgs84)); westSideList.Add(new MapPoint(72.75, 36.5, 60000, SpatialReferences.Wgs84)); westSideList.Add(new MapPoint(72.75, 36.5, 10000, SpatialReferences.Wgs84)); // West Side of box List<MapPoint> eastSideList = new List<MapPoint>(); eastSideList.Add(new MapPoint(72.75, 36.5, 10000, SpatialReferences.Wgs84)); eastSideList.Add(new MapPoint(72.75, 36.5, 60000, SpatialReferences.Wgs84)); eastSideList.Add(new MapPoint(72.75, 37.5, 60000, SpatialReferences.Wgs84)); eastSideList.Add(new MapPoint(72.75, 37.5, 10000, SpatialReferences.Wgs84)); // South Side of box List<MapPoint> southSideList = new List<MapPoint>(); southSideList.Add(new MapPoint(71.75, 36.5, 10000, SpatialReferences.Wgs84)); southSideList.Add(new MapPoint(71.75, 36.5, 60000, SpatialReferences.Wgs84)); southSideList.Add(new MapPoint(71.75, 37.5, 60000, SpatialReferences.Wgs84)); southSideList.Add(new MapPoint(71.75, 37.5, 10000, SpatialReferences.Wgs84)); // North Side of box List<MapPoint> northSideList = new List<MapPoint>(); northSideList.Add(new MapPoint(71.75, 37.5, 10000, SpatialReferences.Wgs84)); northSideList.Add(new MapPoint(71.75, 37.5, 60000, SpatialReferences.Wgs84)); northSideList.Add(new MapPoint(72.75, 37.5, 60000, SpatialReferences.Wgs84)); northSideList.Add(new MapPoint(72.75, 37.5, 10000, SpatialReferences.Wgs84)); // Top side of box List<MapPoint> topList = new List<MapPoint>(); topList.Add(new MapPoint(71.75, 36.5, 60000, SpatialReferences.Wgs84)); topList.Add(new MapPoint(71.75, 37.5, 60000, SpatialReferences.Wgs84)); topList.Add(new MapPoint(72.75, 37.5, 60000, SpatialReferences.Wgs84)); topList.Add(new MapPoint(72.75, 36.5, 60000, SpatialReferences.Wgs84)); // create polygons of box Polygon bottomPolygon= new Polygon(bottomList); Polygon topPolygon = new Polygon(topList); Polygon westSidePolygon = new Polygon(westSideList); Polygon southSidePolygon = new Polygon(southSideList); Polygon northSidePolygon = new Polygon(northSideList); Polygon eastSidePolygon = new Polygon(eastSideList); // create graphics of box Graphic bottomGraphic = new Graphic(bottomPolygon); Graphic topGraphic = new Graphic(topPolygon); Graphic westSideGraphic = new Graphic(westSidePolygon); Graphic southSideGraphic = new Graphic(southSidePolygon); Graphic northSideGraphic = new Graphic(northSidePolygon); Graphic eastSideGraphic = new Graphic(eastSidePolygon); // add graphics to overlap graphicsOverlay.Graphics.Add(bottomGraphic); graphicsOverlay.Graphics.Add(topGraphic); graphicsOverlay.Graphics.Add(westSideGraphic); graphicsOverlay.Graphics.Add(southSideGraphic); graphicsOverlay.Graphics.Add(northSideGraphic); graphicsOverlay.Graphics.Add(eastSideGraphic); // add overlay this.sceneView.GraphicsOverlays.Add(graphicsOverlay);
The resulting box will look like the following screenshot, and could represent an airspace deconfliction area: