public AtmosphereControl( )
        {
            InitializeComponent( );

            //	Populate texture resolution combo boxes
            for ( int i = 4; i <= 1024; i *= 2 )
            {
                resolutionComboBox.Items.Add( i );
            }
            resolutionComboBox.SelectedItem = m_AtmosphereBuildParameters.HeightSamples;

            m_AtmosphereBuilder = new AtmosphereBuilder( );

            mH0UpDown.Value = ( decimal )m_AtmosphereModel.MieDensityScaleHeightFraction;
            rH0UpDown.Value = ( decimal )m_AtmosphereModel.RayleighDensityScaleHeightFraction;
            //	TODO: AP: Remove bodges
            inscatterDistanceFudgeUpDown.Value = ( decimal )m_AtmosphereModel.InscatterDistanceFudgeFactor;
            outscatterDistanceFudgeUpDown.Value = ( decimal )m_AtmosphereModel.OutscatterDistanceFudgeFactor;
            outscatterFudgeUpDown.Value = ( decimal )m_AtmosphereModel.OutscatterFudgeFactor;
            mieFudgeUpDown.Value = ( decimal )m_AtmosphereModel.MieFudgeFactor;
            rayleighFudgeUpDown.Value = ( decimal )m_AtmosphereModel.RayleighFudgeFactor;

            m_Worker = new BackgroundWorker( );
            m_Worker.WorkerReportsProgress = true;
            m_Worker.WorkerSupportsCancellation = true;
            m_Worker.DoWork += BuildWorkItem;
            m_Worker.RunWorkerCompleted += WorkItemComplete;
            m_Worker.ProgressChanged += BuildProgressChanged;
        }
        public ScatteringAtmosphereBuildControl( )
        {
            InitializeComponent( );

            //	Populate texture resolution combo boxes
            for ( int i = 4; i <= 1024; i *= 2 )
            {
                opticalDepthResolutionComboBox.Items.Add( i );
                scatteringResolutionComboBox.Items.Add( i );
            }
            scatteringResolutionComboBox.SelectedItem = 32;
            opticalDepthResolutionComboBox.SelectedItem = 256;

            m_AtmosphereBuilder = new AtmosphereBuilder( );

            m_Worker = new BackgroundWorker( );
            m_Worker.WorkerReportsProgress = true;
            m_Worker.WorkerSupportsCancellation = true;
            m_Worker.DoWork += BuildWorkItem;
            m_Worker.RunWorkerCompleted += WorkItemComplete;
            m_Worker.ProgressChanged += BuildProgressChanged;

            atmosphereParametersPropertyGrid.SelectedObject = m_AtmosphereModel;
        }