------------------------------------------------------------------------------
| 309 | |
| 310 | //------------------------------------------------------------------------------ |
| 311 | void vtkLabeledTreeMapDataMapper::RenderOpaqueGeometry(vtkViewport* viewport, vtkActor2D* actor) |
| 312 | { |
| 313 | int i, numComp = 0, pointIdLabels, activeComp = 0; |
| 314 | int numVertices; |
| 315 | double x[3]; |
| 316 | vtkAbstractArray* abstractData; |
| 317 | vtkDataArray *numericData, *tempData; |
| 318 | vtkStringArray* stringData; |
| 319 | vtkTree* input = this->GetInputTree(); |
| 320 | if (!input) |
| 321 | { |
| 322 | vtkErrorMacro(<< "Need input tree to render labels (2)"); |
| 323 | return; |
| 324 | } |
| 325 | |
| 326 | vtkTextProperty* tprop = this->GetLabelTextProperty(); |
| 327 | if (!tprop) |
| 328 | { |
| 329 | vtkErrorMacro(<< "Need text property to render labels"); |
| 330 | return; |
| 331 | } |
| 332 | |
| 333 | this->GetInputAlgorithm()->Update(); |
| 334 | |
| 335 | // Input might have changed |
| 336 | input = this->GetInputTree(); |
| 337 | vtkDataSetAttributes* pd = input->GetVertexData(); |
| 338 | // Get the treeMap info |
| 339 | tempData = this->GetInputArrayToProcess(0, input); |
| 340 | if (!tempData) |
| 341 | { |
| 342 | vtkErrorMacro(<< "Input Tree does not have box information."); |
| 343 | return; |
| 344 | } |
| 345 | vtkFloatArray* boxInfo = vtkArrayDownCast<vtkFloatArray>(tempData); |
| 346 | |
| 347 | // Check to see whether we have to rebuild everything |
| 348 | if (this->UpdateWindowInfo(viewport) || this->CurrentViewPort != viewport || |
| 349 | this->GetMTime() > this->BuildTime || input->GetMTime() > this->BuildTime || |
| 350 | tprop->GetMTime() > this->BuildTime) |
| 351 | { |
| 352 | vtkDebugMacro(<< "Rebuilding labels"); |
| 353 | |
| 354 | // See if we have to recalculate fonts sizes |
| 355 | if (this->CurrentViewPort != viewport) |
| 356 | { |
| 357 | this->CurrentViewPort = viewport; |
| 358 | this->UpdateFontSizes(); |
| 359 | } |
| 360 | |
| 361 | // figure out what to label, and if we can label it |
| 362 | pointIdLabels = 0; |
| 363 | abstractData = nullptr; |
| 364 | numericData = nullptr; |
| 365 | stringData = nullptr; |
| 366 | switch (this->LabelMode) |
| 367 | { |
| 368 | case VTK_LABEL_IDS: |
nothing calls this directly
no test coverage detected