35 #ifndef vtkOpenVRRenderWindow_h
36 #define vtkOpenVRRenderWindow_h
40 #include "vtkRenderingOpenVRModule.h"
46 VTK_ABI_NAMESPACE_BEGIN
59 static bool IsHMDPresent();
76 vr::IVRSystem*
GetHMD() {
return this->HMD; }
104 void RenderOverlay();
121 void SetMatrixFromOpenVRPose(
vtkMatrix4x4* result,
const vr::TrackedDevicePose_t& vrPose);
133 uint32_t GetDeviceHandleForOpenVRHandle(vr::TrackedDeviceIndex_t
index);
144 this->GetOpenVRPose(dev, 0, pose);
158 bool CreateOneFramebuffer(
int nWidth,
int nHeight, FramebufferDesc& framebufferDesc);
163 std::string GetTrackedDeviceString(vr::IVRSystem* pHmd, vr::TrackedDeviceIndex_t unDevice,
164 vr::TrackedDeviceProperty prop, vr::TrackedPropertyError* peError =
nullptr);
172 vr::IVRSystem* HMD =
nullptr;
173 vr::IVRRenderModels* OpenVRRenderModels =
nullptr;
174 vr::TrackedDevicePose_t OpenVRTrackedDevicePoses[vr::k_unMaxTrackedDeviceCount];
181 VTK_ABI_NAMESPACE_END
vtkSmartPointer< vtkOpenVROverlay > DashboardOverlay
virtual void RenderFramebuffer(FramebufferDesc &framebufferDesc)=0
represent and manipulate 4x4 transformation matrices
virtual void RenderModels()=0
Render the controller and base station models.
vtkRenderWindowInteractor * MakeRenderWindowInteractor() override=0
Create an interactor to control renderers in this window.
virtual void Finalize()
Finalize the rendering process.
virtual bool CreateFramebuffers(uint32_t viewCount=2)=0
void GetOpenVRPose(vtkEventDataDevice dev, vr::TrackedDevicePose_t **pose)
Get the most recent OpenVR pose for a given device.
platform-independent render window interaction including picking and frame rate control.
vr::IVRRenderModels * GetOpenVRRenderModels()
Get the openVR Render Models.
static vtkOpenGLRenderWindow * New()
virtual std::string GetWindowTitleFromAPI()
void Initialize() override
Initialize the rendering window.
vtkEventDataDevice
platform-independent event data structures
virtual bool GetSizeFromAPI()=0
Attempt to get the size of the display from the API and store it in this->Size.
void Render() override
Overridden to not release resources that would interfere with an external application's rendering...
virtual void StereoRenderComplete()
Handles work required once both views have been rendered when using stereo rendering.
virtual void UpdateHMDMatrixPose()
Update the HMD pose.
void StereoMidpoint() override
Intermediate method performs operations required between the rendering of the left and right eye...
vr::IVRSystem * GetHMD()
Get the system pointer.