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

Method Update

Rendering/Core/vtkScenePicker.cxx:229–253  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

227
228//------------------------------------------------------------------------------
229void vtkScenePicker::Update(int displayPos[2])
230{
231 if (this->PickRenderTime <= this->GetMTime())
232 {
233 this->PickRender();
234 }
235
236 if (this->NeedToUpdate || this->LastQueriedDisplayPos[0] != displayPos[0] ||
237 this->LastQueriedDisplayPos[1] != displayPos[1])
238 {
239 this->Prop = nullptr;
240 unsigned int dpos[2] = { 0, 0 };
241 if (displayPos[0] >= 0 && displayPos[1] >= 0)
242 {
243 dpos[0] = static_cast<unsigned int>(displayPos[0]);
244 dpos[1] = static_cast<unsigned int>(displayPos[1]);
245 vtkHardwareSelector::PixelInformation info = this->Selector->GetPixelInformation(dpos);
246 this->CellId = info.AttributeID;
247 this->Prop = info.Prop;
248 }
249 this->LastQueriedDisplayPos[0] = displayPos[0];
250 this->LastQueriedDisplayPos[1] = displayPos[1];
251 this->NeedToUpdate = false;
252 }
253}
254
255//------------------------------------------------------------------------------
256void vtkScenePicker::PrintSelf(ostream& os, vtkIndent indent)

Callers 3

GetCellIdMethod · 0.95
GetViewPropMethod · 0.95
GetVertexIdMethod · 0.95

Calls 3

PickRenderMethod · 0.95
GetMTimeMethod · 0.45
GetPixelInformationMethod · 0.45

Tested by

no test coverage detected