示例#1
0
        public void DisplaySymbol()
        {
            IGraphicsLayer layer;

            if (this.axSceneControl1.SceneGraph.Scene.LayerCount == 0)
            {
                layer = new GraphicsLayer3DClass();
                this.axSceneControl1.SceneGraph.Scene.AddLayer(layer as ILayer, false);
            }
            else
            {
                layer = this.axSceneControl1.SceneGraph.Scene.get_Layer(0) as IGraphicsLayer;
            }
            IGraphicsContainer3D containerd = layer as IGraphicsContainer3D;

            containerd.DeleteAllElements();
            if (this.m_pCharacterMarker3DSymbol != null)
            {
                IPoint  point = new PointClass();
                IZAware aware = point as IZAware;
                aware.ZAware = true;
                point.X      = 0.0;
                point.Y      = 0.0;
                point.Z      = 0.0;
                IElement       element  = new MarkerElementClass();
                IMarkerElement element2 = element as IMarkerElement;
                element2.Symbol  = this.m_pCharacterMarker3DSymbol;
                element.Geometry = point;
                containerd.AddElement(element);
            }
            this.axSceneControl1.SceneGraph.RefreshViewers();
        }
        public static IGraphicsContainer3D ConstructGraphicsLayer3D(string name)
        {
            IGraphicsContainer3D graphicsContainer3D = new GraphicsLayer3DClass();
            
            ILayer layer = graphicsContainer3D as ILayer;
            layer.Name = name;

            return graphicsContainer3D;
        }
示例#3
0
        public static IGraphicsContainer3D ConstructGraphicsLayer3D(string name)
        {
            IGraphicsContainer3D graphicsContainer3D = new GraphicsLayer3DClass();

            ILayer layer = graphicsContainer3D as ILayer;

            layer.Name = name;

            return(graphicsContainer3D);
        }
示例#4
0
        public void DisplaySymbol()
        {
            IGraphicsLayer layer;

            if (this.axSceneControl1.SceneGraph.Scene.LayerCount == 0)
            {
                layer = new GraphicsLayer3DClass();
                this.axSceneControl1.SceneGraph.Scene.AddLayer(layer as ILayer, false);
            }
            else
            {
                layer = this.axSceneControl1.SceneGraph.Scene.get_Layer(0) as IGraphicsLayer;
            }
            IGraphicsContainer3D containerd = layer as IGraphicsContainer3D;

            containerd.DeleteAllElements();
            if (this.m_pSimpleLine3DSymbol != null)
            {
                IPoint           inPoint = new PointClass();
                IPointCollection points  = new PolylineClass();
                (points as IZAware).ZAware = true;
                IZAware aware = inPoint as IZAware;
                aware.ZAware = true;
                inPoint.X    = 0.0;
                inPoint.Y    = 0.0;
                inPoint.Z    = 0.0;
                object before = Missing.Value;
                points.AddPoint(inPoint, ref before, ref before);
                inPoint      = new PointClass();
                aware        = inPoint as IZAware;
                aware.ZAware = true;
                inPoint.X    = 1.0;
                inPoint.Y    = 0.0;
                inPoint.Z    = 0.0;
                points.AddPoint(inPoint, ref before, ref before);
                IElement     element  = new LineElementClass();
                ILineElement element2 = element as ILineElement;
                element2.Symbol  = this.m_pSimpleLine3DSymbol as ILineSymbol;
                element.Geometry = points as IGeometry;
                containerd.AddElement(element);
            }
            this.axSceneControl1.SceneGraph.RefreshViewers();
        }