Documentation for vtkViewport

vtkViewport - abstract specification for Viewports

Super Class: vtkObject

Description:

vtkViewport provides an abstract specification for Viewports. A Viewport is an object that controls the rendering process for objects. Rendering is the process of converting geometry, a specification for lights, and a camera view into an image. vtkViewport also performs coordinate transformation between world coordinates, view coordinates (the computer graphics rendering coordinate system), and display coordinates (the actual screen coordinates on the display device). Certain advanced rendering features such as two-sided lighting can also be controlled.

 

See Also:

vtkWindow vtkImager vtkRenderer

 

Methods:

void vtkViewport ()
void vtkViewport ()
const char *GetClassName ()
void PrintSelf (unknown & ,vtkIndent )
void SetBackground (float ,float ,float )
void SetBackground (float *)
float *GetBackground ()
void SetAspect (float ,float )
void SetAspect (float *)
float *GetAspect ()
void SetViewport (float ,float ,float ,float )
void SetViewport (float *)
float *GetViewport ()
void SetDisplayPoint (float ,float ,float )
void SetDisplayPoint (float *)
float *GetDisplayPoint ()
void SetViewPoint (float ,float ,float )
void SetViewPoint (float *)
float *GetViewPoint ()
void SetWorldPoint (float ,float ,float ,float )
void SetWorldPoint (float *)
float *GetWorldPoint ()
float *GetCenter ()
int IsInViewport (int ,int )
vtkWindow *GetVTKWindow ()
void SetStartRenderMethod (const )
void SetEndRenderMethod (const )
void SetStartRenderMethodArgDelete (const )
void SetEndRenderMethodArgDelete (const )
void DisplayToView ()
void ViewToDisplay ()
void WorldToView ()
void ViewToWorld ()
void DisplayToWorld ()
void WorldToDisplay ()
void LocalDisplayToDisplay (float & ,float &)
void DisplayToNormalizedDisplay (float & ,float &)
void NormalizedDisplayToViewport (float & ,float &)
void ViewportToNormalizedViewport (float & ,float &)
void NormalizedViewportToView (float & ,float & ,float &)
void ViewToWorld (float & ,float & ,float &)
void DisplayToLocalDisplay (float & ,float &)
void NormalizedDisplayToDisplay (float & ,float &)
void ViewportToNormalizedDisplay (float & ,float &)
void NormalizedViewportToViewport (float & ,float &)
void ViewToNormalizedViewport (float & ,float & ,float &)
void WorldToView (float & ,float & ,float &)
void AddActor2D (vtkActor2D *)
void RemoveActor2D (vtkActor2D *)
int *GetSize ()
int *GetOrigin ()

 

Detailed Method Descriptions:

Create a vtkViewport with a black background, a white ambient light, two-sided lighting turned on, a viewport of (0,0,1,1), and backface culling turned off.

void vtkViewport ()

Set/Get the background color of the rendering screen using an rgb color specification.

void SetBackground (float ,float ,float )
void SetBackground (float *)
float *GetBackground ()

Set the aspect ratio of the rendered image. This is computed automatically and should not be set by the user.

void SetAspect (float ,float )
void SetAspect (float *)
float *GetAspect ()

Specify the viewport for the Viewport to draw in the rendering window. Coordinates are expressed as (xmin,ymin,xmax,ymax), where each coordinate is 0 <= coordinate <="1.0."

void SetViewport (float ,float ,float ,float )
void SetViewport (float *)
float *GetViewport ()

Set/get a point location in display (or screen) coordinates. The lower left corner of the window is the origin and y increases as you go up the screen.

void SetDisplayPoint (float ,float ,float )
void SetDisplayPoint (float *)
float *GetDisplayPoint ()

Specify a point location in view coordinates. The origin is in the middle of the viewport and it extends from -1 to 1 in all three dimensions.

void SetViewPoint (float ,float ,float )
void SetViewPoint (float *)
float *GetViewPoint ()

Specify a point location in world coordinates. This method takes homogeneous coordinates.

void SetWorldPoint (float ,float ,float ,float )
void SetWorldPoint (float *)
float *GetWorldPoint ()

Return the center of this viewport in display coordinates.

float *GetCenter ()

Is a given display point in this Viewport's viewport.

int IsInViewport (int ,int )

Return the vtkWindow that owns this vtkViewport.

vtkWindow *GetVTKWindow ()

Specify a function to be called before rendering process begins. Function will be called with argument provided.

void SetStartRenderMethod (const )

Specify a function to be called when rendering process completes. Function will be called with argument provided.

void SetEndRenderMethod (const )

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

void SetStartRenderMethodArgDelete (const )
void SetEndRenderMethodArgDelete (const )

Convert display coordinates to view coordinates.

void DisplayToView ()

Convert view coordinates to display coordinates.

void ViewToDisplay ()

Convert world point coordinates to view coordinates.

void WorldToView ()

Convert view point coordinates to world coordinates.

void ViewToWorld ()

Convert display (or screen) coordinates to world coordinates.

void DisplayToWorld ()

Convert world point coordinates to display (or screen) coordinates.

void WorldToDisplay ()

These methods map from one coordinate system to another. They are primarily used by the vtkCoordinate object and are often strung together.

void LocalDisplayToDisplay (float & ,float &)
void DisplayToNormalizedDisplay (float & ,float &)
void NormalizedDisplayToViewport (float & ,float &)
void ViewportToNormalizedViewport (float & ,float &)
void NormalizedViewportToView (float & ,float & ,float &)
void ViewToWorld (float & ,float & ,float &)
void DisplayToLocalDisplay (float & ,float &)
void NormalizedDisplayToDisplay (float & ,float &)
void ViewportToNormalizedDisplay (float & ,float &)
void NormalizedViewportToViewport (float & ,float &)
void ViewToNormalizedViewport (float & ,float & ,float &)
void WorldToView (float & ,float & ,float &)

Add/Remove an Actor2D to this viewport.

void AddActor2D (vtkActor2D *)
void RemoveActor2D (vtkActor2D *)

Get the size and origin of the viewport in display coordinates

int *GetSize ()
int *GetOrigin ()