35#ifndef vtkOpenVRRenderWindow_h
36#define vtkOpenVRRenderWindow_h
40#include "vtkRenderingOpenVRModule.h"
46VTK_ABI_NAMESPACE_BEGIN
76 vr::IVRSystem*
GetHMD() {
return this->HMD; }
151 vr::TrackedDeviceProperty prop, vr::TrackedPropertyError* peError =
nullptr);
159 vr::IVRSystem* HMD =
nullptr;
160 vr::IVRRenderModels* OpenVRRenderModels =
nullptr;
represent and manipulate 4x4 transformation matrices
vtkEventDataDevice GetDeviceForOpenVRHandle(vr::TrackedDeviceIndex_t ohandle)
bool GetSizeFromAPI() override
Attempt to get the size of the display from the API and store it in this->Size.
void UpdateHMDMatrixPose() override
Update the HMD pose based on hardware pose and physical to world transform.
vr::IVRSystem * GetHMD()
Get the system pointer.
static vtkOpenVRRenderWindow * New()
void RenderFramebuffer(FramebufferDesc &framebufferDesc) override
vtkRenderWindowInteractor * MakeRenderWindowInteractor() override
Create an interactor specific to OpenVR to control renderers in this window.
void RenderModels() override
Render the controller and base station models.
vr::IVRRenderModels * GetOpenVRRenderModels()
Get the openVR Render Models.
uint32_t GetDeviceHandleForOpenVRHandle(vr::TrackedDeviceIndex_t index)
std::string GetWindowTitleFromAPI() override
vtkOpenVRModel * FindOrLoadRenderModel(const char *modelName)
Find a render model that has already been loaded or load a new one.
bool CreateOneFramebuffer(int nWidth, int nHeight, FramebufferDesc &framebufferDesc)
~vtkOpenVRRenderWindow() override
bool CreateFramebuffers(uint32_t viewCount=2) override
void StereoRenderComplete() override
Handles work required once both views have been rendered when using stereo rendering.
void SetMatrixFromOpenVRPose(vtkMatrix4x4 *result, const vr::TrackedDevicePose_t &vrPose)
Convert an OpenVR pose struct to a vtkMatrix4x4 object.
void RenderOverlay()
Draw the overlay.
void Finalize() override
Finalize the rendering window.
vtkSmartPointer< vtkOpenVROverlay > DashboardOverlay
void StereoMidpoint() override
Intermediate method performs operations required between the rendering of the left and right eye.
vtkGetSmartPointerMacro(DashboardOverlay, vtkOpenVROverlay)
void Initialize() override
Initialize the rendering window.
std::string GetTrackedDeviceString(vr::IVRSystem *pHmd, vr::TrackedDeviceIndex_t unDevice, vr::TrackedDeviceProperty prop, vr::TrackedPropertyError *peError=nullptr)
Convert a device index to a human-readable string.
void Render() override
Overridden to not release resources that would interfere with an external application's rendering.
static bool IsHMDPresent()
Returns true if the system believes that an HMD is present on the system.
platform-independent render window interaction including picking and frame rate control.
Hold a reference to a vtkObjectBase instance.
vtkEventDataDevice
platform-independent event data structures