36#ifndef vtkVRRenderWindow_h
37#define vtkVRRenderWindow_h
42#include "vtkRenderingVRModule.h"
84 width = this->Size[0];
94 return this->GetTrackedDeviceModel(idx, 0);
120 vtkGetVector3Macro(PhysicalViewDirection,
double);
134 vtkGetVector3Macro(PhysicalViewUp,
double);
148 vtkGetVector3Macro(PhysicalTranslation,
double);
162 vtkGetMacro(PhysicalScale,
double);
251 return (
void*)this->HelperWindow->GetGenericDisplayId();
255 return (
void*)this->HelperWindow->GetGenericWindowId();
260 return (
void*)this->HelperWindow->GetGenericContext();
264 return (
void*)this->HelperWindow->GetGenericDrawable();
312 vtkSetMacro(TrackHMD,
bool);
313 vtkGetMacro(TrackHMD,
bool);
336 GLuint ResolveFramebufferId = 0;
337 GLuint ResolveColorTextureId = 0;
338 GLuint ResolveDepthTextureId = 0;
357 double PhysicalViewDirection[3];
359 double PhysicalViewUp[3];
361 double PhysicalTranslation[3];
a virtual camera for 3D rendering
a simple class to control print indentation
represent and manipulate 4x4 transformation matrices
platform-independent render window interaction including picking and frame rate control.
abstract specification for renderers
vtkVRModel * GetTrackedDeviceModel(vtkEventDataDevice idx)
Get the VRModel corresponding to the tracked device.
virtual bool IsCurrent() override
Tells if this window is the current OpenGL context for the calling thread.
virtual void SetPhysicalTranslation(double, double, double)
Set/get physical coordinate system in world coordinate system.
virtual void Initialize() override
Initialize the rendering window.
virtual vtkVRModel * GetTrackedDeviceModel(vtkEventDataDevice idx, uint32_t index)=0
void MakeCurrent() override
Make this windows OpenGL context the current context.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void ReleaseGraphicsResources(vtkWindow *) override
Free up any graphics resources associated with this window a value of nullptr means the context may a...
virtual void Start() override
Begin the rendering process.
virtual void Render() override
Overridden to not release resources that would interfere with an external application's rendering.
virtual void SetPhysicalViewUp(double[3])
const char * ReportCapabilities() override
Get report of capabilities for the render window.
virtual void RenderModels()=0
Render the controller and base station models.
vtkOpenGLRenderWindow * HelperWindow
virtual void CreateAWindow() override
Create a not-off-screen window.
virtual void Finalize() override
Finalize the rendering window.
std::vector< vtkVRModel * > VTKRenderModels
void RenderFramebuffer(FramebufferDesc &framebufferDesc)
virtual void SetPhysicalScale(double)
Set/get physical coordinate system in world coordinate system.
virtual void SetPhysicalViewDirection(double[3])
virtual bool CreateFramebuffers()=0
~vtkVRRenderWindow() override
virtual void UpdateHMDMatrixPose()
virtual void * GetGenericDrawable() override
Dummy stubs for vtkWindow API.
virtual bool GetSizeFromAPI()=0
Attempt to get the size of the display from the API and store it in this->Size.
GLuint GetLeftResolveBufferId()
Get the frame buffers used for rendering.
std::vector< vtkVRModel * > TrackedDeviceToRenderModel
void SetSize(int width, int height) override
Set the size of the window in screen coordinates in pixels.
virtual int * GetScreenSize() override
Get the current size of the screen in pixels.
virtual vtkTypeBool GetEventPending() override
Check to see if a mouse button has been pressed or mouse wheel activated.
virtual int SupportsOpenGL() override
Does this render window support OpenGL? 0-false, 1-true.
vtkTransform * HMDTransform
virtual void * GetGenericDisplayId() override
Dummy stubs for vtkWindow API.
virtual void SetPhysicalViewDirection(double, double, double)
Set/get physical coordinate system in world coordinate system.
virtual void SetPhysicalTranslation(double[3])
virtual void * GetGenericParentId() override
Dummy stubs for vtkWindow API.
vtkOpenGLState * GetState() override
void GetRenderBufferSize(int &width, int &height)
GLuint GetRightResolveBufferId()
vtkVRModel * GetTrackedDeviceModel(uint32_t idx)
void SetPhysicalToWorldMatrix(vtkMatrix4x4 *matrix)
Set physical to world transform matrix.
vtkTypeBool IsDirect() override
Is this render window using hardware acceleration? 0-false, 1-true.
virtual void * GetGenericContext() override
Dummy stubs for vtkWindow API.
virtual void InitializeViewFromCamera(vtkCamera *cam)
Initialize the HMD to World setting and camera settings so that the VR world view most closely matche...
virtual void * GetGenericWindowId() override
Dummy stubs for vtkWindow API.
std::vector< FramebufferDesc > FramebufferDescs
virtual void AddRenderer(vtkRenderer *) override
Add a renderer to the list of renderers.
void SetHelperWindow(vtkOpenGLRenderWindow *val)
double PhysicalScale
Scale of the Physical to World matrix.
virtual std::string GetWindowTitleFromAPI()
virtual bool GetPoseMatrixWorldFromDevice(vtkEventDataDevice device, vtkMatrix4x4 *poseMatrixWorld)=0
Store in poseMatrixWorld the pose matrix in world coordinate from an event data device.
void SetSize(int a[2]) override
Set the size of the window in screen coordinates in pixels.
virtual void DestroyWindow() override
Destroy a not-off-screen window.
vtkRenderWindowInteractor * MakeRenderWindowInteractor() override=0
Create an interactor to control renderers in this window.
void ReleaseCurrent() override
Release the current context.
virtual void SetPhysicalViewUp(double, double, double)
Set/get physical coordinate system in world coordinate system.
void GetPhysicalToWorldMatrix(vtkMatrix4x4 *matrix)
Get physical to world transform matrix.
window superclass for vtkRenderWindow
vtkEventDataDevice
platform-independent event data structures