------------------------------------------------------------------------------ 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
| 151 | // otherwise motion would be too frickin slow. |
| 152 | // |
| 153 | void 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. |
no test coverage detected