Ejemplo n.º 1
0
        public FieldPresenter(IFieldView view, MasterPresenter mp)
        {
            this.composer                    = new HeightmapComposer(new VisualLogger());
            composer.ErosionStarted         += Composer_ErosionStarted;
            composer.LayerDescribed         += Composer_LayerDescribed;
            composer.MergeStarted           += Composer_MergeStarted;
            composer.LayerGenerated         += Composer_LayerGenerated;
            composer.RiverGenerationStarted += Composer_RiverGenerationStarted;
            ParentPresenter                  = mp;
            _uiScheduler = TaskScheduler.FromCurrentSynchronizationContext();
            FieldView    = view;

            zoomManager              = new ZoomManager(view);
            zoomManager.ZoomChanged += ZoomManager_ZoomChanged;
            setupDataSources();

            setupFieldDefaults(BaseField);
            updateBasePoly();
        }
Ejemplo n.º 2
0
        public HeightMapPresenter(IHeightmapView heightView, MasterPresenter mp)
        {
            this._heightmapView      = heightView;
            zoomManager              = new ZoomManager(heightView);
            zoomManager.ZoomChanged += ZoomManager_ZoomChanged;
            PluginTools              = new List <IConvolutionPlugin>()
            {
                Plugins.None,
                Plugins.Blur,
                Plugins.Sharpen,
                Plugins.Elevate,
                Plugins.Lower
#if DEBUG
                , Plugins.TestBrush
#endif
            };

            _masterPreseneter = mp;
        }