Exemplo n.º 1
0
        /// <summary>
        /// Create grid point painter
        /// </summary>
        private void CreateGridPointRender( )
        {
            if (gridPointRender != null)
            {
                gridPointRender.Dispose( );
            }

            gridPointRender = new PointRender(d3d, displayedGridPoint, Color.Red);
            gridPointRender.Initialize( );
            gridPointRender.IsDisplayed = false;
        }
Exemplo n.º 2
0
        public static GeometryRender Create(Direct3d d3d, GeometryModel source)
        {
            GeometryRender render = null;

            //Create the geometry object based type
            switch (source.GetType().Name)
            {
            case "ConeModel":
                render = new ConeRender(d3d, source);
                break;

            case "CylinderModel":
                render = new CylinderRender(d3d, source);
                break;

            case "CuboidModel":
                render = new CuboidRender(d3d, source);
                break;

            case "LineModel":
                render = new LineRender(d3d, source);
                break;

            case "PointModel":
                render = new PointRender(d3d, source);
                break;

            case "RectangleModel":
                render = new RectangleRender(d3d, source);
                break;

            case "SphereModel":
                render = new SphereRender(d3d, source);
                break;

            case "RoundModel":
                render = new RoundRender(d3d, source);
                break;

            case "SingleEOSymbolModel":
                render = new SingleEOSymbolRender(d3d, source);
                break;

            default:
                break;
            }

            if (render != null)
            {
                render.Initialize( );
            }

            return(render);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        protected override void PerformDispose( )
        {
            d3d.DxRender3d        -= new Direct3d.DxDirect3dDelegate(d3d_DxRender3d);
            camera.ViewChanged    -= new Camera.ViewChangedEventHandler(PerformViewChanged);
            m_project.DataChanged -= new GEMSProject.DataChangedEventHandler(OnGEMSProjectDataChanged);

            if (axisRender != null)
            {
                axisRender.Dispose( );
                axisRender = null;
            }

            if (gridRender != null)
            {
                gridRender.Dispose( );
                gridRender = null;
            }

            if (parallelRender != null)
            {
                parallelRender.Dispose( );
                parallelRender = null;
            }

            if (domainRender != null)
            {
                domainRender.Dispose( );
                domainRender = null;
            }

            if (meshRender != null)
            {
                meshRender.Dispose( );
                meshRender = null;
            }

            if (gridPointRender != null)
            {
                gridPointRender.Dispose( );
                gridPointRender = null;
            }

            foreach (GEMSSingleRender singleRender in singleRenders)
            {
                singleRender.Dispose( );
            }

            singleRenders.Clear( );
            singleRenders = null;
        }