示例#1
0
        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();
        }
示例#2
0
        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();
        }
示例#3
0
        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();
        }
示例#4
0
        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();
        }