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

Method SetRenderer

Views/Core/vtkRenderViewBase.cxx:38–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38void vtkRenderViewBase::SetRenderer(vtkRenderer* newren)
39{
40 vtkRendererCollection* rens = this->RenderWindow->GetRenderers();
41 vtkCollectionSimpleIterator cookie;
42 rens->InitTraversal(cookie);
43 while (vtkRenderer* ren = rens->GetNextRenderer(cookie))
44 {
45 if (ren->GetLayer() < 2)
46 {
47 ren->SetRenderWindow(nullptr);
48 this->RenderWindow->RemoveRenderer(ren);
49 }
50 }
51
52 this->RenderWindow->AddRenderer(newren);
53 this->Renderer = newren;
54}
55
56vtkRenderWindow* vtkRenderViewBase::GetRenderWindow()
57{

Callers 15

TestChartsOn3DFunction · 0.45
TestBarGraphShiftScaleFunction · 0.45
TestMultipleRenderersFunction · 0.45
vtkContextViewMethod · 0.45
AddToViewMethod · 0.45
RemoveFromViewMethod · 0.45
vtkRenderViewMethod · 0.45
PrepareForRenderingMethod · 0.45
OnMouseMoveMethod · 0.45

Calls 6

GetRenderersMethod · 0.80
GetLayerMethod · 0.80
InitTraversalMethod · 0.45
SetRenderWindowMethod · 0.45
RemoveRendererMethod · 0.45
AddRendererMethod · 0.45

Tested by 9

TestChartsOn3DFunction · 0.36
TestBarGraphShiftScaleFunction · 0.36
TestMultipleRenderersFunction · 0.36
TestHeatmapItemFunction · 0.36
TestTanglegramItemFunction · 0.36
TestTreeHeatmapItemFunction · 0.36