------------------------------------------------------------------------------
| 256 | |
| 257 | //------------------------------------------------------------------------------ |
| 258 | bool vtkCompositePolyDataMapper::HasTranslucentPolygonalGeometry() |
| 259 | { |
| 260 | // Make sure that we have been properly initialized. |
| 261 | if (this->GetInputAlgorithm() == nullptr) |
| 262 | { |
| 263 | return false; |
| 264 | } |
| 265 | |
| 266 | if (!this->Static) |
| 267 | { |
| 268 | this->InvokeEvent(vtkCommand::StartEvent, nullptr); |
| 269 | this->GetInputAlgorithm()->Update(); |
| 270 | this->InvokeEvent(vtkCommand::EndEvent, nullptr); |
| 271 | } |
| 272 | |
| 273 | auto input = this->GetInputDataObject(0, 0); |
| 274 | if (input == nullptr) |
| 275 | { |
| 276 | return false; |
| 277 | } |
| 278 | |
| 279 | // rebuild the render values if needed |
| 280 | vtkCompositeDataDisplayAttributes* cda = this->GetCompositeDataDisplayAttributes(); |
| 281 | vtkScalarsToColors* lut = this->ScalarVisibility ? this->GetLookupTable() : nullptr; |
| 282 | |
| 283 | this->TempState.Clear(); |
| 284 | this->TempState.Append(cda ? cda->GetMTime() : 0, "cda mtime"); |
| 285 | this->TempState.Append(lut ? lut->GetMTime() : 0, "lut mtime"); |
| 286 | this->TempState.Append(input->GetMTime(), "input mtime"); |
| 287 | if (this->TranslucentState != this->TempState) |
| 288 | { |
| 289 | this->TranslucentState = this->TempState; |
| 290 | if (lut) |
| 291 | { |
| 292 | // Ensure that the lookup table is built |
| 293 | lut->Build(); |
| 294 | } |
| 295 | |
| 296 | // Push base-values on the state stack. |
| 297 | unsigned int flat_index = 0; |
| 298 | this->HasTranslucentGeometry = this->RecursiveHasTranslucentGeometry(input, flat_index); |
| 299 | } |
| 300 | |
| 301 | return this->HasTranslucentGeometry; |
| 302 | } |
| 303 | |
| 304 | //------------------------------------------------------------------------------ |
| 305 | void vtkCompositePolyDataMapper::Render(vtkRenderer* renderer, vtkActor* actor) |
nothing calls this directly
no test coverage detected