#include #include #include #include #include #include // ------------------------------------------------------------------------- long cpExtensions::Interaction::BaseInteractorStyle::_TMouseButtonEvent:: MaxDoubleClick = 350; // ms // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: SetSetDoubleClickDelay( long delay ) { Self::_TMouseButtonEvent::MaxDoubleClick = delay; } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: AddMouseMoveCommand( TMouseCommand command, void* data ) { if( command != NULL ) { this->m_MouseMoveCommands[ command ] = data; this->Modified( ); } // fi } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: AddMouseClickCommand( TMouseCommand command, void* data ) { if( command != NULL ) { this->m_MouseClickCommands[ command ] = data; this->Modified( ); } // fi } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: AddMouseDoubleClickCommand( TMouseCommand command, void* data ) { if( command != NULL ) { this->m_MouseDoubleClickCommands[ command ] = data; this->Modified( ); } // fi } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: AddMouseWheelCommand( TMouseWheelCommand command, void* data ) { if( command != NULL ) { this->m_MouseWheelCommands[ command ] = data; this->Modified( ); } // fi } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: AddKeyCommand( TKeyCommand command, void* data ) { if( command != NULL ) { this->m_KeyCommands[ command ] = data; this->Modified( ); } // fi } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: AddExposeCommand( TVoidCommand command, void* data ) { if( command != NULL ) { this->m_ExposeCommands[ command ] = data; this->Modified( ); } // fi } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: AddConfigureCommand( TVoidCommand command, void* data ) { if( command != NULL ) { this->m_ConfigureCommands[ command ] = data; this->Modified( ); } // fi } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: AddEnterCommand( TVoidCommand command, void* data ) { if( command != NULL ) { this->m_EnterCommands[ command ] = data; this->Modified( ); } // fi } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: AddLeaveCommand( TVoidCommand command, void* data ) { if( command != NULL ) { this->m_LeaveCommands[ command ] = data; this->Modified( ); } // fi } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: RemoveMouseMoveCommand( TMouseCommand command ) { auto i = this->m_MouseMoveCommands.find( command ); if( i != this->m_MouseMoveCommands.end( ) ) { this->m_MouseMoveCommands.erase( i ); this->Modified( ); } // fi } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: RemoveMouseClickCommand( TMouseCommand command ) { auto i = this->m_MouseClickCommands.find( command ); if( i != this->m_MouseClickCommands.end( ) ) { this->m_MouseClickCommands.erase( i ); this->Modified( ); } // fi } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: RemoveMouseDoubleClickCommand( TMouseCommand command ) { auto i = this->m_MouseDoubleClickCommands.find( command ); if( i != this->m_MouseDoubleClickCommands.end( ) ) { this->m_MouseDoubleClickCommands.erase( i ); this->Modified( ); } // fi } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: RemoveMouseWheelCommand( TMouseWheelCommand command ) { auto i = this->m_MouseWheelCommands.find( command ); if( i != this->m_MouseWheelCommands.end( ) ) { this->m_MouseWheelCommands.erase( i ); this->Modified( ); } // fi } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: RemoveKeyCommand( TKeyCommand command ) { auto i = this->m_KeyCommands.find( command ); if( i != this->m_KeyCommands.end( ) ) { this->m_KeyCommands.erase( i ); this->Modified( ); } // fi } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: RemoveExposeCommand( TVoidCommand command ) { auto i = this->m_ExposeCommands.find( command ); if( i != this->m_ExposeCommands.end( ) ) { this->m_ExposeCommands.erase( i ); this->Modified( ); } // fi } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: RemoveConfigureCommand( TVoidCommand command ) { auto i = this->m_ConfigureCommands.find( command ); if( i != this->m_ConfigureCommands.end( ) ) { this->m_ConfigureCommands.erase( i ); this->Modified( ); } // fi } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: RemoveEnterCommand( TVoidCommand command ) { auto i = this->m_EnterCommands.find( command ); if( i != this->m_EnterCommands.end( ) ) { this->m_EnterCommands.erase( i ); this->Modified( ); } // fi } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: RemoveLeaveCommand( TVoidCommand command ) { auto i = this->m_LeaveCommands.find( command ); if( i != this->m_LeaveCommands.end( ) ) { this->m_LeaveCommands.erase( i ); this->Modified( ); } // fi } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: DelegateTDxEvent( unsigned long event, void* calldata ) { // TODO std::cerr << "No TDx support at this time!" << std::endl; std::exit( 1 ); } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: OnMouseMove( ) { // Get current position on the associated actors vtkRenderWindowInteractor* rwi = this->GetInteractor( ); if( rwi == NULL ) return; // Get modifiers bool alt = ( rwi->GetAltKey( ) == 1 ); bool ctr = ( rwi->GetControlKey( ) == 1 ); bool sft = ( rwi->GetShiftKey( ) == 1 ); ButtonID button = this->GetButtonID( ); // Invoke possible generic events if( button == Self::ButtonID_Right ) { if( !alt && !ctr && !sft ) { this->FindPokedRenderer( rwi->GetEventPosition( )[ 0 ], rwi->GetEventPosition( )[ 1 ] ); this->Dolly( ); } // fi } else if( button == Self::ButtonID_Middle ) { if( !alt && !ctr && !sft ) { this->FindPokedRenderer( rwi->GetEventPosition( )[ 0 ], rwi->GetEventPosition( )[ 1 ] ); this->Pan( ); } // fi } // fi // Get mouse pointer position static int idx[ 2 ]; static double pos[ 3 ]; if( !( this->_PickPosition( idx, pos ) ) ) return; // Invoke possible specialized events auto i = this->m_MouseMoveCommands.begin( ); for( ; i != this->m_MouseMoveCommands.end( ); ++i ) i->first( i->second, button, idx, pos, alt, ctr, sft ); } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: OnMouseWheelForward( ) { vtkRenderWindowInteractor* rwi = this->GetInteractor( ); if( rwi == NULL ) return; // Invoke possible events auto i = this->m_MouseWheelCommands.begin( ); for( ; i != this->m_MouseWheelCommands.end( ); ++i ) i->first( i->second, 1, rwi->GetAltKey( ) == 1, rwi->GetControlKey( ) == 1, rwi->GetShiftKey( ) == 1 ); } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: OnMouseWheelBackward( ) { vtkRenderWindowInteractor* rwi = this->GetInteractor( ); if( rwi == NULL ) return; // Invoke possible events auto i = this->m_MouseWheelCommands.begin( ); for( ; i != this->m_MouseWheelCommands.end( ); ++i ) i->first( i->second, -1, rwi->GetAltKey( ) == 1, rwi->GetControlKey( ) == 1, rwi->GetShiftKey( ) == 1 ); } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: OnLeftButtonDown( ) { this->m_ActiveButton = Self::ButtonID_Left; } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: OnLeftButtonUp( ) { this->m_ActiveButton = Self::ButtonID_None; } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: OnMiddleButtonDown( ) { this->m_ActiveButton = Self::ButtonID_Middle; // Get current position on the associated actors vtkRenderWindowInteractor* rwi = this->GetInteractor( ); if( rwi == NULL ) return; // Get modifiers bool alt = ( rwi->GetAltKey( ) == 1 ); bool ctr = ( rwi->GetControlKey( ) == 1 ); bool sft = ( rwi->GetShiftKey( ) == 1 ); if( !alt && !ctr && !sft ) this->StartPan( ); } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: OnMiddleButtonUp( ) { this->m_ActiveButton = Self::ButtonID_None; // Get current position on the associated actors vtkRenderWindowInteractor* rwi = this->GetInteractor( ); if( rwi == NULL ) return; // Get modifiers bool alt = ( rwi->GetAltKey( ) == 1 ); bool ctr = ( rwi->GetControlKey( ) == 1 ); bool sft = ( rwi->GetShiftKey( ) == 1 ); switch( this->State ) { case VTKIS_PAN: this->EndPan( ); break; default: break; } // hctiws } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: OnRightButtonDown( ) { this->m_ActiveButton = Self::ButtonID_Right; // Get current position on the associated actors vtkRenderWindowInteractor* rwi = this->GetInteractor( ); if( rwi == NULL ) return; // Get modifiers bool alt = ( rwi->GetAltKey( ) == 1 ); bool ctr = ( rwi->GetControlKey( ) == 1 ); bool sft = ( rwi->GetShiftKey( ) == 1 ); if( !alt && !ctr && !sft ) this->StartDolly( ); } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: OnRightButtonUp( ) { this->m_ActiveButton = Self::ButtonID_None; // Get current position on the associated actors vtkRenderWindowInteractor* rwi = this->GetInteractor( ); if( rwi == NULL ) return; // Get modifiers bool alt = ( rwi->GetAltKey( ) == 1 ); bool ctr = ( rwi->GetControlKey( ) == 1 ); bool sft = ( rwi->GetShiftKey( ) == 1 ); switch( this->State ) { case VTKIS_DOLLY: this->EndDolly( ); break; default: break; } // hctiws } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: OnLeftClick( ) { // Get current position on the associated actors vtkRenderWindowInteractor* rwi = this->GetInteractor( ); if( rwi == NULL ) return; // Get mouse pointer position static int idx[ 2 ]; static double pos[ 3 ]; if( !( this->_PickPosition( idx, pos ) ) ) return; // Invoke possible events auto i = this->m_MouseClickCommands.begin( ); for( ; i != this->m_MouseClickCommands.end( ); ++i ) i->first( i->second, Self::ButtonID_Left, idx, pos, rwi->GetAltKey( ) == 1, rwi->GetControlKey( ) == 1, rwi->GetShiftKey( ) == 1 ); } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: OnLeftDoubleClick( ) { // Get current position on the associated actors vtkRenderWindowInteractor* rwi = this->GetInteractor( ); if( rwi == NULL ) return; // Get mouse pointer position static int idx[ 2 ]; static double pos[ 3 ]; if( !( this->_PickPosition( idx, pos ) ) ) return; // Invoke possible events auto i = this->m_MouseDoubleClickCommands.begin( ); for( ; i != this->m_MouseDoubleClickCommands.end( ); ++i ) i->first( i->second, Self::ButtonID_Left, idx, pos, rwi->GetAltKey( ) == 1, rwi->GetControlKey( ) == 1, rwi->GetShiftKey( ) == 1 ); } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: OnMiddleClick( ) { // Get current position on the associated actors vtkRenderWindowInteractor* rwi = this->GetInteractor( ); if( rwi == NULL ) return; // Get mouse pointer position static int idx[ 2 ]; static double pos[ 3 ]; if( !( this->_PickPosition( idx, pos ) ) ) return; // Invoke possible events auto i = this->m_MouseClickCommands.begin( ); for( ; i != this->m_MouseClickCommands.end( ); ++i ) i->first( i->second, Self::ButtonID_Middle, idx, pos, rwi->GetAltKey( ) == 1, rwi->GetControlKey( ) == 1, rwi->GetShiftKey( ) == 1 ); } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: OnMiddleDoubleClick( ) { // Get current position on the associated actors vtkRenderWindowInteractor* rwi = this->GetInteractor( ); if( rwi == NULL ) return; // Get mouse pointer position static int idx[ 2 ]; static double pos[ 3 ]; if( !( this->_PickPosition( idx, pos ) ) ) return; // Invoke possible events auto i = this->m_MouseDoubleClickCommands.begin( ); for( ; i != this->m_MouseDoubleClickCommands.end( ); ++i ) i->first( i->second, Self::ButtonID_Middle, idx, pos, rwi->GetAltKey( ) == 1, rwi->GetControlKey( ) == 1, rwi->GetShiftKey( ) == 1 ); } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: OnRightClick( ) { // Get current position on the associated actors vtkRenderWindowInteractor* rwi = this->GetInteractor( ); if( rwi == NULL ) return; // Get mouse pointer position static int idx[ 2 ]; static double pos[ 3 ]; if( !( this->_PickPosition( idx, pos ) ) ) return; // Invoke possible events auto i = this->m_MouseClickCommands.begin( ); for( ; i != this->m_MouseClickCommands.end( ); ++i ) i->first( i->second, Self::ButtonID_Right, idx, pos, rwi->GetAltKey( ) == 1, rwi->GetControlKey( ) == 1, rwi->GetShiftKey( ) == 1 ); } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: OnRightDoubleClick( ) { // Get current position on the associated actors vtkRenderWindowInteractor* rwi = this->GetInteractor( ); if( rwi == NULL ) return; // Get mouse pointer position static int idx[ 2 ]; static double pos[ 3 ]; if( !( this->_PickPosition( idx, pos ) ) ) return; // Invoke possible events auto i = this->m_MouseDoubleClickCommands.begin( ); for( ; i != this->m_MouseDoubleClickCommands.end( ); ++i ) i->first( i->second, Self::ButtonID_Right, idx, pos, rwi->GetAltKey( ) == 1, rwi->GetControlKey( ) == 1, rwi->GetShiftKey( ) == 1 ); } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: OnChar( ) { vtkRenderWindowInteractor* rwi = this->GetInteractor( ); if( rwi == NULL ) return; // Invoke possible events auto i = this->m_KeyCommands.begin( ); for( ; i != this->m_KeyCommands.end( ); ++i ) i->first( i->second, rwi->GetKeyCode( ) ); } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: OnKeyDown( ) { } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: OnKeyUp( ) { } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: OnKeyPress( ) { } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: OnKeyRelease( ) { } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: OnExpose( ) { vtkRenderWindowInteractor* rwi = this->GetInteractor( ); if( rwi == NULL ) return; // Invoke possible events auto i = this->m_ExposeCommands.begin( ); for( ; i != this->m_ExposeCommands.end( ); ++i ) i->first( i->second ); } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: OnConfigure( ) { vtkRenderWindowInteractor* rwi = this->GetInteractor( ); if( rwi == NULL ) return; // Invoke possible events auto i = this->m_ConfigureCommands.begin( ); for( ; i != this->m_ConfigureCommands.end( ); ++i ) i->first( i->second ); } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: OnEnter( ) { vtkRenderWindowInteractor* rwi = this->GetInteractor( ); if( rwi == NULL ) return; // Invoke possible events auto i = this->m_EnterCommands.begin( ); for( ; i != this->m_EnterCommands.end( ); ++i ) i->first( i->second ); } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: OnLeave( ) { vtkRenderWindowInteractor* rwi = this->GetInteractor( ); if( rwi == NULL ) return; // Invoke possible events auto i = this->m_LeaveCommands.begin( ); for( ; i != this->m_LeaveCommands.end( ); ++i ) i->first( i->second ); } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: Dolly( ) { if( this->CurrentRenderer == NULL ) return; vtkRenderWindowInteractor* rwi = this->GetInteractor( ); double *center = this->CurrentRenderer->GetCenter( ); int dy = rwi->GetEventPosition( )[ 1 ] - rwi->GetLastEventPosition( )[ 1 ]; double dyf = this->m_MotionFactor * dy / center[ 1 ]; this->_Dolly( std::pow( 1.1, dyf ) ); } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: Pan( ) { if( this->CurrentRenderer == NULL ) return; vtkRenderWindowInteractor* rwi = this->Interactor; double viewFocus[ 4 ], focalDepth, viewPoint[ 3 ]; double newPickPoint[ 4 ], oldPickPoint[ 4 ], motionVector[ 3 ]; // Calculate the focal depth since we'll be using it a lot vtkCamera* camera = this->CurrentRenderer->GetActiveCamera( ); camera->GetFocalPoint( viewFocus ); this->ComputeWorldToDisplay( viewFocus[ 0 ], viewFocus[ 1 ], viewFocus[ 2 ], viewFocus ); focalDepth = viewFocus[ 2 ]; this->ComputeDisplayToWorld( rwi->GetEventPosition( )[ 0 ], rwi->GetEventPosition( )[ 1 ], focalDepth, newPickPoint ); // Has to recalc old mouse point since the viewport has moved, // so can't move it outside the loop this->ComputeDisplayToWorld( rwi->GetLastEventPosition( )[ 0 ], rwi->GetLastEventPosition( )[ 1 ], focalDepth, oldPickPoint ); // Camera motion is reversed motionVector[ 0 ] = oldPickPoint[ 0 ] - newPickPoint[ 0 ]; motionVector[ 1 ] = oldPickPoint[ 1 ] - newPickPoint[ 1 ]; motionVector[ 2 ] = oldPickPoint[ 2 ] - newPickPoint[ 2 ]; camera->GetFocalPoint( viewFocus ); camera->GetPosition( viewPoint ); camera->SetFocalPoint( motionVector[ 0 ] + viewFocus[ 0 ], motionVector[ 1 ] + viewFocus[ 1 ], motionVector[ 2 ] + viewFocus[ 2 ] ); camera->SetPosition( motionVector[ 0 ] + viewPoint[ 0 ], motionVector[ 1 ] + viewPoint[ 1 ], motionVector[ 2 ] + viewPoint[ 2 ] ); if( rwi->GetLightFollowCamera( ) ) this->CurrentRenderer->UpdateLightsGeometryToFollowCamera( ); rwi->Render( ); } // ------------------------------------------------------------------------- cpExtensions::Interaction::BaseInteractorStyle:: BaseInteractorStyle( ) : Superclass( ), m_MotionFactor( double( 10 ) ) { this->m_LeftButtonEvent.Reset( ); this->m_MiddleButtonEvent.Reset( ); this->m_RightButtonEvent.Reset( ); this->m_ActiveButton = Self::ButtonID_None; this->EventCallbackCommand->SetCallback( Self::_ProcessEvents ); } // ------------------------------------------------------------------------- cpExtensions::Interaction::BaseInteractorStyle:: ~BaseInteractorStyle( ) { } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: _Dolly( double factor ) { if( this->CurrentRenderer == NULL ) return; vtkCamera* camera = this->CurrentRenderer->GetActiveCamera( ); if( camera->GetParallelProjection( ) == 0 ) { camera->Dolly( factor ); if( this->AutoAdjustCameraClippingRange ) this->CurrentRenderer->ResetCameraClippingRange( ); } else camera->SetParallelScale( camera->GetParallelScale( ) / factor ); if( this->Interactor->GetLightFollowCamera( ) ) this->CurrentRenderer->UpdateLightsGeometryToFollowCamera( ); this->Interactor->Render( ); } // ------------------------------------------------------------------------- void cpExtensions::Interaction::BaseInteractorStyle:: _ProcessEvents( vtkObject* object, unsigned long event, void* clientdata, void* calldata ) { // Get active style and interactor Self* s = reinterpret_cast< Self* >( clientdata ); if( s == NULL ) return; // Process events switch( event ) { case vtkCommand::MouseMoveEvent: { s->OnMouseMove( ); } break; case vtkCommand::LeftButtonPressEvent: { unsigned char nc = s->m_LeftButtonEvent.Clicks( ); if( nc == 2 ) s->OnLeftDoubleClick( ); else if( nc == 1 ) s->OnLeftClick( ); s->OnLeftButtonDown( ); } break; case vtkCommand::LeftButtonReleaseEvent: { s->m_LeftButtonEvent.Release( ); s->OnLeftButtonUp( ); } break; case vtkCommand::MiddleButtonPressEvent: { unsigned char nc = s->m_MiddleButtonEvent.Clicks( ); if( nc == 2 ) s->OnMiddleDoubleClick( ); else if( nc == 1 ) s->OnMiddleClick( ); s->OnMiddleButtonDown( ); } break; case vtkCommand::MiddleButtonReleaseEvent: { s->m_MiddleButtonEvent.Release( ); s->OnMiddleButtonUp( ); } break; case vtkCommand::RightButtonPressEvent: { unsigned char nc = s->m_RightButtonEvent.Clicks( ); if( nc == 2 ) s->OnRightDoubleClick( ); else if( nc == 1 ) s->OnRightClick( ); s->OnRightButtonDown( ); } break; case vtkCommand::RightButtonReleaseEvent: { s->m_RightButtonEvent.Release( ); s->OnRightButtonUp( ); } break; case vtkCommand::MouseWheelForwardEvent: { s->OnMouseWheelForward( ); } break; case vtkCommand::MouseWheelBackwardEvent: { s->OnMouseWheelBackward( ); } break; case vtkCommand::KeyPressEvent: { s->OnKeyDown( ); s->OnKeyPress( ); } break; case vtkCommand::KeyReleaseEvent: { s->OnKeyUp( ); s->OnKeyRelease( ); } break; case vtkCommand::CharEvent: { s->OnChar( ); } break; case vtkCommand::ExposeEvent: { s->OnExpose( ); } break; case vtkCommand::ConfigureEvent: { s->OnConfigure( ); } break; case vtkCommand::EnterEvent: { s->OnEnter( ); } break; case vtkCommand::LeaveEvent: { s->OnLeave( ); } break; case vtkCommand::TimerEvent: { // Do nothing } break; case vtkCommand::DeleteEvent: { s->SetInteractor( 0 ); } break; case vtkCommand::TDxMotionEvent: case vtkCommand::TDxButtonPressEvent: case vtkCommand::TDxButtonReleaseEvent: { s->DelegateTDxEvent( event, calldata ); } break; default: break; } // hctiws } // eof - $RCSfile$