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

Method GetDeviceToWorldMatrixForDeviceHandle

Rendering/VR/vtkVRRenderWindow.cxx:356–372  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

354}
355
356bool vtkVRRenderWindow::GetDeviceToWorldMatrixForDeviceHandle(
357 uint32_t handle, vtkMatrix4x4* deviceToWorldMatrix)
358{
359 vtkMatrix4x4* deviceToPhysicalMatrix = this->GetDeviceToPhysicalMatrixForDeviceHandle(handle);
360
361 if (deviceToPhysicalMatrix)
362 {
363 // we use deviceToWorldMatrix here to temporarily store physicalToWorld
364 // to avoid having to use a temp matrix. We use a new pointer just to
365 // keep the code easier to read.
366 vtkMatrix4x4* physicalToWorldMatrix = deviceToWorldMatrix;
367 this->GetPhysicalToWorldMatrix(physicalToWorldMatrix);
368 vtkMatrix4x4::Multiply4x4(physicalToWorldMatrix, deviceToPhysicalMatrix, deviceToWorldMatrix);
369 return true;
370 }
371 return false;
372}
373
374//------------------------------------------------------------------------------
375int* vtkVRRenderWindow::GetScreenSize()

Callers 2

UpdateHMDMatrixPoseMethod · 0.80
UpdateHMDMatrixPoseMethod · 0.80

Tested by

no test coverage detected