Skip to content

Rendering: Update camera and render window to support physical/world coords

This change adds initial support for 3D coordinate systems to VTK in general. Previously this only existed for HMD rendering modules.

  • Add basic PhysicalToWorldMatrix functionality to vtkRenderWindow. The API for getting the PhysicalToWorldMatrix was already defined in this class, but until now has only been implemented in vtkVRRenderWindow, for use in headset rendering modules (Rendering/OpenVR and Rendering/OpenXR). This change introduces a setter into the api for PhysicalToWorldMatrix.

  • Update vtkOpenGLCamera to get the PhysicalToWorldMatrix from the render window associated with its renderer, invert it, and multiply the view transform by the result.

  • Add a python test exercising 3D coordinate systems, and also demonstrate some kind of real use in a custome interactor style.

  • Update the Rendering/OpenXR test to exercise 3D coordinates, similar to OpenVR version. For the sake of sanity when testing, also use the same colors in both OpenVR and OpenXR for items in the different coordinate sytems

Accompanying ParaView MR here.

Edited by Scott Wittenburg

Merge request reports