 |
VTK
9.0.1
|
Go to the documentation of this file.
51 #ifndef vtkOpenVRRenderWindow_h
52 #define vtkOpenVRRenderWindow_h
55 #include "vtkRenderingOpenVRModule.h"
85 vr::IVRSystem*
GetHMD() {
return this->HMD; }
121 width = this->Size[0];
131 return this->GetTrackedDeviceModel(idx, 0);
135 return this->TrackedDeviceToRenderModel[idx];
149 return this->GetTrackedDeviceIndexForDevice(dev, 0);
159 return this->GetTrackedDevicePose(idx, 0, pose);
164 return this->TrackedDevicePose[idx];
188 vtkGetVector3Macro(PhysicalViewDirection,
double);
202 vtkGetVector3Macro(PhysicalViewUp,
double);
216 vtkGetVector3Macro(PhysicalTranslation,
double);
230 vtkGetMacro(PhysicalScale,
double);
250 vtkSetMacro(TrackHMD,
bool);
251 vtkGetMacro(TrackHMD,
bool);
419 vr::TrackedDeviceProperty prop, vr::TrackedPropertyError* peError =
nullptr);
427 vr::TrackedDevicePose_t TrackedDevicePose[vr::k_unMaxTrackedDeviceCount];
432 double PhysicalViewDirection[3];
434 double PhysicalViewUp[3];
436 double PhysicalTranslation[3];
virtual void Finalize(void)
Finalize the rendering window.
virtual void SetFullScreen(vtkTypeBool)
Turn on/off rendering full screen window size.
virtual void SetPhysicalViewUp(double, double, double)
Set/get physical coordinate system in world coordinate system.
void GetRenderBufferSize(int &width, int &height)
virtual void StereoRenderComplete()
Handles work required once both views have been rendered when using stereo rendering.
virtual void DestroyWindow()
Destroy a not-off-screen window.
std::vector< vtkOpenVRModel * > VTKRenderModels
virtual void StereoUpdate()
Update the system, if needed, due to stereo rendering.
GLuint GetLeftResolveBufferId()
Get the frame buffers used for rendering.
vtkOpenGLRenderWindow * HelperWindow
void SetParentInfo(const char *)
vr::IVRRenderModels * GetOpenVRRenderModels()
Get the openVR Render Models.
virtual void Initialize(void)
Initialize the rendering window.
vtkOpenVRModel * GetTrackedDeviceModel(vr::TrackedDeviceIndex_t idx)
void SetNextWindowInfo(const char *)
void MakeCurrent()
Make this windows OpenGL context the current context.
void GetTrackedDevicePose(vtkEventDataDevice idx, vr::TrackedDevicePose_t **pose)
Get the most recent pose corresponding to the tracked device.
~vtkOpenVRRenderWindow() override
virtual void * GetGenericParentId()
virtual void SetPhysicalViewUp(double[3])
void GetPhysicalToWorldMatrix(vtkMatrix4x4 *matrix)
Get physical to world transform matrix.
const char * ReportCapabilities()
Get report of capabilities for the render window.
virtual bool IsCurrent()
Tells if this window is the current OpenGL context for the calling thread.
vtkTransform * HMDTransform
virtual void SetPhysicalScale(double)
Set/get physical coordinate system in world coordinate system.
vr::TrackedDeviceIndex_t GetTrackedDeviceIndexForDevice(vtkEventDataDevice dev)
Get the index corresponding to the tracked device.
void SetPhysicalToWorldMatrix(vtkMatrix4x4 *matrix)
Set physical to world transform matrix.
void SetPosition(int x, int y) override
Set the position (x and y) of the rendering window in screen coordinates (in pixels).
window superclass for vtkRenderWindow
virtual void SetPhysicalTranslation(double[3])
virtual void Start(void)
Begin the rendering process.
void SetDashboardOverlay(vtkOpenVROverlay *)
bool CreateFrameBuffer(int nWidth, int nHeight, FramebufferDesc &framebufferDesc)
void RenderOverlay()
Draw the overlay.
void SetWindowInfo(const char *)
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)
FramebufferDesc LeftEyeDesc
void GetTrackedDevicePose(vtkEventDataDevice idx, uint32_t index, vr::TrackedDevicePose_t **pose)
virtual void * GetGenericDrawable()
void Render()
Overridden to not release resources that would interfere with an external application's rendering.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual void SetDisplayId(void *)
Dummy stubs for vtkWindow API.
virtual void * GetGenericContext()
virtual void SetPhysicalTranslation(double, double, double)
Set/get physical coordinate system in world coordinate system.
GLuint GetRightResolveBufferId()
a simple class to control print indentation
represent and manipulate 4x4 transformation matrices
void SetPosition(int a[2]) override
virtual void * GetGenericDisplayId()
a virtual camera for 3D rendering
void SetHelperWindow(vtkOpenGLRenderWindow *val)
uint32_t GetNumberOfTrackedDevicesForDevice(vtkEventDataDevice dev)
void SetSize(int width, int height) override
Set the size of the window in screen coordinates in pixels.
vtkTypeBool IsDirect()
Is this render window using hardware acceleration? 0-false, 1-true.
platform-independent render window interaction including picking and frame rate control.
virtual void * GetGenericWindowId()
vtkRenderWindowInteractor * MakeRenderWindowInteractor() override
Create an interactor to control renderers in this window.
double PhysicalScale
Scale of the Physical to World matrix.
vr::IVRSystem * GetHMD()
Get the system pointer.
virtual vtkTypeBool GetEventPending()
Check to see if a mouse button has been pressed or mouse wheel activated.
vr::TrackedDeviceIndex_t GetTrackedDeviceIndexForDevice(vtkEventDataDevice dev, uint32_t index)
vtkOpenVRModel * FindOrLoadRenderModel(const char *modelName)
virtual void SetNextWindowId(void *)
vr::IVRRenderModels * OpenVRRenderModels
vtkEventDataDevice
platform-independent event data structures
vtkOpenVROverlay * DashboardOverlay
virtual void CreateAWindow()
Create a not-off-screen window.
virtual void StereoMidpoint()
Intermediate method performs operations required between the rendering of the left and right eye.
virtual void AddRenderer(vtkRenderer *) override
Add a renderer to the list of renderers.
static vtkOpenVRRenderWindow * New()
abstract specification for renderers
virtual int SupportsOpenGL()
Does this render window support OpenGL? 0-false, 1-true.
vtkOpenVRModel * GetTrackedDeviceModel(vtkEventDataDevice idx, uint32_t index)
void ReleaseGraphicsResources(vtkWindow *) override
Free up any graphics resources associated with this window a value of nullptr means the context may a...
virtual void WindowRemap(void)
Remap the rendering window.
void InitializeViewFromCamera(vtkCamera *cam)
Initialize the HMD to World setting and camera settings so that the VR world view most closely matche...
void SetSize(int a[2]) override
virtual void SetPhysicalViewDirection(double[3])
void UpdateHMDMatrixPose()
Update the HMD pose based on hardware pose and physical to world transform.
virtual int * GetScreenSize()
Get the current size of the screen in pixels.
vtkOpenGLState * GetState() override
void HideCursor()
Hide or Show the mouse cursor, it is nice to be able to hide the default cursor if you want VTK to di...
vtkOpenVRModel * GetTrackedDeviceModel(vtkEventDataDevice idx)
Get the VRModel corresponding to the tracked device.
GLuint m_nResolveTextureId
FramebufferDesc RightEyeDesc
virtual void SetPhysicalViewDirection(double, double, double)
Set/get physical coordinate system in world coordinate system.
GLuint m_nResolveFramebufferId