------------------------------------------------------------------------------
| 227 | |
| 228 | //------------------------------------------------------------------------------ |
| 229 | void vtkScenePicker::Update(int displayPos[2]) |
| 230 | { |
| 231 | if (this->PickRenderTime <= this->GetMTime()) |
| 232 | { |
| 233 | this->PickRender(); |
| 234 | } |
| 235 | |
| 236 | if (this->NeedToUpdate || this->LastQueriedDisplayPos[0] != displayPos[0] || |
| 237 | this->LastQueriedDisplayPos[1] != displayPos[1]) |
| 238 | { |
| 239 | this->Prop = nullptr; |
| 240 | unsigned int dpos[2] = { 0, 0 }; |
| 241 | if (displayPos[0] >= 0 && displayPos[1] >= 0) |
| 242 | { |
| 243 | dpos[0] = static_cast<unsigned int>(displayPos[0]); |
| 244 | dpos[1] = static_cast<unsigned int>(displayPos[1]); |
| 245 | vtkHardwareSelector::PixelInformation info = this->Selector->GetPixelInformation(dpos); |
| 246 | this->CellId = info.AttributeID; |
| 247 | this->Prop = info.Prop; |
| 248 | } |
| 249 | this->LastQueriedDisplayPos[0] = displayPos[0]; |
| 250 | this->LastQueriedDisplayPos[1] = displayPos[1]; |
| 251 | this->NeedToUpdate = false; |
| 252 | } |
| 253 | } |
| 254 | |
| 255 | //------------------------------------------------------------------------------ |
| 256 | void vtkScenePicker::PrintSelf(ostream& os, vtkIndent indent) |
no test coverage detected