------------------------------------------------------------------------------
| 126 | |
| 127 | //------------------------------------------------------------------------------ |
| 128 | void vtkContextInteractorStyle::OnSceneModified() |
| 129 | { |
| 130 | if (!this->Scene || !this->Scene->GetDirty() || this->ProcessingEvents || |
| 131 | this->Scene->GetMTime() == this->LastSceneRepaintMTime || !this->Interactor->GetInitialized()) |
| 132 | { |
| 133 | return; |
| 134 | } |
| 135 | this->BeginProcessingEvent(); |
| 136 | if (!this->TimerCallbackInitialized && this->Interactor) |
| 137 | { |
| 138 | this->Interactor->AddObserver(vtkCommand::TimerEvent, this->InteractorCallbackCommand, 0.0); |
| 139 | this->TimerCallbackInitialized = true; |
| 140 | } |
| 141 | this->LastSceneRepaintMTime = this->Scene->GetMTime(); |
| 142 | // If there is no timer, create a one shot timer to render an updated scene |
| 143 | if (this->SceneTimerId == 0) |
| 144 | { |
| 145 | this->SceneTimerId = this->Interactor->CreateOneShotTimer(40); |
| 146 | } |
| 147 | this->EndProcessingEvent(); |
| 148 | } |
| 149 | |
| 150 | //------------------------------------------------------------------------------ |
| 151 | void vtkContextInteractorStyle::BeginProcessingEvent() |
no test coverage detected