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