Go to the documentation of this file.
39 #ifndef vtkOpenVRRenderWindow_h
40 #define vtkOpenVRRenderWindow_h
42 #include "vtkRenderingOpenVRModule.h"
67 vr::IVRSystem *
GetHMD() {
return this->HMD; };
85 void UpdateHMDMatrixPose();
92 {
return this->LeftEyeDesc.m_nRenderFramebufferId; };
94 {
return this->LeftEyeDesc.m_nResolveFramebufferId; };
96 {
return this->RightEyeDesc.m_nRenderFramebufferId; };
98 {
return this->RightEyeDesc.m_nResolveFramebufferId; };
101 width = this->Size[0];
111 return this->TrackedDeviceToRenderModel[idx]; };
117 return this->OpenVRRenderModels; };
129 return this->TrackedDevicePose[idx]; };
139 void InitializeViewFromCamera(
vtkCamera *cam);
147 vtkSetVector3Macro(PhysicalViewDirection,
double);
148 vtkSetVector3Macro(PhysicalViewUp,
double);
149 vtkGetVector3Macro(PhysicalViewDirection,
double);
150 vtkGetVector3Macro(PhysicalViewUp,
double);
151 vtkSetVector3Macro(PhysicalTranslation,
double);
152 vtkGetVector3Macro(PhysicalTranslation,
double);
153 vtkSetMacro(PhysicalScale,
double);
154 vtkGetMacro(PhysicalScale,
double);
162 vtkSetMacro(TrackHMD,
bool);
163 vtkGetMacro(TrackHMD,
bool);
174 virtual void Start(
void);
329 bool CreateFrameBuffer(
int nWidth,
int nHeight,
335 vr::TrackedDeviceIndex_t unDevice,
336 vr::TrackedDeviceProperty prop,
337 vr::TrackedPropertyError *peError =
nullptr );
345 vr::TrackedDevicePose_t TrackedDevicePose[ vr::k_unMaxTrackedDeviceCount ];
349 double PhysicalViewDirection[3];
350 double PhysicalViewUp[3];
351 double PhysicalTranslation[3];
void StereoMidpoint() override
Intermediate method performs operations required between the rendering of the left and right eye.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void GetRenderBufferSize(int &width, int &height)
void SetSize(int a[2]) override
Set the size of the window in screen coordinates in pixels.
virtual void Start()=0
Initialize the rendering process.
GLuint GetLeftResolveBufferId()
vtkOpenGLRenderWindow * HelperWindow
virtual void StereoRenderComplete()
Handles work required once both views have been rendered when using stereo rendering.
void SetParentInfo(const char *)
vr::IVRRenderModels * GetOpenVRRenderModels()
Get the openVR Render Models.
vtkOpenVRModel * GetTrackedDeviceModel(vr::TrackedDeviceIndex_t idx)
void SetNextWindowInfo(const char *)
virtual void * GetGenericParentId()
GLuint m_nRenderFramebufferId
const char * ReportCapabilities()
Get report of capabilities for the render window.
vtkTransform * HMDTransform
virtual void Finalize()=0
Finalize the rendering process.
virtual int * GetScreenSize()=0
Get the current size of the screen in pixels.
virtual bool IsCurrent()=0
Tells if this window is the current graphics context for the calling thread.
GLuint m_nRenderTextureId
std::vector< vtkOpenVRModel * > VTKRenderModels
void SetWindowInfo(const char *)
vr::TrackedDevicePose_t & GetTrackedDevicePose(vr::TrackedDeviceIndex_t idx)
virtual void SetSize(int a[2])
Set the size of the window in screen coordinates in pixels.
FramebufferDesc LeftEyeDesc
void Render() override
Handle opengl specific code and calls superclass.
virtual void * GetGenericDrawable()
GLuint GetRightRenderBufferId()
GLuint GetLeftRenderBufferId()
Get the frame buffers used for rendering.
virtual void SetDisplayId(void *)
Dummy stubs for vtkWindow API.
virtual void * GetGenericContext()
int IsDirect()
Is this render window using hardware acceleration? 0-false, 1-true.
GLuint GetRightResolveBufferId()
virtual void AddRenderer(vtkRenderer *)
Add a renderer to the list of renderers.
a simple class to control print indentation
virtual void * GetGenericDisplayId()
a virtual camera for 3D rendering
virtual void SetPosition(int a[2])
virtual vtkOpenGLState * GetState()
void MakeCurrent() override=0
Attempt to make this window the current graphics context for the calling thread.
virtual void SetFullScreen(int)
Turn on/off rendering full screen window size.
virtual void * GetGenericWindowId()
vr::IVRSystem * GetHMD()
Get the system pointer.
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 int GetEventPending()
Check to see if a mouse button has been pressed or mouse wheel activated.
abstract specification for renderers
virtual int SupportsOpenGL()
Does this render window support OpenGL? 0-false, 1-true.
virtual void ReleaseGraphicsResources(vtkRenderWindow *)
Free up any graphics resources associated with this window a value of NULL means the context may alre...
virtual void DestroyWindow()=0
Destroy a not-off-screen window.
virtual void WindowRemap(void)
Remap the rendering window.
create a window for renderers to draw into
virtual void SetPosition(int, int)
void StereoUpdate() override
Update the system, if needed, due to stereo rendering.
virtual void Frame()=0
A termination method performed at the end of the rendering process to do things like swapping buffers...
static vtkRenderWindow * New()
Construct an instance of vtkRenderWindow with its screen size set to 300x300, borders turned on,...
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...
GLuint m_nResolveTextureId
virtual void Initialize(void)
Initialize the rendering window.
FramebufferDesc RightEyeDesc
GLuint m_nResolveFramebufferId