Go to the documentation of this file.
54 #ifndef vtkOpenVRRenderWindow_h
55 #define vtkOpenVRRenderWindow_h
57 #include "vtkRenderingOpenVRModule.h"
88 vr::IVRSystem *
GetHMD() {
return this->HMD; };
108 void UpdateHMDMatrixPose();
115 {
return this->LeftEyeDesc.m_nRenderFramebufferId; };
117 {
return this->LeftEyeDesc.m_nResolveFramebufferId; };
119 {
return this->RightEyeDesc.m_nRenderFramebufferId; };
121 {
return this->RightEyeDesc.m_nResolveFramebufferId; };
124 width = this->Size[0];
134 return this->TrackedDeviceToRenderModel[idx]; };
140 return this->OpenVRRenderModels; };
152 return this->TrackedDevicePose[idx]; };
162 void InitializeViewFromCamera(
vtkCamera *cam);
173 virtual void SetPhysicalViewDirection(
double,
double,
double);
174 virtual void SetPhysicalViewDirection(
double[3]);
175 vtkGetVector3Macro(PhysicalViewDirection,
double);
187 virtual void SetPhysicalViewUp(
double,
double,
double);
188 virtual void SetPhysicalViewUp(
double[3]);
189 vtkGetVector3Macro(PhysicalViewUp,
double);
201 virtual void SetPhysicalTranslation(
double,
double,
double);
202 virtual void SetPhysicalTranslation(
double[3]);
203 vtkGetVector3Macro(PhysicalTranslation,
double);
216 virtual void SetPhysicalScale(
double);
217 vtkGetMacro(PhysicalScale,
double);
237 vtkSetMacro(TrackHMD,
bool);
238 vtkGetMacro(TrackHMD,
bool);
249 virtual void Start(
void);
404 bool CreateFrameBuffer(
int nWidth,
int nHeight,
410 vr::TrackedDeviceIndex_t unDevice,
411 vr::TrackedDeviceProperty prop,
412 vr::TrackedPropertyError *peError =
nullptr );
420 vr::TrackedDevicePose_t TrackedDevicePose[ vr::k_unMaxTrackedDeviceCount ];
425 double PhysicalViewDirection[3];
427 double PhysicalViewUp[3];
429 double PhysicalTranslation[3];
void StereoMidpoint() override
Intermediate method performs operations required between the rendering of the left and right eye.
virtual void SetFullScreen(vtkTypeBool)
Turn on/off rendering full screen window size.
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
represent and manipulate 4x4 transformation matrices
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 * GetGenericWindowId()
double PhysicalScale
Scale of the Physical to World matrix.
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