38 #ifndef vtkRenderWindow_h
39 #define vtkRenderWindow_h
43 #include "vtkRenderingCoreModule.h"
48 VTK_ABI_NAMESPACE_BEGIN
62 #define VTK_STEREO_CRYSTAL_EYES 1
63 #define VTK_STEREO_RED_BLUE 2
64 #define VTK_STEREO_INTERLACED 3
65 #define VTK_STEREO_LEFT 4
66 #define VTK_STEREO_RIGHT 5
67 #define VTK_STEREO_DRESDEN 6
68 #define VTK_STEREO_ANAGLYPH 7
69 #define VTK_STEREO_CHECKERBOARD 8
70 #define VTK_STEREO_SPLITVIEWPORT_HORIZONTAL 9
71 #define VTK_STEREO_FAKE 10
72 #define VTK_STEREO_EMULATE 11
73 #define VTK_STEREO_ZSPACE_INSPIRE 12
106 static const char* GetRenderLibrary();
111 virtual const char* GetRenderingBackend();
137 vtkGetMacro(CapturingGL2PSSpecialProps,
int);
167 vtkGetMacro(Initialized,
bool);
191 virtual void CopyResultFrame();
226 virtual void SetStereoCapableWindow(
vtkTypeBool capable);
251 vtkGetMacro(StereoType,
int);
252 void SetStereoType(
int);
273 const char* GetStereoTypeAsString();
274 static const char* GetStereoTypeAsString(
int type);
329 virtual void StereoUpdate();
335 virtual void StereoMidpoint();
341 virtual void StereoRenderComplete();
351 vtkSetClampMacro(AnaglyphColorSaturation,
float, 0.0f, 1.0f);
352 vtkGetMacro(AnaglyphColorSaturation,
float);
370 vtkSetVector2Macro(AnaglyphColorMask,
int);
371 vtkGetVectorMacro(AnaglyphColorMask,
int, 2);
424 int ,
int ,
int ,
int ,
int ,
int = 0)
445 int ,
int ,
int ,
int ,
int ,
int = 0)
455 unsigned char* ,
int ,
int = 0,
int = 0)
492 this->GetZbufferData(x, y, x, y, &value);
501 vtkGetMacro(NeverRendered,
int);
509 vtkGetMacro(AbortRender,
int);
510 vtkSetMacro(AbortRender,
int);
511 vtkGetMacro(InAbortCheck,
int);
512 vtkSetMacro(InAbortCheck,
int);
513 virtual int CheckAbortStatus();
543 virtual void SetDesiredUpdateRate(
double);
544 vtkGetMacro(DesiredUpdateRate,
double);
554 vtkGetMacro(NumberOfLayers,
int);
555 vtkSetClampMacro(NumberOfLayers,
int, 1,
VTK_INT_MAX);
659 virtual void SetMultiSamples(
int);
660 vtkGetMacro(MultiSamples,
int);
679 vtkSetMacro(DeviceIndex,
int);
680 vtkGetMacro(DeviceIndex,
int);
693 vtkGetMacro(UseSRGBColorSpace,
bool);
694 vtkSetMacro(UseSRGBColorSpace,
bool);
695 vtkBooleanMacro(UseSRGBColorSpace,
bool);
712 virtual void SetPhysicalViewDirection(
double,
double,
double);
713 virtual void SetPhysicalViewDirection(
double[3]);
714 vtkGetVector3Macro(PhysicalViewDirection,
double);
726 virtual void SetPhysicalViewUp(
double,
double,
double);
727 virtual void SetPhysicalViewUp(
double[3]);
728 vtkGetVector3Macro(PhysicalViewUp,
double);
740 virtual void SetPhysicalTranslation(
double,
double,
double);
741 virtual void SetPhysicalTranslation(
double[3]);
742 vtkGetVector3Macro(PhysicalTranslation,
double);
755 virtual void SetPhysicalScale(
double);
756 vtkGetMacro(PhysicalScale,
double);
765 virtual
void SetPhysicalToWorldMatrix(
vtkMatrix4x4* matrix);
772 virtual
void GetPhysicalToWorldMatrix(
vtkMatrix4x4* matrix);
780 virtual
bool GetDeviceToWorldMatrixForDevice(
790 vtkGetMacro(EnableTranslucentSurface,
bool);
791 vtkSetMacro(EnableTranslucentSurface,
bool);
792 vtkBooleanMacro(EnableTranslucentSurface,
bool);
806 ~vtkRenderWindow() override;
808 virtual
void DoStereoRender();
826 double DesiredUpdateRate;
832 float AnaglyphColorSaturation;
833 int AnaglyphColorMask[2];
836 int CapturingGL2PSSpecialProps;
839 bool UseSRGBColorSpace;
844 double AbortCheckTime;
846 vtkRenderWindow* SharedRenderWindow;
849 double PhysicalViewDirection[3] = { 0.0, 0.0, -1.0 };
851 double PhysicalViewUp[3] = { 0.0, 1.0, 0.0 };
853 double PhysicalTranslation[3] = { 0.0, 0.0, 0.0 };
855 double PhysicalScale = 1.0;
857 bool EnableTranslucentSurface =
false;
859 bool Initialized =
false;
870 VTK_ABI_NAMESPACE_END
create a window for renderers to draw into
abstract superclass for all actors, volumes and annotations
virtual int SetRGBACharPixelData(int, int, int, int, vtkUnsignedCharArray *, int, int=0, int=0)
Same as Get/SetPixelData except that the image also contains an alpha component.
virtual void Start()
Start the rendering process for a frame.
virtual void SetForceMakeCurrent()
If called, allow MakeCurrent() to skip cache-check when called.
void SetStereoTypeToRight()
Set/Get what type of stereo rendering to use.
virtual int GetDepthBufferSize()
This method should be defined by the subclass.
virtual float * GetZbufferData(int, int, int, int)
Set/Get the zbuffer data from the frame buffer.
void SetStereoTypeToFake()
Set/Get what type of stereo rendering to use.
represent and manipulate 4x4 transformation matrices
virtual void SetFullScreen(vtkTypeBool)
Turn on/off rendering full screen window size.
void * GetGenericDisplayId() override
Dummy stubs for vtkWindow API.
void * GetGenericContext() override
Dummy stubs for vtkWindow API.
virtual void WindowRemap()
Remap the rendering window.
void SetDisplayId(void *) override
Dummy stubs for vtkWindow API.
virtual int SetPixelData(int, int, int, int, unsigned char *, int, int=0)
Set/Get the pixel data of an image, transmitted as RGBRGBRGB.
virtual int SetZbufferData(int, int, int, int, vtkFloatArray *)
Set/Get the zbuffer data from the frame buffer.
#define VTK_STEREO_CHECKERBOARD
virtual void SetNextWindowId(void *)
Dummy stubs for vtkWindow API.
virtual int GetColorBufferSizes(int *)
Get the size of the color buffer.
void * GetGenericWindowId() override
Dummy stubs for vtkWindow API.
dynamic, self-adjusting array of float
void SetStereoTypeToSplitViewportHorizontal()
Set/Get what type of stereo rendering to use.
#define VTK_STEREO_DRESDEN
void SetStereoTypeToAnaglyph()
Set/Get what type of stereo rendering to use.
#define VTK_STEREO_RED_BLUE
abstract specification for renderers
void SetWindowInfo(const char *) override
Dummy stubs for vtkWindow API.
Hold a reference to a vtkObjectBase instance.
virtual bool IsCurrent()
Tells if this window is the current graphics context for the calling thread.
virtual void Finalize()
Finalize the rendering process.
virtual int GetRGBACharPixelData(int, int, int, int, int, vtkUnsignedCharArray *, int=0)
Same as Get/SetPixelData except that the image also contains an alpha component.
virtual int GetZbufferData(int, int, int, int, vtkFloatArray *)
Set/Get the zbuffer data from the frame buffer.
void SetParentId(void *) override
Dummy stubs for vtkWindow API.
#define VTK_STEREO_INTERLACED
void SetStereoTypeToCrystalEyes()
Set/Get what type of stereo rendering to use.
window superclass for vtkRenderWindow
platform-independent render window interaction including picking and frame rate control.
virtual const char * ReportCapabilities()
Get report of capabilities for the render window.
virtual int SupportsOpenGL()
Does this render window support OpenGL? 0-false, 1-true.
#define VTK_STEREO_EMULATE
virtual int GetRGBAPixelData(int, int, int, int, int, vtkFloatArray *, int=0)
Same as Get/SetPixelData except that the image also contains an alpha component.
virtual void SetNextWindowInfo(const char *)
Dummy stubs for vtkWindow API.
an ordered list of renderers
virtual int CheckInRenderStatus()
Are we rendering at the moment.
virtual void UnRegister(vtkObjectBase *o)
Decrease the reference count (release by another object).
void SetWindowId(void *) override
Dummy stubs for vtkWindow API.
void SetStereoTypeToRedBlue()
Set/Get what type of stereo rendering to use.
virtual int SetZbufferData(int, int, int, int, float *)
Set/Get the zbuffer data from the frame buffer.
a simple class to control print indentation
void SetStereoTypeToCheckerboard()
Set/Get what type of stereo rendering to use.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
float GetZbufferDataAtPoint(int x, int y)
Set/Get the zbuffer data from the frame buffer.
void SetStereoTypeToInterlaced()
Set/Get what type of stereo rendering to use.
void SetStereoTypeToEmulate()
Set/Get what type of stereo rendering to use.
virtual void WaitForCompletion()
Block the thread until the actual rendering is finished().
void * GetGenericParentId() override
Dummy stubs for vtkWindow API.
virtual int SetPixelData(int, int, int, int, vtkUnsignedCharArray *, int, int=0)
Set/Get the pixel data of an image, transmitted as RGBRGBRGB.
virtual void ReleaseRGBAPixelData(float *)
Same as Get/SetPixelData except that the image also contains an alpha component.
abstract base class for most VTK objects
vtkEventDataDevice
platform-independent event data structures
vtkSmartPointer< vtkHardwareWindow > HardwareWindow
#define VTK_STEREO_CRYSTAL_EYES
dynamic, self-adjusting array of unsigned char
#define VTK_MARSHALEXCLUDE(reason)
virtual vtkTypeBool GetEventPending()
Check to see if a mouse button has been pressed.
void SetStereoTypeToDresden()
Set/Get what type of stereo rendering to use.
virtual int SetRGBAPixelData(int, int, int, int, float *, int, int=0, int=0)
Same as Get/SetPixelData except that the image also contains an alpha component.
virtual int SetRGBAPixelData(int, int, int, int, vtkFloatArray *, int, int=0, int=0)
Same as Get/SetPixelData except that the image also contains an alpha component.
create a window for renderers to draw into
#define VTK_STEREO_SPLITVIEWPORT_HORIZONTAL
virtual bool InitializeFromCurrentContext()
Initialize the render window from the information associated with the currently activated OpenGL cont...
virtual void ClearInRenderStatus()
Clear status (after an exception was thrown for example)
create and manipulate ordered lists of objects
virtual bool GetPlatformSupportsRenderWindowSharing()
Set/Get an already existing window that this window should share data with if possible.
Allocate and hold a VTK object.
virtual unsigned char * GetRGBACharPixelData(int, int, int, int, int, int=0)
Same as Get/SetPixelData except that the image also contains an alpha component.
virtual void End()
Update the system, if needed, at end of render process.
virtual float * GetRGBAPixelData(int, int, int, int, int, int=0)
Same as Get/SetPixelData except that the image also contains an alpha component.
virtual void Render()
Ask each viewport owned by this Window to render its image and synchronize this process.
helper class to generate composited stereo images.
void SetParentInfo(const char *) override
Dummy stubs for vtkWindow API.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
virtual int GetZbufferData(int, int, int, int, float *)
Set/Get the zbuffer data from the frame buffer.
void * GetGenericDrawable() override
Dummy stubs for vtkWindow API.
virtual int GetNumberOfDevices()
Returns the number of devices (graphics cards) on a system.
virtual vtkTypeBool IsDirect()
Is this render window using hardware acceleration? 0-false, 1-true.
void SetStereoTypeToLeft()
Set/Get what type of stereo rendering to use.
#define VTK_STEREO_ANAGLYPH
virtual void Frame()
A termination method performed at the end of the rendering process to do things like swapping buffers...
Asynchronously measures GPU execution times for a series of events.
virtual int SetRGBACharPixelData(int, int, int, int, unsigned char *, int, int=0, int=0)
Same as Get/SetPixelData except that the image also contains an alpha component.
#define VTK_MARSHAL_EXCLUDE_REASON_IS_INTERNAL
virtual void Initialize()
Initializes the rendering process.