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

Method HasTranslucentPolygonalGeometry

Rendering/Core/vtkCompositePolyDataMapper.cxx:258–302  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

256
257//------------------------------------------------------------------------------
258bool 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//------------------------------------------------------------------------------
305void vtkCompositePolyDataMapper::Render(vtkRenderer* renderer, vtkActor* actor)

Callers

nothing calls this directly

Calls 11

InvokeEventMethod · 0.80
GetInputDataObjectMethod · 0.80
GetInputAlgorithmMethod · 0.45
UpdateMethod · 0.45
GetLookupTableMethod · 0.45
ClearMethod · 0.45
AppendMethod · 0.45
GetMTimeMethod · 0.45
BuildMethod · 0.45

Tested by

no test coverage detected