51 #ifndef vtkVRRenderWindow_h
52 #define vtkVRRenderWindow_h
57 #include "vtkRenderingVRModule.h"
98 width = this->Size[0];
99 height = this->Size[1];
108 vtkVRModel* GetModelForDeviceHandle(uint32_t handle);
115 void SetModelForDeviceHandle(uint32_t handle,
vtkVRModel* model);
125 vtkMatrix4x4* GetDeviceToPhysicalMatrixForDeviceHandle(uint32_t handle);
149 void AddDeviceHandle(uint32_t handle);
168 virtual bool GetDeviceToWorldMatrixForDeviceHandle(
178 virtual void InitializeViewFromCamera(
vtkCamera* cam);
189 virtual void SetPhysicalViewDirection(
double,
double,
double);
190 virtual void SetPhysicalViewDirection(
double[3]);
191 vtkGetVector3Macro(PhysicalViewDirection,
double);
203 virtual void SetPhysicalViewUp(
double,
double,
double);
204 virtual void SetPhysicalViewUp(
double[3]);
205 vtkGetVector3Macro(PhysicalViewUp,
double);
217 virtual void SetPhysicalTranslation(
double,
double,
double);
218 virtual void SetPhysicalTranslation(
double[3]);
219 vtkGetVector3Macro(PhysicalTranslation,
double);
232 virtual void SetPhysicalScale(
double);
233 vtkGetMacro(PhysicalScale,
double);
257 void Start()
override;
364 virtual void RenderModels() = 0;
371 vtkSetMacro(TrackHMD,
bool);
372 vtkGetMacro(TrackHMD,
bool);
379 vtkGetMacro(BaseStationVisibility,
bool);
380 vtkSetMacro(BaseStationVisibility,
bool);
381 vtkBooleanMacro(BaseStationVisibility,
bool);
392 vtkGetMacro(Initialized,
bool);
400 GLuint ResolveFramebufferId = 0;
401 GLuint ResolveColorTextureId = 0;
402 GLuint ResolveDepthTextureId = 0;
413 virtual bool GetSizeFromAPI() = 0;
420 bool TrackHMD =
true;
435 uint32_t InvalidDeviceIndex = UINT32_MAX;
438 double PhysicalViewDirection[3] = { 0.0, 0.0, -1.0 };
440 double PhysicalViewUp[3] = { 0.0, 1.0, 0.0 };
442 double PhysicalTranslation[3] = { 0.0, 0.0, 0.0 };
444 double PhysicalScale = 1.0;
446 bool BaseStationVisibility =
false;
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 Start(void) override
Begin the rendering process.
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.
virtual void Finalize()
Finalize the rendering process.
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.
virtual void Initialize(void)
Initialize the rendering window.
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