public static PluginsLoader GetInstance() { instance.LoadAssemblyPlugins(); Config.GetInstance(); Terrain.GetInstance(); HeightMapPersistence.GetInstance(); SlopeMapPersistence.GetInstance(); MouseFilterSdlMouseCache.GetInstance(); KeyFilterSdlKeyCache.GetInstance(); KeyFilterConfigMappingsFactory.GetInstance(); //HeightEditor.GetInstance(); EditController.GetInstance(); Camera.GetInstance(); Framerate.GetInstance(); FrustrumCulling.GetInstance(); BrushShapeController.GetInstance().Register(new RoundBrush()); BrushShapeController.GetInstance().Register(new SquareBrush()); BrushEffectController.GetInstance().Register(new RaiseLower()); BrushEffectController.GetInstance().Register(new Flatten()); BrushEffectController.GetInstance().Register(new PaintTexture()); BrushEffectController.GetInstance().Register(new AddFeature()); BrushEffectController.GetInstance().Register(new FixedHeight()); //Sm3Persistence.GetInstance().LoadSm3("maps/Whakamatunga_Riri.sm3"); //EditTexture.GetInstance(); //FeatureEditing.GetInstance(); MainUI.GetInstance(); return(instance); }
public Camera() { RendererFactory.GetInstance().PreDrawEvent += new PreDrawCallback(renderer_PreDrawEvent); IMouseFilterMouseCache mousefiltermousecache = MouseFilterMouseCacheFactory.GetInstance(); mousemove = MouseMoveConfigMappings.GetInstance(); config = Config.GetInstance(); KeyFilterConfigMappingsFactory.GetInstance().RegisterCommand(OverheadOTAConfigName, new KeyCommandHandler(CameraModeOverheadTAHandler)); KeyFilterConfigMappingsFactory.GetInstance().RegisterCommand(OverheadOTAOrbitConfigName, new KeyCommandHandler(CameraModeOverheadTAHandlerOrbit)); /* * KeyFilterComboKeys.GetInstance().RegisterCombo( * new string[]{"cameramode"}, null, new KeyComboHandler( CameraModeZoomHandler ) ); * KeyFilterComboKeys.GetInstance().RegisterCombo( * new string[]{"cameramode","cameraorbit"}, null, new KeyComboHandler( CameraModeOrbitHandler ) ); * KeyFilterComboKeys.GetInstance().RegisterCombo( * new string[]{"cameramode","camerapan"}, null, new KeyComboHandler( CamerModePanHandler ) ); */ KeyFilterConfigMappingsFactory.GetInstance().RegisterCommand("toggleviewpoint", new KeyCommandHandler(ToggleViewpointHandler)); //mousefiltermousecache.MouseDown += new MouseEventHandler( MouseDown ); mousefiltermousecache.MouseMove += new MouseMoveHandler(mousefiltermousecache_MouseMove); //mousefiltermousecache.MouseUp += new MouseEventHandler( MouseUp ); UpdateRoamingCameraRotAndPosFromOverheadOTA(); }
HeightMapPersistence() { KeyFilterConfigMappingsFactory.GetInstance().RegisterCommand("saveheightmap", new KeyCommandHandler(SaveHandler)); KeyFilterConfigMappingsFactory.GetInstance().RegisterCommand("loadheightmap", new KeyCommandHandler(LoadHandler)); UICommandQueue.GetInstance().RegisterConsumer(typeof(CmdNewHeightMap), new UICommandQueue.UICommandHandler(NewHeightMapHandler)); UICommandQueue.GetInstance().RegisterConsumer(typeof(CmdOpenHeightMap), new UICommandQueue.UICommandHandler(OpenHeightMapHandler)); UICommandQueue.GetInstance().RegisterConsumer(typeof(CmdSaveHeightMap), new UICommandQueue.UICommandHandler(SaveHeightMapHandler)); }
HeightEditor() // protected constructor to enforce singleton pattern { KeyFilterConfigMappingsFactory.GetInstance().RegisterCommand("increaseheight", new KeyCommandHandler(handler_IncreaseHeight)); KeyFilterConfigMappingsFactory.GetInstance().RegisterCommand("decreaseheight", new KeyCommandHandler(handler_DecreaseHeight)); RendererFactory.GetInstance().Tick += new TickHandler(renderer_Tick); brushsize = Config.GetInstance().HeightEditingDefaultBrushSize; speed = Config.GetInstance().HeightEditingSpeed; UICommandQueue.GetInstance().RegisterConsumer(typeof(UICommandChangeBrushSize), new UICommandQueue.UICommandHandler(ChangeBrushSize)); UICommandQueue.GetInstance().RegisterConsumer(typeof(UICommandBrushEffect), new UICommandQueue.UICommandHandler(ChangeBrushEffect)); }
public Camera() { RendererFactory.GetInstance().PreDrawEvent += new PreDrawCallback(renderer_PreDrawEvent); IMouseFilterMouseCache mousefiltermousecache = MouseFilterMouseCacheFactory.GetInstance(); mousemove = MouseMoveConfigMappings.GetInstance(); config = Config.GetInstance(); KeyFilterConfigMappingsFactory.GetInstance().RegisterCommand(OverheadOTATranslateConfigName, new KeyCommandHandler(CameraModeOverheadTAHandlerTranslate)); KeyFilterConfigMappingsFactory.GetInstance().RegisterCommand(OverheadOTAOrbitConfigName, new KeyCommandHandler(CameraModeOverheadTAHandlerOrbit)); KeyFilterConfigMappingsFactory.GetInstance().RegisterCommand(OverheadOTAZoomConfigName, new KeyCommandHandler(CameraModeOverheadTAHandlerZoom)); KeyFilterConfigMappingsFactory.GetInstance().RegisterCommand("toggleviewpoint", new KeyCommandHandler(ToggleViewpointHandler)); mousefiltermousecache.MouseMove += new MouseMoveHandler(mousefiltermousecache_MouseMove); UpdateRoamingCameraRotAndPosFromOverheadOTA(); }
public QuitHandler() { KeyFilterConfigMappingsFactory.GetInstance().RegisterCommand("quit", new KeyCommandHandler(Quit)); }
HeightMapPersistence() { KeyFilterConfigMappingsFactory.GetInstance().RegisterCommand("saveheightmap", new KeyCommandHandler(SaveHandler)); KeyFilterConfigMappingsFactory.GetInstance().RegisterCommand("loadheightmap", new KeyCommandHandler(LoadHandler)); }
SlopeMapPersistence() { KeyFilterConfigMappingsFactory.GetInstance().RegisterCommand("saveslopemap", new KeyCommandHandler(SaveHandler)); }
public EditController() { KeyFilterConfigMappingsFactory.GetInstance().RegisterCommand("increaseheight", new KeyCommandHandler(handler_IncreaseHeight)); KeyFilterConfigMappingsFactory.GetInstance().RegisterCommand("decreaseheight", new KeyCommandHandler(handler_DecreaseHeight)); RendererFactory.GetInstance().Tick += new TickHandler(renderer_Tick); }
SlopeMapPersistence() { KeyFilterConfigMappingsFactory.GetInstance().RegisterCommand("saveslopemap", new KeyCommandHandler(SaveHandler)); UICommandQueue.GetInstance().RegisterConsumer(typeof(CmdExportSlopeMap), new UICommandQueue.UICommandHandler(ExportSlopeMapHandler)); }