 |
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; }
111 void UpdateHMDMatrixPose();
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];
175 void InitializeViewFromCamera(
vtkCamera* cam);
186 virtual void SetPhysicalViewDirection(
double,
double,
double);
187 virtual void SetPhysicalViewDirection(
double[3]);
188 vtkGetVector3Macro(PhysicalViewDirection,
double);
200 virtual void SetPhysicalViewUp(
double,
double,
double);
201 virtual void SetPhysicalViewUp(
double[3]);
202 vtkGetVector3Macro(PhysicalViewUp,
double);
214 virtual void SetPhysicalTranslation(
double,
double,
double);
215 virtual void SetPhysicalTranslation(
double[3]);
216 vtkGetVector3Macro(PhysicalTranslation,
double);
229 virtual void SetPhysicalScale(
double);
230 vtkGetMacro(PhysicalScale,
double);
250 vtkSetMacro(TrackHMD,
bool);
251 vtkGetMacro(TrackHMD,
bool);
262 virtual void Start(
void);
415 bool CreateFrameBuffer(
int nWidth,
int nHeight,
FramebufferDesc& framebufferDesc);
418 std::string GetTrackedDeviceString(vr::IVRSystem* pHmd, vr::TrackedDeviceIndex_t unDevice,
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];
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)
virtual void DestroyWindow()
Destroy a not-off-screen window.
std::vector< vtkOpenVRModel * > VTKRenderModels
GLuint GetLeftResolveBufferId()
Get the frame buffers used for rendering.
vtkOpenGLRenderWindow * HelperWindow
virtual void StereoRenderComplete()
Handles work required once both views have been rendered when using stereo rendering.
void SetParentInfo(const char *)
virtual void SetPosition(int x, int y)
Set the position (x and y) of the rendering window in screen coordinates (in pixels).
vr::IVRRenderModels * GetOpenVRRenderModels()
Get the openVR Render Models.
vtkOpenVRModel * GetTrackedDeviceModel(vr::TrackedDeviceIndex_t idx)
void SetNextWindowInfo(const char *)
void GetTrackedDevicePose(vtkEventDataDevice idx, vr::TrackedDevicePose_t **pose)
Get the most recent pose corresponding to the tracked device.
virtual void * GetGenericParentId()
const char * ReportCapabilities()
Get report of capabilities for the render window.
vtkTransform * HMDTransform
vr::TrackedDeviceIndex_t GetTrackedDeviceIndexForDevice(vtkEventDataDevice dev)
Get the index corresponding to the tracked device.
window superclass for vtkRenderWindow
void SetWindowInfo(const char *)
void ReleaseGraphicsResources(vtkWindow *) override
Free up any graphics resources associated with this window a value of NULL means the context may alre...
vr::TrackedDevicePose_t & GetTrackedDevicePose(vr::TrackedDeviceIndex_t idx)
FramebufferDesc LeftEyeDesc
virtual void Finalize()
Finalize the rendering process.
void Render() override
Handle opengl specific code and calls superclass.
virtual void * GetGenericDrawable()
virtual void SetDisplayId(void *)
Dummy stubs for vtkWindow API.
virtual void * GetGenericContext()
void MakeCurrent() override
Attempt to make this window the current graphics context for the calling thread.
virtual vtkRenderWindowInteractor * MakeRenderWindowInteractor()
Create an interactor to control renderers in this window.
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
void SetPosition(int a[2]) override
virtual void * GetGenericDisplayId()
a virtual camera for 3D rendering
virtual vtkOpenGLState * GetState()
virtual int * GetScreenSize()
Get the current size of the screen 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()
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.
void SetSize(int width, int height) override
Set the size (width and height) of the rendering window in screen coordinates (in pixels).
virtual void SetNextWindowId(void *)
vr::IVRRenderModels * OpenVRRenderModels
vtkEventDataDevice
platform-independent event data structures
vtkOpenVROverlay * DashboardOverlay
virtual void CreateAWindow()
Create a not-off-screen window.
abstract specification for renderers
virtual int SupportsOpenGL()
Does this render window support OpenGL? 0-false, 1-true.
virtual void WindowRemap(void)
Remap the rendering window.
virtual void StereoUpdate()
Update the system, if needed, due to stereo rendering.
void SetSize(int a[2]) override
void Start(void) override
Begin the rendering process.
virtual bool IsCurrent()
Tells if this window is the current graphics context for the calling thread.
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...
vtkOpenVRModel * GetTrackedDeviceModel(vtkEventDataDevice idx)
Get the VRModel corresponding to the tracked device.
GLuint m_nResolveTextureId
virtual void Initialize(void)
Initialize the rendering window.
FramebufferDesc RightEyeDesc
GLuint m_nResolveFramebufferId