 |
VTK
9.1.0
|
Go to the documentation of this file.
140 #ifndef vtkOpenVRRenderWindow_h
141 #define vtkOpenVRRenderWindow_h
143 #include "vtkRenderingOpenVRModule.h"
148 #include "vtk_glew.h"
172 vr::IVRSystem*
GetHMD() {
return this->HMD; }
213 vtkGetMacro(BaseStationVisibility,
bool);
214 vtkSetMacro(BaseStationVisibility,
bool);
215 vtkBooleanMacro(BaseStationVisibility,
bool);
247 return this->GetTrackedDeviceIndexForDevice(dev, 0);
257 return this->GetTrackedDevicePose(idx, 0);
262 return this->TrackedDevicePose[idx];
295 vr::TrackedDeviceProperty prop, vr::TrackedPropertyError* peError =
nullptr);
301 vr::TrackedDevicePose_t TrackedDevicePose[vr::k_unMaxTrackedDeviceCount];
void UpdateHMDMatrixPose() override
Update the HMD pose based on hardware pose and physical to world transform.
vr::IVRRenderModels * GetOpenVRRenderModels()
Get the openVR Render Models.
~vtkOpenVRRenderWindow() override
vtkEventDataDevice GetDeviceFromDeviceIndex(vr::TrackedDeviceIndex_t index)
Get the EventDataDevice corresponding to the OpenVR index.
vr::TrackedDeviceIndex_t GetTrackedDeviceIndexForDevice(vtkEventDataDevice dev)
Get the index corresponding to the tracked device.
void Initialize(void) override
Initialize the rendering window.
window superclass for vtkRenderWindow
void StereoMidpoint() override
Intermediate method performs operations required between the rendering of the left and right eye.
vr::TrackedDevicePose_t * GetTrackedDevicePose(vtkEventDataDevice idx, uint32_t index)
void SetDashboardOverlay(vtkOpenVROverlay *)
void RenderOverlay()
Draw the overlay.
std::string GetTrackedDeviceString(vr::IVRSystem *pHmd, vr::TrackedDeviceIndex_t unDevice, vr::TrackedDeviceProperty prop, vr::TrackedPropertyError *peError=nullptr)
vr::TrackedDevicePose_t & GetTrackedDevicePose(vr::TrackedDeviceIndex_t idx)
bool CreateOneFramebuffer(int nWidth, int nHeight, FramebufferDesc &framebufferDesc)
vtkVRModel * GetTrackedDeviceModel(vtkEventDataDevice idx)
Get the VRModel corresponding to the tracked device.
void Render() override
Overridden to not release resources that would interfere with an external application's rendering.
represent and manipulate 4x4 transformation matrices
a virtual camera for 3D rendering
void ConvertOpenVRPoseToMatrices(const vr::TrackedDevicePose_t &tdPose, vtkMatrix4x4 *poseMatrixWorld, vtkMatrix4x4 *poseMatrixPhysical=nullptr)
uint32_t GetNumberOfTrackedDevicesForDevice(vtkEventDataDevice dev)
vr::TrackedDevicePose_t * GetTrackedDevicePose(vtkEventDataDevice idx)
Get the most recent pose corresponding to the tracked device.
platform-independent render window interaction including picking and frame rate control.
vtkRenderWindowInteractor * MakeRenderWindowInteractor() override
Create an interactor to control renderers in this window.
vr::IVRSystem * GetHMD()
Get the system pointer.
vr::TrackedDeviceIndex_t GetTrackedDeviceIndexForDevice(vtkEventDataDevice dev, uint32_t index)
vtkOpenVRModel * FindOrLoadRenderModel(const char *modelName)
vr::IVRRenderModels * OpenVRRenderModels
vtkEventDataDevice
platform-independent event data structures
vtkOpenVROverlay * DashboardOverlay
static vtkOpenVRRenderWindow * New()
std::string GetWindowTitleFromAPI() override
bool BaseStationVisibility
void ReleaseGraphicsResources(vtkWindow *renWin) override
Free up any graphics resources associated with this window a value of NULL means the context may alre...
void StereoRenderComplete() override
Handles work required once both views have been rendered when using stereo rendering.
bool GetSizeFromAPI() override
Attempt to get the size of the display from the API and store it in this->Size.
void RenderModels() override
Render the controller and base station models.
bool GetPoseMatrixWorldFromDevice(vtkEventDataDevice device, vtkMatrix4x4 *poseMatrixWorld) override
Store in poseMatrixWorld the pose matrix in world coordinate from an event data device.
vtkVRModel * GetTrackedDeviceModel(vtkEventDataDevice idx, uint32_t index) override
Get the VRModel corresponding to the tracked device.
bool CreateFramebuffers() override
static bool IsHMDPresent()