39 #ifndef vtkVRRenderWindow_h
40 #define vtkVRRenderWindow_h
45 #include "vtkRenderingVRModule.h"
51 VTK_ABI_NAMESPACE_BEGIN
87 width = this->Size[0];
88 height = this->Size[1];
97 vtkVRModel* GetModelForDeviceHandle(uint32_t handle);
104 void SetModelForDeviceHandle(uint32_t handle,
vtkVRModel* model);
114 vtkMatrix4x4* GetDeviceToPhysicalMatrixForDeviceHandle(uint32_t handle);
138 void AddDeviceHandle(uint32_t handle);
157 virtual bool GetDeviceToWorldMatrixForDeviceHandle(
167 virtual void InitializeViewFromCamera(
vtkCamera* cam);
178 virtual void SetPhysicalViewDirection(
double,
double,
double);
179 virtual void SetPhysicalViewDirection(
double[3]);
180 vtkGetVector3Macro(PhysicalViewDirection,
double);
192 virtual void SetPhysicalViewUp(
double,
double,
double);
193 virtual void SetPhysicalViewUp(
double[3]);
194 vtkGetVector3Macro(PhysicalViewUp,
double);
206 virtual void SetPhysicalTranslation(
double,
double,
double);
207 virtual void SetPhysicalTranslation(
double[3]);
208 vtkGetVector3Macro(PhysicalTranslation,
double);
221 virtual void SetPhysicalScale(
double);
222 vtkGetMacro(PhysicalScale,
double);
336 virtual void RenderModels() = 0;
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;
386 virtual bool GetSizeFromAPI() = 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;
429 VTK_ABI_NAMESPACE_END
void * GetGenericParentId() override
Implement required virtual functions.
void GetRenderBufferSize(int &width, int &height)
Get the frame buffers used for rendering.
virtual bool GetDeviceToWorldMatrixForDevice(vtkEventDataDevice device, vtkMatrix4x4 *deviceToWorldMatrix)
Store in deviceToWorldMatrix the matrix that goes from device coordinates to world coordinates...
represent and manipulate 4x4 transformation matrices
void Render() override
Handle opengl specific code and calls superclass.
const char * ReportCapabilities() override
Get report of capabilities for the render window.
void DestroyWindow() override
Destroy a not-off-screen window.
abstract specification for renderers
virtual void AddRenderer(vtkRenderer *)
Add a renderer to the list of renderers.
virtual vtkRenderWindowInteractor * MakeRenderWindowInteractor()
Create an interactor to control renderers in this window.
virtual bool IsCurrent()
Tells if this window is the current graphics context for the calling thread.
int SupportsOpenGL() override
Does this render window support OpenGL? 0-false, 1-true.
GLuint GetRightResolveBufferId()
Get the frame buffers used for rendering.
void * GetGenericDisplayId() override
Implement required virtual functions.
window superclass for vtkRenderWindow
void * GetGenericContext() override
Implement required virtual functions.
platform-independent render window interaction including picking and frame rate control.
vtkNew< vtkMatrix4x4 > DeviceToPhysicalMatrix
virtual void SetSize(int width, int height)
Set the size (width and height) of the rendering window in screen coordinates (in pixels)...
virtual std::string GetWindowTitleFromAPI()
void * GetGenericWindowId() override
Implement required virtual functions.
a simple class to control print indentation
a virtual camera for 3D rendering
virtual int * GetScreenSize()
Get the current size of the screen in pixels.
void * GetGenericDrawable() override
Implement required virtual functions.
vtkEventDataDevice
platform-independent event data structures
virtual void MakeCurrent()
Make the window current.
std::vector< FramebufferDesc > FramebufferDescs
GLuint GetLeftResolveBufferId()
Get the frame buffers used for rendering.
virtual void ReleaseCurrent()
Release the current context.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTypeBool IsDirect() override
Is this render window using hardware acceleration? 0-false, 1-true.
void CreateAWindow() override
Create a not-off-screen window.
vtkOpenGLFramebufferObject * RenderFramebuffer
vtkSmartPointer< vtkVRModel > Model
std::map< uint32_t, DeviceData > DeviceHandleToDeviceDataMap
virtual vtkOpenGLState * GetState()
virtual void GetPhysicalToWorldMatrix(vtkMatrix4x4 *matrix)
Get physical to world transform matrix.
void SetSize(int a[2]) override
Set the size of the window in screen coordinates in pixels.
virtual void UpdateHMDMatrixPose()
Update the HMD pose.
int CreateFramebuffers(int width, int height)
Create the offScreen framebuffer Return if the creation was successful or not.
void ReleaseGraphicsResources(vtkWindow *) override
Free up any graphics resources associated with this window a value of NULL means the context may alre...
vtkTypeBool GetEventPending() override
Check to see if a mouse button has been pressed or mouse wheel activated.
vtkOpenGLRenderWindow * HelperWindow