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

Method HighLightCurrentSelectedItem

Views/Infovis/vtkInteractorStyleTreeMapHover.cxx:360–393  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

358}
359
360void vtkInteractorStyleTreeMapHover::HighLightCurrentSelectedItem()
361{
362 float binfo[4];
363
364 if (this->CurrentSelectedId > -1)
365 {
366 this->GetBoundingBoxForTreeMapItem(this->CurrentSelectedId, binfo);
367 vtkTree* tree = this->Layout->GetOutput();
368 double z;
369 if (this->TreeMapToPolyData != nullptr)
370 {
371 z = this->TreeMapToPolyData->GetLevelDeltaZ() * (tree->GetLevel(this->CurrentSelectedId) + 1);
372 }
373 else
374 {
375 z = 0.01;
376 }
377 this->SelectionPoints->SetPoint(0, binfo[0], binfo[2], z);
378 this->SelectionPoints->SetPoint(1, binfo[1], binfo[2], z);
379 this->SelectionPoints->SetPoint(2, binfo[1], binfo[3], z);
380 this->SelectionPoints->SetPoint(3, binfo[0], binfo[3], z);
381 this->SelectionPoints->SetPoint(4, binfo[0], binfo[2], z);
382 this->SelectionPoints->Modified();
383 this->SelectionActor->VisibilityOn();
384 }
385 else
386 {
387 SelectionActor->VisibilityOff();
388 }
389 if (this->GetInteractor())
390 {
391 this->GetInteractor()->Render();
392 }
393}
394VTK_ABI_NAMESPACE_END

Callers 2

OnLeftButtonUpMethod · 0.95
HighLightItemMethod · 0.95

Calls 7

RenderMethod · 0.65
GetOutputMethod · 0.45
GetLevelMethod · 0.45
SetPointMethod · 0.45
ModifiedMethod · 0.45
GetInteractorMethod · 0.45

Tested by

no test coverage detected