------------------------------------------------------------------------------
| 336 | |
| 337 | //------------------------------------------------------------------------------ |
| 338 | bool vtkVRRenderWindow::GetDeviceToWorldMatrixForDevice( |
| 339 | vtkEventDataDevice device, vtkMatrix4x4* deviceToWorldMatrix) |
| 340 | { |
| 341 | vtkMatrix4x4* deviceToPhysicalMatrix = this->GetDeviceToPhysicalMatrixForDevice(device); |
| 342 | |
| 343 | if (deviceToPhysicalMatrix) |
| 344 | { |
| 345 | // we use deviceToWorldMatrix here to temporarily store physicalToWorld |
| 346 | // to avoid having to use a temp matrix. We use a new pointer just to |
| 347 | // keep the code easier to read. |
| 348 | vtkMatrix4x4* physicalToWorldMatrix = deviceToWorldMatrix; |
| 349 | this->GetPhysicalToWorldMatrix(physicalToWorldMatrix); |
| 350 | vtkMatrix4x4::Multiply4x4(physicalToWorldMatrix, deviceToPhysicalMatrix, deviceToWorldMatrix); |
| 351 | return true; |
| 352 | } |
| 353 | return false; |
| 354 | } |
| 355 | |
| 356 | bool vtkVRRenderWindow::GetDeviceToWorldMatrixForDeviceHandle( |
| 357 | uint32_t handle, vtkMatrix4x4* deviceToWorldMatrix) |
no test coverage detected