Documentation for vtkRenderWindow

vtkRenderWindow - create a window for renderers to draw into

Super Class: vtkWindow

Description:

vtkRenderWindow is an abstract object to specify the behavior of a rendering window. A rendering window is a window in a graphical user interface where renderers draw their images. Methods are provided to synchronize the rendering process, set window size, and control double buffering. The window also allows rendering in stereo. The interlaced render stereo type is for output to a VRex stero projector. All of the odd horizontal lines are from the left eye, and the even lines are from the right eye. The user has to make the render window alligned with the VRex projector, or the eye will be swapped.

 

See Also:

vtkRenderer vtkRenderWindowInteractor

 

Methods:

void vtkRenderWindow ()
void vtkRenderWindow ()
const char *GetClassName ()
void PrintSelf (unknown & ,vtkIndent )
static vtkRenderWindow *New ()
void AddRenderer (vtkRenderer *)
void RemoveRenderer (vtkRenderer *)
vtkRendererCollection *GetRenderers ()
void Render ()
void Start ()
void Frame ()
void CopyResultFrame ()
static char *GetRenderLibrary ()
vtkRenderWindowInteractor *MakeRenderWindowInteractor ()
void SetFullScreen (int )
int GetFullScreen ()
void FullScreenOn ()
void FullScreenOff ()
void SetBorders (int )
int GetBorders ()
void BordersOn ()
void BordersOff ()
int GetStereoRender ()
void SetStereoRender (int )
void StereoRenderOn ()
void StereoRenderOff ()
int GetStereoType ()
void SetStereoType (int )
void SetStereoTypeToCrystalEyes ()
void SetStereoTypeToRedBlue ()
void SetStereoTypeToInterlaced ()
void SetStereoTypeToLeft ()
void SetStereoTypeToRight ()
char *GetStereoTypeAsString ()
void StereoUpdate ()
void StereoMidpoint ()
void StereoRenderComplete ()
int GetRemapWindow ()
void WindowRemap ()
void SetSwapBuffers (int )
int GetSwapBuffers ()
void SwapBuffersOn ()
void SwapBuffersOff ()
void SetFileName (char *)
char *GetFileName ()
void SaveImageAsPPM ()
int OpenPPMImageFile ()
void WritePPMImageFile ()
void ClosePPMImageFile ()
void SetPixelData (int ,int ,int ,int ,unsigned char * ,int )
float *GetRGBAPixelData (int ,int ,int ,int ,int )
void SetRGBAPixelData (int ,int ,int ,int ,float * ,int ,int )
float *GetZbufferData (int ,int ,int ,int )
void SetZbufferData (int ,int ,int ,int ,float *)
int GetAAFrames ()
void SetAAFrames (int )
int GetFDFrames ()
void SetFDFrames (int )
int GetSubFrames ()
void SetSubFrames (int )
int GetAbortRender ()
void SetAbortRender (int )
int GetInAbortCheck ()
void SetInAbortCheck (int )
int CheckAbortStatus ()
int GetEventPending ()
void SetAbortCheckMethod (const )
void SetAbortCheckMethodArgDelete (const )
void SetDesiredUpdateRate (float )
float GetDesiredUpdateRate ()
vtkRenderWindowInteractor *GetInteractor ()
void SetInteractor (vtkRenderWindowInteractor *)
void UnRegister (vtkObject *)
void SetDisplayId (void *)
void SetWindowId (void *)
void SetParentId (void *)
void *GetGenericDisplayId ()
void *GetGenericWindowId ()
void *GetGenericParentId ()
void *GetGenericContext ()
void *GetGenericDrawable ()
void SetWindowInfo (char *)
void DoStereoRender ()
void DoFDRender ()
void DoAARender ()

 

Detailed Method Descriptions:

Construct an instance of vtkRenderWindow with its screen size set to 300x300, borders turned on, positioned at (0,0), double buffering turned on.

static vtkRenderWindow *New ()

Add a renderer to the list of renderers.

void AddRenderer (vtkRenderer *)

Remove a renderer from the list of renderers.

void RemoveRenderer (vtkRenderer *)

Return the colleciton of renderers inthe render window.

vtkRendererCollection *GetRenderers ()

Ask each renderer owned by this RenderWindow to render its image and synchronize this process.

void Render ()

Initialize the rendering process.

void Start ()

A termination method performed at the end of the rendering process to do things like swapping buffers (if necessary) or similar actions.

void Frame ()

Performed at the end of the rendering process to generate image. This is typically done right before swapping buffers.

void CopyResultFrame ()

Return a string for the device dependent rendering library being used.

static char *GetRenderLibrary ()

Create an interactor to control renderers in this window. We need to know what type of interactor to create, because we might be in X Windows or MS Windows.

vtkRenderWindowInteractor *MakeRenderWindowInteractor ()

Turn on/off rendering full screen window size.

void SetFullScreen (int )
int GetFullScreen ()
void FullScreenOn ()
void FullScreenOff ()

Turn on/off window manager borders. Typically, you shouldn't turn the borders off, because that bypasses the window manager and can cause undesirable behavior.

void SetBorders (int )
int GetBorders ()
void BordersOn ()
void BordersOff ()

Turn on/off stereo rendering.

int GetStereoRender ()
void SetStereoRender (int )
void StereoRenderOn ()
void StereoRenderOff ()

Set/Get what type of stereo rendering to use.

int GetStereoType ()
void SetStereoType (int )
void SetStereoTypeToCrystalEyes ()
void SetStereoTypeToRedBlue ()
void SetStereoTypeToInterlaced ()
void SetStereoTypeToLeft ()
void SetStereoTypeToRight ()
char *GetStereoTypeAsString ()

Update the system, if needed, due to stereo rendering. For some stereo methods, subclasses might need to switch some hardware settings here.

void StereoUpdate ()

Intermediate method performs operations required between the rendering of the left and right eye.

void StereoMidpoint ()

Handles work required once both views have been rendered when using stereo rendering.

void StereoRenderComplete ()

This method indicates if a StereoOn/Off will require the window to be remapped. Some types of stereo rendering require a new window to be created.

int GetRemapWindow ()

Remap the rendering window. This probably only works on UNIX right now. It is useful for changing properties that can't normally be changed once the window is up.

void WindowRemap ()

Turn on/off buffer swapping between images.

void SetSwapBuffers (int )
int GetSwapBuffers ()
void SwapBuffersOn ()
void SwapBuffersOff ()

Set/Get the FileName used for saving images. See the SaveImageAsPPM method.

void SetFileName (char *)
char *GetFileName ()

Save the current image as a PPM file.

void SaveImageAsPPM ()
int OpenPPMImageFile ()
void WritePPMImageFile ()
void ClosePPMImageFile ()

Set/Get the pixel data of an image, transmitted as RGBRGBRGB. The front argument indicates if the front buffer should be used or the back buffer. It is the caller's responsibility to delete the resulting array. It is very important to realize that the memory in this array is organized from the bottom of the window to the top. The origin of the screen is in the lower left corner. The y axis increases as you go up the screen. So the storage of pixels is from left to right and from bottom to top.

void SetPixelData (int ,int ,int ,int ,unsigned char * ,int )

Same as Get/SetPixelData except that the image also contains an alpha component. The image is transmitted as RGBARGBARGBA... each of which is a float value. The "blend" parameter controls whether the SetRGBAPixelData method blends the data with the previous contents of the frame buffer or completely replaces the frame buffer data.

float *GetRGBAPixelData (int ,int ,int ,int ,int )

Set/Get the zbuffer data from the frame buffer.

void SetRGBAPixelData (int ,int ,int ,int ,float * ,int ,int )
float *GetZbufferData (int ,int ,int ,int )
void SetZbufferData (int ,int ,int ,int ,float *)

Set the number of frames for doing antialiasing. The default is zero. Typically five or six will yield reasonable results without taking too long.

int GetAAFrames ()
void SetAAFrames (int )

Set the number of frames for doing focal depth. The default is zero. Depending on how your scene is organized you can get away with as few as four frames for focal depth or you might need thirty. One thing to note is that if you are using focal depth frames, then you will not need many (if any) frames for antialiasing.

int GetFDFrames ()
void SetFDFrames (int )

Set the number of sub frames for doing motion blur. The default is zero. Once this is set greater than one, you will no longer see a new frame for every Render(). If you set this to five, you will need to do five Render() invocations before seeing the result. This isn't very impressive unless something is changing between the Renders.

int GetSubFrames ()
void SetSubFrames (int )

This is a flag that can be set to interrupt a rendering that is in progress.

int GetAbortRender ()
void SetAbortRender (int )
int GetInAbortCheck ()
void SetInAbortCheck (int )
int CheckAbortStatus ()
int GetEventPending ()

Specify a function to be called to check and see if an abort of the rendering in progress is desired.

void SetAbortCheckMethod (const )

Set the arg delete method. This is used to free user memory.

void SetAbortCheckMethodArgDelete (const )

Set/Get the desired update rate. This is used with the vtkLODActor class. When using level of detail actors you need to specify what update rate you require. The LODActors then will pick the correct resolution to meet your desired update rate in frames per second. A value of zero indicates that they can use all the time they want to.

void SetDesiredUpdateRate (float )
float GetDesiredUpdateRate ()

Get the interactor associated with this render window

vtkRenderWindowInteractor *GetInteractor ()
void SetInteractor (vtkRenderWindowInteractor *)

This Method detects loops of RenderWindow<->Interactor, so objects are freed properly.

void UnRegister (vtkObject *)

Dummy stubs for vtkWindow API.

void SetDisplayId (void *)
void SetWindowId (void *)
void SetParentId (void *)
void *GetGenericDisplayId ()
void *GetGenericWindowId ()
void *GetGenericParentId ()
void *GetGenericContext ()
void *GetGenericDrawable ()
void SetWindowInfo (char *)