39#ifndef vtkVRRenderWindow_h 
   40#define vtkVRRenderWindow_h 
   45#include "vtkRenderingVRModule.h"  
   51VTK_ABI_NAMESPACE_BEGIN
 
   87    width = this->Size[0];
 
   88    height = this->Size[1];
 
  180  vtkGetVector3Macro(PhysicalViewDirection, 
double);
 
  194  vtkGetVector3Macro(PhysicalViewUp, 
double);
 
  208  vtkGetVector3Macro(PhysicalTranslation, 
double);
 
  222  vtkGetMacro(PhysicalScale, 
double);
 
  343  vtkSetMacro(TrackHMD, 
bool);
 
  344  vtkGetMacro(TrackHMD, 
bool);
 
  351  vtkGetMacro(BaseStationVisibility, 
bool);
 
  352  vtkSetMacro(BaseStationVisibility, 
bool);
 
  353  vtkBooleanMacro(BaseStationVisibility, 
bool);
 
  365  vtkGetMacro(VRInitialized, 
bool);
 
  373    GLuint ResolveFramebufferId = 0;
 
  374    GLuint ResolveColorTextureId = 0;
 
  375    GLuint ResolveDepthTextureId = 0;
 
  393  bool VRInitialized = 
false;
 
  394  bool TrackHMD = 
true;
 
  409  uint32_t InvalidDeviceIndex = UINT32_MAX;
 
  412  double PhysicalViewDirection[3] = { 0.0, 0.0, -1.0 };
 
  414  double PhysicalViewUp[3] = { 0.0, 1.0, 0.0 };
 
  416  double PhysicalTranslation[3] = { 0.0, 0.0, 0.0 };
 
  418  double PhysicalScale = 1.0;
 
  420  bool BaseStationVisibility = 
false;
 
a virtual camera for 3D rendering
 
a simple class to control print indentation
 
represent and manipulate 4x4 transformation matrices
 
Allocate and hold a VTK object.
 
platform-independent render window interaction including picking and frame rate control.
 
abstract specification for renderers
 
Hold a reference to a vtkObjectBase instance.
 
vtkNew< vtkMatrix4x4 > DeviceToPhysicalMatrix
 
vtkSmartPointer< vtkVRModel > Model
 
void Render() override
Overridden to not release resources that would interfere with an external application's rendering.
 
vtkVRModel * GetModelForDeviceHandle(uint32_t handle)
Get the VRModel corresponding to the device or device handle.
 
virtual void SetPhysicalTranslation(double, double, double)
Set/get physical coordinate system in world coordinate system.
 
void AddDeviceHandle(uint32_t handle)
 
void CreateAWindow() override
Create a not-off-screen window.
 
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 SetPhysicalViewUp(double[3])
Set/get physical coordinate system in world coordinate system.
 
std::map< uint32_t, DeviceData > DeviceHandleToDeviceDataMap
 
const char * ReportCapabilities() override
Get report of capabilities for the render window.
 
virtual void RenderModels()=0
Render the controller and base station models.
 
void * GetGenericParentId() override
Implement required virtual functions.
 
void GetPhysicalToWorldMatrix(vtkMatrix4x4 *matrix) override
Get physical to world transform matrix.
 
vtkOpenGLRenderWindow * HelperWindow
 
void * GetGenericWindowId() override
Implement required virtual functions.
 
virtual bool GetDeviceToWorldMatrixForDeviceHandle(uint32_t handle, vtkMatrix4x4 *deviceToWorldMatrix)
 
virtual void SetPhysicalScale(double)
Set/get physical coordinate system in world coordinate system.
 
virtual void SetPhysicalViewDirection(double[3])
Set/get physical coordinate system in world coordinate system.
 
uint32_t GetNumberOfDeviceHandlesForDevice(vtkEventDataDevice dev)
 
vtkVRModel * GetModelForDevice(vtkEventDataDevice idx)
Get the VRModel corresponding to the device or device handle.
 
~vtkVRRenderWindow() override
 
virtual void UpdateHMDMatrixPose()
Update the HMD pose.
 
virtual bool GetSizeFromAPI()=0
Attempt to get the size of the display from the API and store it in this->Size.
 
int SupportsOpenGL() override
Does this render window support OpenGL? 0-false, 1-true.
 
vtkMatrix4x4 * GetDeviceToPhysicalMatrixForDeviceHandle(uint32_t handle)
Get the DeviceToPhysical matrix corresponding to the device or device handle.
 
void AddRenderer(vtkRenderer *) override
Add a renderer to the list of renderers.
 
GLuint GetLeftResolveBufferId()
Get the frame buffers used for rendering.
 
uint32_t GetDeviceHandleForDevice(vtkEventDataDevice dev, uint32_t index=0)
 
void SetSize(int width, int height) override
Set the size of the window in screen coordinates in pixels.
 
void * GetGenericDrawable() override
Implement required virtual functions.
 
virtual void RenderFramebuffer(FramebufferDesc &framebufferDesc)=0
 
vtkEventDataDevice GetDeviceForDeviceHandle(uint32_t handle)
 
virtual void SetPhysicalViewDirection(double, double, double)
Set/get physical coordinate system in world coordinate system.
 
virtual void SetPhysicalTranslation(double[3])
Set/get physical coordinate system in world coordinate system.
 
void DestroyWindow() override
Destroy a not-off-screen window.
 
vtkOpenGLState * GetState() override
Get the state object used to keep track of OpenGL state.
 
void AddDeviceHandle(uint32_t handle, vtkEventDataDevice device)
 
void GetRenderBufferSize(int &width, int &height)
Get the frame buffers used for rendering.
 
bool IsCurrent() override
Tells if this window is the current OpenGL context for the calling thread.
 
GLuint GetRightResolveBufferId()
Get the frame buffers used for rendering.
 
bool GetDeviceToWorldMatrixForDevice(vtkEventDataDevice device, vtkMatrix4x4 *deviceToWorldMatrix) override
Store in deviceToWorldMatrix the matrix that goes from device coordinates to world coordinates.
 
vtkTypeBool GetEventPending() override
Check to see if a mouse button has been pressed or mouse wheel activated.
 
void SetPhysicalToWorldMatrix(vtkMatrix4x4 *matrix)
Set physical to world transform matrix.
 
vtkTypeBool IsDirect() override
Is this render window using hardware acceleration? 0-false, 1-true.
 
int * GetScreenSize() override
Get the current size of the screen in pixels.
 
virtual void InitializeViewFromCamera(vtkCamera *cam)
Initialize the HMD to World setting and camera settings so that the VR world view most closely matche...
 
virtual bool CreateFramebuffers(uint32_t viewCount=2)=0
 
void * GetGenericContext() override
Implement required virtual functions.
 
void * GetGenericDisplayId() override
Implement required virtual functions.
 
vtkMatrix4x4 * GetDeviceToPhysicalMatrixForDevice(vtkEventDataDevice idx)
Get the DeviceToPhysical matrix corresponding to the device or device handle.
 
std::vector< FramebufferDesc > FramebufferDescs
 
void SetHelperWindow(vtkOpenGLRenderWindow *val)
Set/Get the window to use for the openGL context.
 
void SetModelForDeviceHandle(uint32_t handle, vtkVRModel *model)
Set the VRModel corresponding to the device handle.
 
virtual std::string GetWindowTitleFromAPI()
 
void SetSize(int a[2]) override
Set the size of the window in screen coordinates in pixels.
 
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.
 
window superclass for vtkRenderWindow
 
vtkEventDataDevice
platform-independent event data structures