From 4cf800a9ce57a1c277fca839c13a29d53f0df753 Mon Sep 17 00:00:00 2001 From: asv Date: Thu, 25 Aug 2005 12:55:24 +0000 Subject: [PATCH] Bug fixes: init "properties" internal variables and add observers for handled events. --- src/SVTK/SVTK_InteractorStyle.cxx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/SVTK/SVTK_InteractorStyle.cxx b/src/SVTK/SVTK_InteractorStyle.cxx index eede37589..1925bd2a5 100644 --- a/src/SVTK/SVTK_InteractorStyle.cxx +++ b/src/SVTK/SVTK_InteractorStyle.cxx @@ -114,6 +114,14 @@ SVTK_InteractorStyle myRectPicker = VTKViewer_RectPicker::New(); myRectPicker->Delete(); + + // set default values of properties. user may edit them in preferences. + mySpeedIncrement = 10; + mySpaceMouseBtns[0] = 1; + mySpaceMouseBtns[1] = 2; + mySpaceMouseBtns[2] = 10; + mySpaceMouseBtns[3] = 11; + mySpaceMouseBtns[4] = 9; } //---------------------------------------------------------------------------- @@ -1254,6 +1262,14 @@ SVTK_InteractorStyle interactor->AddObserver( RotateRightEvent, EventCallbackCommand, Priority ); interactor->AddObserver( RotateUpEvent, EventCallbackCommand, Priority ); interactor->AddObserver( RotateDownEvent, EventCallbackCommand, Priority ); + interactor->AddObserver( PlusSpeedIncrementEvent, EventCallbackCommand, Priority ); + interactor->AddObserver( MinusSpeedIncrementEvent, EventCallbackCommand, Priority ); + interactor->AddObserver( SetSpeedIncrementEvent, EventCallbackCommand, Priority ); + interactor->AddObserver( SetSpaceMouseF1Event, EventCallbackCommand, Priority ); + interactor->AddObserver( SetSpaceMouseF2Event, EventCallbackCommand, Priority ); + interactor->AddObserver( SetSpaceMouseF3Event, EventCallbackCommand, Priority ); + interactor->AddObserver( SetSpaceMouseF4Event, EventCallbackCommand, Priority ); + interactor->AddObserver( SetSpaceMouseF5Event, EventCallbackCommand, Priority ); } } -- 2.39.2