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

Method PickRender

Rendering/Core/vtkScenePicker.cxx:153–171  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Do a selection render.. for caching object selection stuff. This is used for Object selection . We have to perform "select" and "mouse over" and "mouse out" as the mouse moves around the scene (or the mouse is clicked in the case of "select"). I do not want to do a conventional pick for this function because it's too da

Source from the content-addressed store, hash-verified

151// otherwise motion would be too frickin slow.
152//
153void vtkScenePicker::PickRender()
154{
155 if (!this->Renderer || !this->Renderer->GetRenderWindow())
156 {
157 return;
158 }
159
160 double vp[4];
161 this->Renderer->GetViewport(vp);
162 int size[2] = { this->Renderer->GetRenderWindow()->GetSize()[0],
163 this->Renderer->GetRenderWindow()->GetSize()[1] };
164
165 int rx1 = static_cast<int>(vp[0] * (size[0] - 1));
166 int ry1 = static_cast<int>(vp[1] * (size[1] - 1));
167 int rx2 = static_cast<int>(vp[2] * (size[0] - 1));
168 int ry2 = static_cast<int>(vp[3] * (size[1] - 1));
169
170 this->PickRender(rx1, ry1, rx2, ry2);
171}
172
173//------------------------------------------------------------------------------
174// Do a selection render.. for caching object selection stuff.

Callers 2

UpdateMethod · 0.95
ExecuteFunction · 0.80

Calls 7

GetViewportMethod · 0.80
GetRenderWindowMethod · 0.45
GetSizeMethod · 0.45
RemoveObserverMethod · 0.45
CaptureBuffersMethod · 0.45
ModifiedMethod · 0.45
AddObserverMethod · 0.45

Tested by

no test coverage detected