SuperMap iObjects.NET构建GeoModel3D

使用SuperMap iObjects.NET构建GeoModel3D 的代码
GeoModel3D model3d = new GeoModel3D();

        Model model = new Model();
        Skeleton sk = new Skeleton();
        sk.Name = "test";
        Double[] vertexes = new Double[12];
         vertexes[0] = 0.0;            vertexes[1] = 0.0;            vertexes[2] = 0.0;
         vertexes[3] = 0; vertexes[4] = 64000; vertexes[5] = 0.0;
         vertexes[6] = 64000; vertexes[7] = 64000; vertexes[8] = 0.0;
         vertexes[9] = 64000; vertexes[10] = 0; vertexes[11] = 0.0;

        sk.SetVertices(vertexes);     
       
        Int32[] indexes = new Int32[6];
        indexes[0] = 0; indexes[1] = 1; indexes[2] = 2;
        indexes[3] = 0; indexes[4] = 2; indexes[5] = 3;
        
        sk.VertexIndexes = indexes;
        sk.VertexColors = new Color[] { Color.FromArgb(255, 255, 0, 0), Color.FromArgb(255, 255, 0, 0), Color.FromArgb(255, 0, 255, 0), Color.FromArgb(255, 0, 0, 255) };
        model.Add(sk);

        model3d.Model = model;
        model3d.Position = new Point3D(124, 40, 303);
        GeoStyle3D style = new GeoStyle3D();

        style.AltitudeMode = AltitudeMode.Absolute;
        style.BottomAltitude = 5000;
        style.FillMode = FillMode3D.Fill;
        model3d.Style3D = style;
        sceneControl.Scene.TrackingLayer.Add(model3d, "ddd");

你可能感兴趣的:(SuperMap iObjects.NET构建GeoModel3D)