Go to the documentation of this file.
47 #ifndef vtkRenderWindow_h
48 #define vtkRenderWindow_h
50 #include "vtkRenderingCoreModule.h"
64 #define VTK_STEREO_CRYSTAL_EYES 1
65 #define VTK_STEREO_RED_BLUE 2
66 #define VTK_STEREO_INTERLACED 3
67 #define VTK_STEREO_LEFT 4
68 #define VTK_STEREO_RIGHT 5
69 #define VTK_STEREO_DRESDEN 6
70 #define VTK_STEREO_ANAGLYPH 7
71 #define VTK_STEREO_CHECKERBOARD 8
72 #define VTK_STEREO_SPLITVIEWPORT_HORIZONTAL 9
73 #define VTK_STEREO_FAKE 10
75 #define VTK_CURSOR_DEFAULT 0
76 #define VTK_CURSOR_ARROW 1
77 #define VTK_CURSOR_SIZENE 2
78 #define VTK_CURSOR_SIZENW 3
79 #define VTK_CURSOR_SIZESW 4
80 #define VTK_CURSOR_SIZESE 5
81 #define VTK_CURSOR_SIZENS 6
82 #define VTK_CURSOR_SIZEWE 7
83 #define VTK_CURSOR_SIZEALL 8
84 #define VTK_CURSOR_HAND 9
85 #define VTK_CURSOR_CROSSHAIR 10
148 vtkGetMacro(CapturingGL2PSSpecialProps,
int);
208 vtkSetMacro(CurrentCursor,
int);
209 vtkGetMacro(CurrentCursor,
int);
309 vtkGetMacro(StereoType,
int);
361 vtkSetClampMacro(AnaglyphColorSaturation,
float, 0.0f, 1.0f);
362 vtkGetMacro(AnaglyphColorSaturation,
float);
380 vtkSetVector2Macro(AnaglyphColorMask,
int);
381 vtkGetVectorMacro(AnaglyphColorMask,
int,2);
414 int front,
int right=0) = 0;
431 int front,
int blend=0,
int right=0) = 0;
433 int,
int blend=0,
int right=0) = 0;
436 int front,
int right=0) = 0;
440 unsigned char *
data,
int front,
441 int blend=0,
int right=0) = 0;
444 int blend=0,
int right=0) = 0;
463 this->GetZbufferData(x, y, x, y, &
value);
472 vtkGetMacro(NeverRendered,
int);
480 vtkGetMacro(AbortRender,
int);
481 vtkSetMacro(AbortRender,
int);
482 vtkGetMacro(InAbortCheck,
int);
483 vtkSetMacro(InAbortCheck,
int);
519 vtkGetMacro(DesiredUpdateRate,
double);
529 vtkGetMacro(NumberOfLayers,
int);
646 vtkSetMacro(MultiSamples,
int);
647 vtkGetMacro(MultiSamples,
int);
666 vtkSetMacro(DeviceIndex,
int);
667 vtkGetMacro(DeviceIndex,
int);
694 vtkGetMacro(UseSRGBColorSpace,
bool);
695 vtkSetMacro(UseSRGBColorSpace,
bool);
696 vtkBooleanMacro(UseSRGBColorSpace,
bool);
732 int AnaglyphColorMask[2];
unsigned char * ResultFrame
vtkRenderWindow * SharedRenderWindow
void RemoveRenderer(vtkRenderer *)
Remove a renderer from the list of renderers.
vtkTypeBool PointSmoothing
unsigned char * StereoBuffer
void UnRegister(vtkObjectBase *o) override
This Method detects loops of RenderWindow<->Interactor, so objects are freed properly.
unsigned int AccumulationBufferSize
virtual void Start()=0
Initialize the rendering process.
#define VTK_STEREO_RED_BLUE
virtual void SetDesiredUpdateRate(double)
Set/Get the desired update rate.
virtual void StereoRenderComplete()
Handles work required once both views have been rendered when using stereo rendering.
virtual bool GetUseOffScreenBuffers()
virtual int GetColorBufferSizes(int *rgba)=0
Get the size of the color buffer.
virtual int GetDepthBufferSize()=0
This method should be defined by the subclass.
virtual void ShowCursor()=0
dynamic, self-adjusting array of float
virtual void DoStereoRender()
virtual float * GetRGBAPixelData(int x, int y, int x2, int y2, int front, int right=0)=0
Same as Get/SetPixelData except that the image also contains an alpha component.
void SetStereoTypeToRedBlue()
virtual int SetRGBACharPixelData(int x, int y, int x2, int y2, vtkUnsignedCharArray *data, int front, int blend=0, int right=0)=0
virtual int SetUseOffScreenBuffers(bool)
Create and bind offscreen rendering buffers without destroying the current OpenGL context.
virtual int GetZbufferData(int x, int y, int x2, int y2, float *z)=0
dynamic, self-adjusting array of unsigned char
void SetStereoTypeToCheckerboard()
virtual int SetZbufferData(int x, int y, int x2, int y2, vtkFloatArray *z)=0
float GetZbufferDataAtPoint(int x, int y)
virtual void HideCursor()=0
Hide or Show the mouse cursor, it is nice to be able to hide the default cursor if you want VTK to di...
virtual void Finalize()=0
Finalize the rendering process.
virtual void SetFullScreen(vtkTypeBool)=0
Turn on/off rendering full screen window size.
void SetDisplayId(void *) override=0
Dummy stubs for vtkWindow API.
vtkRendererCollection * Renderers
an ordered list of renderers
virtual bool IsCurrent()=0
Tells if this window is the current graphics context for the calling thread.
#define VTK_STEREO_CRYSTAL_EYES
#define VTK_STEREO_SPLITVIEWPORT_HORIZONTAL
void SetWindowId(void *) override=0
virtual void SetForceMakeCurrent()
If called, allow MakeCurrent() to skip cache-check when called.
virtual void WindowRemap()=0
Remap the rendering window.
window superclass for vtkRenderWindow
void SetParentId(void *) override=0
float AnaglyphColorSaturation
virtual void CopyResultFrame()
Performed at the end of the rendering process to generate image.
create and manipulate ordered lists of objects
virtual bool GetPlatformSupportsRenderWindowSharing()
virtual int SetPixelData(int x, int y, int x2, int y2, vtkUnsignedCharArray *data, int front, int right=0)=0
virtual void StereoMidpoint()
Intermediate method performs operations required between the rendering of the left and right eye.
virtual void SetNextWindowInfo(const char *)=0
void SetInteractor(vtkRenderWindowInteractor *)
Set the interactor to the render window.
void SetStereoTypeToAnaglyph()
void * GetGenericParentId() override=0
abstract base class for most VTK objects
vtkRenderWindowInteractor * Interactor
virtual int SetRGBAPixelData(int, int, int, int, vtkFloatArray *, int, int blend=0, int right=0)=0
void * GetGenericDrawable() override=0
#define VTK_STEREO_INTERLACED
int HasRenderer(vtkRenderer *)
Query if a renderer is in the list of renderers.
virtual vtkRenderWindowInteractor * MakeRenderWindowInteractor()
Create an interactor to control renderers in this window.
int CapturingGL2PSSpecialProps
virtual float * GetZbufferData(int x, int y, int x2, int y2)=0
Set/Get the zbuffer data from the frame buffer.
void SetStereoTypeToLeft()
#define VTK_STEREO_ANAGLYPH
virtual void AddRenderer(vtkRenderer *)
Add a renderer to the list of renderers.
vtkTypeBool StencilCapable
a simple class to control print indentation
void Render() override
Ask each renderer owned by this RenderWindow to render its image and synchronize this process.
virtual int SetPixelData(int x, int y, int x2, int y2, unsigned char *data, int front, int right=0)=0
Set/Get the pixel data of an image, transmitted as RGBRGBRGB.
void * GetGenericContext() override=0
void SetWindowInfo(const char *) override=0
void * GetGenericDisplayId() override=0
vtkTypeBool StereoCapableWindow
virtual void WaitForCompletion()=0
Block the thread until the actual rendering is finished().
void * GetGenericWindowId() override=0
virtual int GetRGBAPixelData(int x, int y, int x2, int y2, int front, vtkFloatArray *data, int right=0)=0
void MakeCurrent() override=0
Attempt to make this window the current graphics context for the calling thread.
virtual const char * ReportCapabilities()
Get report of capabilities for the render window.
void SetStereoTypeToRight()
platform-independent render window interaction including picking and frame rate control.
virtual void SetStereoCapableWindow(vtkTypeBool capable)
Asynchronously measures GPU execution times for a series of events.
double AbortCheckTime
The universal time since the last abort check occurred.
const char * GetStereoTypeAsString()
virtual int GetNumberOfDevices()
Returns the number of devices (graphics cards) on a system.
abstract superclass for all actors, volumes and annotations
vtkGetNewMacro(RenderTimer, vtkRenderTimerLog) vtkRendererCollection *GetRenderers()
Get the render timer log for this window.
void SetStereoTypeToCrystalEyes()
virtual int SetZbufferData(int x, int y, int x2, int y2, float *z)=0
virtual void SetCursorPosition(int, int)
virtual int SetRGBAPixelData(int x, int y, int x2, int y2, float *, int front, int blend=0, int right=0)=0
virtual bool IsDrawable()
Test if the window has a valid drawable.
abstract specification for renderers
void SetStereoTypeToFake()
void SetStereoRender(vtkTypeBool stereo)
float * AccumulationBuffer
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual unsigned char * GetRGBACharPixelData(int x, int y, int x2, int y2, int front, int right=0)=0
virtual void StereoUpdate()
Update the system, if needed, due to stereo rendering.
virtual void ReleaseRGBAPixelData(float *data)=0
virtual int IsDirect()
Is this render window using hardware acceleration? 0-false, 1-true.
#define VTK_STEREO_DRESDEN
void SetStereoTypeToDresden()
void SetStereoTypeToInterlaced()
virtual int SupportsOpenGL()
Does this render window support OpenGL? 0-false, 1-true.
vtkTypeBool AlphaBitPlanes
void CaptureGL2PSSpecialProps(vtkCollection *specialProps)
The GL2PS exporter must handle certain props in a special way (e.g.
virtual int SetRGBACharPixelData(int x, int y, int x2, int y2, unsigned char *data, int front, int blend=0, int right=0)=0
vtkTypeBool LineSmoothing
virtual int GetZbufferData(int x, int y, int x2, int y2, vtkFloatArray *z)=0
create a window for renderers to draw into
virtual bool InitializeFromCurrentContext()
Initialize the render window from the information associated with the currently activated OpenGL cont...
virtual const char * GetRenderingBackend()
What rendering backend has the user requested.
virtual void ClearInRenderStatus()
Clear status (after an exception was thrown for example)
virtual int CheckInRenderStatus()
Are we rendering at the moment.
virtual void Frame()=0
A termination method performed at the end of the rendering process to do things like swapping buffers...
virtual void SetSharedRenderWindow(vtkRenderWindow *)
Set/Get an already existing window that this window should share data with if possible.
virtual void SetNextWindowId(void *)=0
static vtkRenderWindow * New()
Construct an instance of vtkRenderWindow with its screen size set to 300x300, borders turned on,...
vtkNew< vtkRenderTimerLog > RenderTimer
virtual int GetEventPending()=0
Check to see if a mouse button has been pressed.
vtkTypeBool PolygonSmoothing
static const char * GetRenderLibrary()
What rendering library has the user requested.
~vtkRenderWindow() override
virtual int GetRGBACharPixelData(int x, int y, int x2, int y2, int front, vtkUnsignedCharArray *data, int right=0)=0
void SetStereoTypeToSplitViewportHorizontal()
virtual int CheckAbortStatus()
void SetParentInfo(const char *) override=0
#define VTK_STEREO_CHECKERBOARD