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];
125 height = this->Size[1];
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];
virtual void Finalize()=0
Finalize the rendering process.
int IsDirect()
Is this render window using hardware acceleration? 0-false, 1-true.
FramebufferDesc RightEyeDesc
GLuint m_nResolveFramebufferId
virtual void SetPosition(int a[2])
Set the position of the window.
represent and manipulate 4x4 transformation matrices
vr::TrackedDevicePose_t & GetTrackedDevicePose(vr::TrackedDeviceIndex_t idx)
virtual void * GetGenericParentId()
Dummy stubs for vtkWindow API.
void Render() override
Handle opengl specific code and calls superclass.
void StereoUpdate() override
Update the system, if needed, due to stereo rendering.
static vtkRenderWindow * New()
Construct an instance of vtkRenderWindow with its screen size set to 300x300, borders turned on...
virtual int * GetScreenSize()=0
Get the current size of the screen in pixels.
virtual void SetNextWindowId(void *)
Dummy stubs for vtkWindow API.
vr::IVRRenderModels * OpenVRRenderModels
virtual void SetDisplayId(void *)
Dummy stubs for vtkWindow API.
vtkOpenVROverlay * DashboardOverlay
vtkOpenVRModel * GetTrackedDeviceModel(vr::TrackedDeviceIndex_t idx)
GLuint m_nRenderFramebufferId
abstract specification for renderers
virtual int SupportsOpenGL()
Does this render window support OpenGL? 0-false, 1-true.
virtual void AddRenderer(vtkRenderer *)
Add a renderer to the list of renderers.
void GetRenderBufferSize(int &width, int &height)
Get the frame buffers used for rendering.
virtual void WindowRemap(void)
Remap the rendering window.
void SetWindowId(void *)
Dummy stubs for vtkWindow API.
void ShowCursor()
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_nRenderTextureId
double PhysicalScale
Scale of the Physical to World matrix.
void SetParentId(void *)
Dummy stubs for vtkWindow API.
vr::IVRRenderModels * GetOpenVRRenderModels()
Get the openVR Render Models.
virtual bool IsCurrent()=0
Tells if this window is the current graphics context for the calling thread.
virtual void CreateAWindow()
Create a not-off-screen window.
GLuint GetRightResolveBufferId()
Get the frame buffers used for rendering.
a simple class to control print indentation
virtual void DestroyWindow()=0
Destroy a not-off-screen window.
a virtual camera for 3D rendering
vtkTransform * HMDTransform
const char * ReportCapabilities()
Get report of capabilities for the render window.
vtkEventDataDevice
platform-independent event data structures
vtkOpenGLRenderWindow * HelperWindow
virtual void Frame()=0
A termination method performed at the end of the rendering process to do things like swapping buffers...
void SetParentInfo(const char *)
Dummy stubs for vtkWindow API.
void SetNextWindowInfo(const char *)
Dummy stubs for vtkWindow API.
virtual int GetEventPending()
Check to see if a mouse button has been pressed or mouse wheel activated.
void SetWindowInfo(const char *)
Dummy stubs for vtkWindow API.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void StereoRenderComplete()
Handles work required once both views have been rendered when using stereo rendering.
create a window for renderers to draw into
void SetSize(int a[2]) override
Set the size of the window in screen coordinates in pixels.
GLuint GetLeftRenderBufferId()
Get the frame buffers used for rendering.
virtual void SetFullScreen(vtkTypeBool)
Turn on/off rendering full screen window size.
virtual void Start()=0
Initialize the rendering process.
virtual void * GetGenericContext()
Dummy stubs for vtkWindow API.
virtual void * GetGenericDrawable()
Dummy stubs for vtkWindow API.
GLuint GetRightRenderBufferId()
Get the frame buffers used for rendering.
virtual void SetPosition(int, int)
Set/Get the position in screen coordinates of the rendering window.
GLuint GetLeftResolveBufferId()
Get the frame buffers used for rendering.
virtual vtkOpenGLState * GetState()
std::vector< vtkOpenVRModel * > VTKRenderModels
virtual void * GetGenericDisplayId()
Dummy stubs for vtkWindow API.
virtual void ReleaseGraphicsResources(vtkRenderWindow *)
Free up any graphics resources associated with this window a value of NULL means the context may alre...
virtual void Initialize(void)
Initialize the rendering window.
virtual void * GetGenericWindowId()
Dummy stubs for vtkWindow API.
FramebufferDesc LeftEyeDesc
virtual void SetSize(int a[2])
Set the size of the window in pixels.
void MakeCurrent() override=0
Attempt to make this window the current graphics context for the calling thread.
void StereoMidpoint() override
Intermediate method performs operations required between the rendering of the left and right eye...
vr::IVRSystem * GetHMD()
Get the system pointer.
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