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