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

Method GetDeviceToWorldMatrixForDevice

Rendering/VR/vtkVRRenderWindow.cxx:338–354  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

336
337//------------------------------------------------------------------------------
338bool 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
356bool vtkVRRenderWindow::GetDeviceToWorldMatrixForDeviceHandle(
357 uint32_t handle, vtkMatrix4x4* deviceToWorldMatrix)

Callers 1

ComputeMatrixMethod · 0.45

Tested by

no test coverage detected