MCPcopy Create free account
hub / github.com/Kitware/VTK / OnSceneModified

Method OnSceneModified

Views/Context2D/vtkContextInteractorStyle.cxx:128–148  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

126
127//------------------------------------------------------------------------------
128void 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//------------------------------------------------------------------------------
151void vtkContextInteractorStyle::BeginProcessingEvent()

Callers 2

ProcessSceneEventsMethod · 0.95
EndProcessingEventMethod · 0.95

Calls 7

BeginProcessingEventMethod · 0.95
EndProcessingEventMethod · 0.95
GetDirtyMethod · 0.80
CreateOneShotTimerMethod · 0.80
GetMTimeMethod · 0.45
GetInitializedMethod · 0.45
AddObserverMethod · 0.45

Tested by

no test coverage detected