3D multipatch examples
This sample shows how various multipatch geometries can be programmatically constructed—alone, from a single patch (TriangleStrip, TriangleFan, Triangles, and Ring examples), from a series of Rings (RingGroup examples), through the assistance of the Vector3D class (Vector3D examples), via extrusion of base 2D geometries (Extrusion examples), and from multiple patches of varying types (Composite examples). Examples have also been provided showing how these geometries can be rotated, scaled, and repositioned via the [ITransform3D](http://esriGeometry/ITransform3D.htm) interface.
By studying these examples, a user can gain insight into the types of shapes the multipatch geometry type can encompass and identify cases where it is appropriate to use, to model 3D entities in a geographic information system (GIS).
Language: C#, VB Subject: 3D Organization: Esri, http://www.esri.com Date: 11/17/2017 ArcObjects SDK: 10.6 Visual Studio: 2015, 2017 .NET Target Framework: 4.5
- ArcObjects .NET API Reference online
- Sample Data Download
- What's new
- Download the ArcObjects SDK for .Net from MyEsri.com
Running the sample
- Start Visual Studio.
- Click Debug and click Start Debugging, or compile the sample and run the created .exe file.
Using the sample
- When the sample starts, you will see x-, y-, z-axes rendered in an embedded SceneControl and buttons on the right side of the form.
- Click a button on the right side of the Windows form's user interface (UI) to render the selected example in the embedded SceneControl with the x-, y-, z-axes (left in place to clarify where the multipatch is positioned in 3D space). The geometry is rendered with a solid fill color and the outline that makes up the multipatch geometry is rendered for illustrative purposes.
- The header for the sections of buttons indicates the type of geometry that is rendered, and each of the numbered buttons corresponds to a different example of that type of geometry. For example, clicking the 1 button on the Composite section shows two cylinders and two pyramids. Clicking the 3 button on the Composite section results in the house shown in the following illustration. Each click clears the screen allowing the recently clicked item to appear.
- To rotate the displayed multipatch, click and drag the SceneControl. Move left and right to move around in the same horizontal plane, and move the mouse pointer up and down to rotate vertically.
- To zoom out, right-click and hold down the mouse button while moving the mouse pointer away from you.
- To zoom in, right-click and hold down the mouse button while moving the mouse pointer towards you. See the following illustration:
If you are working in a 2D environment, the code to create the multipatch items are the same. Write your class to draw them, as the one used in this example draws in 3D. If you are working in 2D with these multipoint items, no extension (neither 3D Analyst for ArcGIS Desktop Basic, ArcGIS Desktop Standard, and ArcGIS Desktop, nor 3D for ArcGIS Engine) is required.
|Development licensing||Deployment licensing|
|Engine Developer Kit||ArcGIS Desktop Basic: 3D Analyst|
|ArcGIS Desktop Standard: 3D Analyst|
|ArcGIS Desktop Advanced: 3D Analyst|
|Engine: 3D Analyst|