Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

vtkViewport Class Reference

abstract specification for Viewports. More...

#include <vtkViewport.h>

Inheritance diagram for vtkViewport:

Inheritance graph
[legend]
Collaboration diagram for vtkViewport:

Collaboration graph
[legend]
List of all members.

Public Methods

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
void AddProp (vtkProp *)
vtkPropCollection * GetProps ()
void RemoveProp (vtkProp *)
void AddActor2D (vtkProp *p)
void RemoveActor2D (vtkProp *p)
vtkActor2DCollection * GetActors2D ()
virtual void SetBackground (float, float, float)
virtual void SetBackground (float[3])
virtual float * GetBackground ()
virtual void GetBackground (float data[3])
virtual void SetAspect (float, float)
void SetAspect (float[2])
virtual float * GetAspect ()
virtual void GetAspect (float data[2])
void ComputeAspect ()
virtual void SetViewport (float, float, float, float)
virtual void SetViewport (float[4])
virtual float * GetViewport ()
virtual void GetViewport (float data[4])
virtual void SetDisplayPoint (float, float, float)
virtual void SetDisplayPoint (float[3])
virtual float * GetDisplayPoint ()
virtual void GetDisplayPoint (float data[3])
void GetDisplayPoint (double *a)
virtual void SetViewPoint (float, float, float)
virtual void SetViewPoint (float[3])
virtual float * GetViewPoint ()
virtual void GetViewPoint (float data[3])
virtual void SetWorldPoint (float, float, float, float)
virtual void SetWorldPoint (float[4])
virtual float * GetWorldPoint ()
virtual void GetWorldPoint (float data[4])
void GetWorldPoint (double *a)
virtual float * GetCenter ()
virtual int IsInViewport (int x, int y)
virtual vtkWindow * GetVTKWindow ()=0
void SetStartRenderMethod (void(*f)(void *), void *arg)
void SetEndRenderMethod (void(*f)(void *), void *arg)
void SetStartRenderMethodArgDelete (void(*f)(void *))
void SetEndRenderMethodArgDelete (void(*f)(void *))
virtual void DisplayToView ()
virtual void ViewToDisplay ()
virtual void WorldToView ()
virtual void ViewToWorld ()
void DisplayToWorld ()
void WorldToDisplay ()
virtual void LocalDisplayToDisplay (float &x, float &y)
virtual void DisplayToNormalizedDisplay (float &u, float &v)
virtual void NormalizedDisplayToViewport (float &x, float &y)
virtual void ViewportToNormalizedViewport (float &u, float &v)
virtual void NormalizedViewportToView (float &x, float &y, float &z)
virtual void ViewToWorld (float &, float &, float &)
virtual void DisplayToLocalDisplay (float &x, float &y)
virtual void NormalizedDisplayToDisplay (float &u, float &v)
virtual void ViewportToNormalizedDisplay (float &x, float &y)
virtual void NormalizedViewportToViewport (float &u, float &v)
virtual void ViewToNormalizedViewport (float &x, float &y, float &z)
virtual void WorldToView (float &, float &, float &)
int * GetSize ()
int * GetOrigin ()
virtual vtkAssemblyPath * PickProp (float selectionX, float selectionY)=0
vtkAssemblyPath * PickPropFrom (float selectionX, float selectionY, vtkPropCollection *)
virtual float GetPickX ()
virtual float GetPickY ()
virtual int GetIsPicking ()
virtual float GetPickedZ ()=0

Static Public Methods

int IsTypeOf (const char *type)
vtkViewport * SafeDownCast (vtkObject *o)

Protected Methods

 vtkViewport ()
 ~vtkViewport ()
 vtkViewport (const vtkViewport &)
void operator= (const vtkViewport &)
virtual void DevicePickRender ()=0
virtual void StartPick (unsigned int pickFromSize)=0
virtual void UpdatePickId ()=0
virtual void DonePick ()=0
virtual unsigned int GetPickedId ()=0

Protected Attributes

vtkAssemblyPath * PickedProp
vtkPropCollection * PickFromProps
int IsPicking
unsigned int CurrentPickId
float PickX
float PickY
vtkPropCollection * Props
vtkActor2DCollection * Actors2D
vtkWindow * VTKWindow
float Background [3]
float Viewport [4]
float Aspect [2]
float Center [2]
unsigned long StartTag
unsigned long EndTag
int Size [2]
int Origin [2]
float DisplayPoint [3]
float ViewPoint [3]
float WorldPoint [4]

Detailed Description

abstract specification for Viewports.

Date:
2000/12/10 20:08:21
Revision:
1.30

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

Definition at line 68 of file vtkViewport.h.


Constructor & Destructor Documentation

vtkViewport::vtkViewport (    )  [protected]
 

vtkViewport::~vtkViewport (    )  [protected]
 

vtkViewport::vtkViewport (  const vtkViewport &    )  [inline, protected]
 

Definition at line 235 of file vtkViewport.h.


Member Function Documentation

virtual const char* vtkViewport::GetClassName (    )  [virtual]
 

Return the class name as a string. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

Reimplemented in vtkMesaRenderer, vtkOpenGLRenderer, vtkRenderer, vtkImager, vtkMesaImager, and vtkOpenGLImager.

int vtkViewport::IsTypeOf (  const char *    type )  [static]
 

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

Reimplemented in vtkMesaRenderer, vtkOpenGLRenderer, vtkRenderer, vtkImager, vtkMesaImager, and vtkOpenGLImager.

virtual int vtkViewport::IsA (  const char *    type )  [virtual]
 

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

Reimplemented in vtkMesaRenderer, vtkOpenGLRenderer, vtkRenderer, vtkImager, vtkMesaImager, and vtkOpenGLImager.

vtkViewport* vtkViewport::SafeDownCast (  vtkObject *    o )  [static]
 

Will cast the supplied object to vtkObject* is this is a safe operation (i.e., a safe downcast); otherwise NULL is returned. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

Reimplemented in vtkMesaRenderer, vtkOpenGLRenderer, vtkRenderer, vtkImager, vtkMesaImager, and vtkOpenGLImager.

void vtkViewport::PrintSelf (  ostream &    os,
vtkIndent    indent
)  [virtual]
 

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkObject.

Reimplemented in vtkMesaRenderer, vtkOpenGLRenderer, and vtkRenderer.

void vtkViewport::AddProp (  vtkProp *    ) 
 

Add a prop to the list of props. Prop is the superclass of all actors, volumes, 2D actors, composite props etc.

Referenced by vtkRenderer::AddActor(), and vtkRenderer::AddVolume().

vtkPropCollection* vtkViewport::GetProps (    )  [inline]
 

Return any props in this viewport.

Definition at line 79 of file vtkViewport.h.

void vtkViewport::RemoveProp (  vtkProp *    ) 
 

Remove an actor from the list of actors.

Referenced by vtkRenderer::RemoveActor(), and vtkRenderer::RemoveVolume().

void vtkViewport::AddActor2D (  vtkProp *    p )  [inline]
 

Add/Remove different types of props to the renderer. These methods are all synonyms to AddProp and RemoveProp. They are here for convenience and backwards compatibility.

Definition at line 87 of file vtkViewport.h.

void vtkViewport::RemoveActor2D (  vtkProp *    p ) 
 

vtkActor2DCollection* vtkViewport::GetActors2D (    ) 
 

virtual void vtkViewport::SetBackground (  float   ,
float   ,
float   
)  [virtual]
 

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

virtual void vtkViewport::SetBackground (  float   [3] )  [virtual]
 

virtual float* vtkViewport::GetBackground (    )  [virtual]
 

virtual void vtkViewport::GetBackground (  float    data[3] )  [virtual]
 

virtual void vtkViewport::SetAspect (  float   ,
float   
)  [virtual]
 

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

void vtkViewport::SetAspect (  float   [2] ) 
 

virtual float* vtkViewport::GetAspect (    )  [virtual]
 

virtual void vtkViewport::GetAspect (  float    data[2] )  [virtual]
 

void vtkViewport::ComputeAspect (    ) 
 

virtual void vtkViewport::SetViewport (  float   ,
float   ,
float   ,
float   
)  [virtual]
 

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.

virtual void vtkViewport::SetViewport (  float   [4] )  [virtual]
 

virtual float* vtkViewport::GetViewport (    )  [virtual]
 

virtual void vtkViewport::GetViewport (  float    data[4] )  [virtual]
 

virtual void vtkViewport::SetDisplayPoint (  float   ,
float   ,
float   
)  [virtual]
 

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.

virtual void vtkViewport::SetDisplayPoint (  float   [3] )  [virtual]
 

virtual float* vtkViewport::GetDisplayPoint (    )  [virtual]
 

virtual void vtkViewport::GetDisplayPoint (  float    data[3] )  [virtual]
 

void vtkViewport::GetDisplayPoint (  double *    a )  [inline]
 

Definition at line 113 of file vtkViewport.h.

virtual void vtkViewport::SetViewPoint (  float   ,
float   ,
float   
)  [virtual]
 

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.

virtual void vtkViewport::SetViewPoint (  float   [3] )  [virtual]
 

virtual float* vtkViewport::GetViewPoint (    )  [virtual]
 

virtual void vtkViewport::GetViewPoint (  float    data[3] )  [virtual]
 

virtual void vtkViewport::SetWorldPoint (  float   ,
float   ,
float   ,
float   
)  [virtual]
 

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

virtual void vtkViewport::SetWorldPoint (  float   [4] )  [virtual]
 

virtual float* vtkViewport::GetWorldPoint (    )  [virtual]
 

virtual void vtkViewport::GetWorldPoint (  float    data[4] )  [virtual]
 

void vtkViewport::GetWorldPoint (  double *    a )  [inline]
 

Definition at line 131 of file vtkViewport.h.

virtual float* vtkViewport::GetCenter (    )  [virtual]
 

Return the center of this viewport in display coordinates.

virtual int vtkViewport::IsInViewport (  int    x,
int    y
)  [virtual]
 

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

virtual vtkWindow* vtkViewport::GetVTKWindow (    )  [pure virtual]
 

Return the vtkWindow that owns this vtkViewport.

Reimplemented in vtkRenderer, and vtkImager.

void vtkViewport::SetStartRenderMethod (  void(*    f)(void *),
void *    arg
) 
 

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

void vtkViewport::SetEndRenderMethod (  void(*    f)(void *),
void *    arg
) 
 

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

void vtkViewport::SetStartRenderMethodArgDelete (  void(*    f)(void *) ) 
 

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

void vtkViewport::SetEndRenderMethodArgDelete (  void(*    f)(void *) ) 
 

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

virtual void vtkViewport::DisplayToView (    )  [virtual]
 

Convert display coordinates to view coordinates.

virtual void vtkViewport::ViewToDisplay (    )  [virtual]
 

Convert view coordinates to display coordinates.

virtual void vtkViewport::WorldToView (    )  [virtual]
 

Convert world point coordinates to view coordinates.

Reimplemented in vtkRenderer.

virtual void vtkViewport::ViewToWorld (    )  [virtual]
 

Convert view point coordinates to world coordinates.

Reimplemented in vtkRenderer.

void vtkViewport::DisplayToWorld (    )  [inline]
 

Convert display (or screen) coordinates to world coordinates.

Definition at line 175 of file vtkViewport.h.

void vtkViewport::WorldToDisplay (    )  [inline]
 

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

Definition at line 178 of file vtkViewport.h.

virtual void vtkViewport::LocalDisplayToDisplay (  float &    x,
float &    y
)  [virtual]
 

These methods map from one coordinate system to another. They are primarily used by the vtkCoordinate object and are often strung together. These methods return valid information only if the window has been realized (e.g., GetSize() returns something other than (0,0)).

virtual void vtkViewport::DisplayToNormalizedDisplay (  float &    u,
float &    v
)  [virtual]
 

virtual void vtkViewport::NormalizedDisplayToViewport (  float &    x,
float &    y
)  [virtual]
 

virtual void vtkViewport::ViewportToNormalizedViewport (  float &    u,
float &    v
)  [virtual]
 

virtual void vtkViewport::NormalizedViewportToView (  float &    x,
float &    y,
float &    z
)  [virtual]
 

virtual void vtkViewport::ViewToWorld (  float &    wx,
float &    wy,
float &    wz
)  [inline, virtual]
 

Reimplemented in vtkRenderer.

Definition at line 190 of file vtkViewport.h.

virtual void vtkViewport::DisplayToLocalDisplay (  float &    x,
float &    y
)  [virtual]
 

virtual void vtkViewport::NormalizedDisplayToDisplay (  float &    u,
float &    v
)  [virtual]
 

virtual void vtkViewport::ViewportToNormalizedDisplay (  float &    x,
float &    y
)  [virtual]
 

virtual void vtkViewport::NormalizedViewportToViewport (  float &    u,
float &    v
)  [virtual]
 

virtual void vtkViewport::ViewToNormalizedViewport (  float &    x,
float &    y,
float &    z
)  [virtual]
 

virtual void vtkViewport::WorldToView (  float &    wx,
float &    wy,
float &    wz
)  [inline, virtual]
 

Reimplemented in vtkRenderer.

Definition at line 196 of file vtkViewport.h.

int* vtkViewport::GetSize (    ) 
 

Get the size and origin of the viewport in display coordinates. Note: if the window has not yet been realized, GetSize() and GetOrigin() return (0,0).

int* vtkViewport::GetOrigin (    ) 
 

virtual vtkAssemblyPath* vtkViewport::PickProp (  float    selectionX,
float    selectionY
)  [pure virtual]
 

Return the Prop that has the highest z value at the given x, y position in the viewport. Basically, the top most prop that renders the pixel at selectionX, selectionY will be returned. If no Props are there NULL is returned. This method selects from the Viewports Prop list.

Reimplemented in vtkRenderer, and vtkImager.

vtkAssemblyPath* vtkViewport::PickPropFrom (  float    selectionX,
float    selectionY,
vtkPropCollection *   
) 
 

Same as PickProp with two arguments, but selects from the given collection of Props instead of the Renderers props. Make sure the Props in the collection are in this renderer.

virtual float vtkViewport::GetPickX (    )  [virtual]
 

Methods used to return the pick (x,y) in local display coordinates (i.e., it's that same as selectionX and selectionY).

virtual float vtkViewport::GetPickY (    )  [virtual]
 

virtual int vtkViewport::GetIsPicking (    )  [virtual]
 

virtual float vtkViewport::GetPickedZ (    )  [pure virtual]
 

Return the Z value for the last picked Prop.

Reimplemented in vtkMesaRenderer, vtkOpenGLRenderer, and vtkImager.

void vtkViewport::operator= (  const vtkViewport &    )  [inline, protected]
 

Definition at line 236 of file vtkViewport.h.

virtual void vtkViewport::DevicePickRender (    )  [protected, pure virtual]
 

Reimplemented in vtkMesaRenderer, vtkOpenGLRenderer, and vtkImager.

virtual void vtkViewport::StartPick (  unsigned int    pickFromSize )  [protected, pure virtual]
 

Reimplemented in vtkMesaRenderer, vtkOpenGLRenderer, and vtkImager.

virtual void vtkViewport::UpdatePickId (    )  [protected, pure virtual]
 

Reimplemented in vtkMesaRenderer, vtkOpenGLRenderer, and vtkImager.

virtual void vtkViewport::DonePick (    )  [protected, pure virtual]
 

Reimplemented in vtkMesaRenderer, vtkOpenGLRenderer, and vtkImager.

virtual unsigned int vtkViewport::GetPickedId (    )  [protected, pure virtual]
 

Reimplemented in vtkMesaRenderer, vtkOpenGLRenderer, and vtkImager.


Member Data Documentation

vtkAssemblyPath* vtkViewport::PickedProp [protected]
 

Definition at line 254 of file vtkViewport.h.

vtkPropCollection* vtkViewport::PickFromProps [protected]
 

Definition at line 255 of file vtkViewport.h.

int vtkViewport::IsPicking [protected]
 

Definition at line 257 of file vtkViewport.h.

unsigned int vtkViewport::CurrentPickId [protected]
 

Definition at line 258 of file vtkViewport.h.

float vtkViewport::PickX [protected]
 

Definition at line 259 of file vtkViewport.h.

float vtkViewport::PickY [protected]
 

Definition at line 260 of file vtkViewport.h.

vtkPropCollection* vtkViewport::Props [protected]
 

Definition at line 263 of file vtkViewport.h.

vtkActor2DCollection* vtkViewport::Actors2D [protected]
 

Definition at line 264 of file vtkViewport.h.

vtkWindow* vtkViewport::VTKWindow [protected]
 

Definition at line 265 of file vtkViewport.h.

float vtkViewport::Background[3] [protected]
 

Definition at line 266 of file vtkViewport.h.

float vtkViewport::Viewport[4] [protected]
 

Definition at line 267 of file vtkViewport.h.

float vtkViewport::Aspect[2] [protected]
 

Definition at line 268 of file vtkViewport.h.

float vtkViewport::Center[2] [protected]
 

Definition at line 269 of file vtkViewport.h.

unsigned long vtkViewport::StartTag [protected]
 

Definition at line 271 of file vtkViewport.h.

unsigned long vtkViewport::EndTag [protected]
 

Definition at line 272 of file vtkViewport.h.

int vtkViewport::Size[2] [protected]
 

Definition at line 274 of file vtkViewport.h.

int vtkViewport::Origin[2] [protected]
 

Definition at line 275 of file vtkViewport.h.

float vtkViewport::DisplayPoint[3] [protected]
 

Definition at line 276 of file vtkViewport.h.

float vtkViewport::ViewPoint[3] [protected]
 

Definition at line 277 of file vtkViewport.h.

float vtkViewport::WorldPoint[4] [protected]
 

Definition at line 278 of file vtkViewport.h.


The documentation for this class was generated from the following file:
Generated on Wed Nov 21 13:01:31 2001 for VTK by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001