| 358 | } |
| 359 | |
| 360 | void 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 | } |
| 394 | VTK_ABI_NAMESPACE_END |
no test coverage detected