ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Core.Geometry Namespace / BasicMaterial Class
Members Example

In This Topic
    BasicMaterial Class
    In This Topic
    A Material class describing basic graphic properties.
    Object Model
    BasicMaterial ClassTextureResource Class
    Syntax
    public class BasicMaterial : Material 
    Public Class BasicMaterial 
       Inherits Material
    Example
    Construct 3D special Multipatch shapes
    var sr = MapView.Active.Map.SpatialReference;
    
    var extent = MapView.Active.Extent;
    var center = extent.Center;
    var centerZ = MapPointBuilderEx.CreateMapPoint(center.X, center.Y, 500, sr);
    
    // cube
    multipatch = ArcGIS.Core.Geometry.MultipatchBuilderEx.CreateMultipatch(MultipatchConstructType.Cube, centerZ, 200, sr);
    // tetrahedron
    multipatch = ArcGIS.Core.Geometry.MultipatchBuilderEx.CreateMultipatch(MultipatchConstructType.Tetrahedron, centerZ, 200, sr);
    // diamond
    multipatch = ArcGIS.Core.Geometry.MultipatchBuilderEx.CreateMultipatch(MultipatchConstructType.Diamond, centerZ, 200, sr);
    // hexagon
    multipatch = ArcGIS.Core.Geometry.MultipatchBuilderEx.CreateMultipatch(MultipatchConstructType.Hexagon, centerZ, 200, sr);
    
    // sphere frame
    multipatch = ArcGIS.Core.Geometry.MultipatchBuilderEx.CreateMultipatch(MultipatchConstructType.SphereFrame, centerZ, 200, 0.8, sr);
    // sphere
    multipatch = ArcGIS.Core.Geometry.MultipatchBuilderEx.CreateMultipatch(MultipatchConstructType.Sphere, centerZ, 200, 0.8, sr);
    // cylinder
    multipatch = ArcGIS.Core.Geometry.MultipatchBuilderEx.CreateMultipatch(MultipatchConstructType.Cylinder, centerZ, 200, 0.8, sr);
    // cone
    multipatch = ArcGIS.Core.Geometry.MultipatchBuilderEx.CreateMultipatch(MultipatchConstructType.Cone, centerZ, 200, 0.8, sr);
    
    
    // use the builder to add materials or textures
    //   - create a cone with a material
    builder = new MultipatchBuilderEx(MultipatchConstructType.Cone, centerZ, 200, 0.8, sr);
    
    BasicMaterial faceMaterial = new BasicMaterial();
    faceMaterial.Color = System.Windows.Media.Color.FromRgb(255, 0, 0);
    faceMaterial.Shininess = 150;
    faceMaterial.TransparencyPercent = 50;
    faceMaterial.EdgeWidth = 20;
    
    foreach (var patch in builder.Patches)
      patch.Material = faceMaterial;
    
    multipatch = builder.ToGeometry() as Multipatch;
    Inheritance Hierarchy

    System.Object
       ArcGIS.Core.Geometry.Material
          ArcGIS.Core.Geometry.BasicMaterial

    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also