Documentation for vtkRenderer

vtkRenderer - abstract specification for renderers

Super Class: vtkViewport

Description:

vtkRenderer provides an abstract specification for renderers. A renderer 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. vtkRenderer 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:

vtkRenderWindow vtkActor vtkCamera vtkLight vtkVolume vtkRayCaster

 

Methods:

void vtkRenderer ()
void vtkRenderer ()
const char *GetClassName ()
void PrintSelf (unknown & ,vtkIndent )
static vtkRenderer *New ()
void AddLight (vtkLight *)
void AddActor (vtkActor *)
void AddVolume (vtkVolume *)
void RemoveLight (vtkLight *)
void RemoveActor (vtkActor *)
void RemoveVolume (vtkVolume *)
vtkLightCollection *GetLights ()
void SetActors (vtkActorCollection *)
vtkActorCollection *GetActors ()
vtkVolumeCollection *GetVolumes ()
void SetActiveCamera (vtkCamera *)
vtkCamera *GetActiveCamera ()
void AddCuller (vtkCuller *)
void RemoveCuller (vtkCuller *)
vtkCullerCollection *GetCullers ()
void SetAmbient (float ,float ,float )
void SetAmbient (float *)
float *GetAmbient ()
void SetAllocatedRenderTime (float )
float GetAllocatedRenderTime ()
void Render ()
void DeviceRender ()
int UpdateActors ()
int UpdateVolumes ()
int UpdateCameras ()
int UpdateLights ()
int VisibleActorCount ()
int VisibleVolumeCount ()
void CreateLight ()
void ResetCamera ()
void ResetCamera (float )
void ResetCamera (float ,float ,float ,float ,float ,float )
void SetRenderWindow (vtkRenderWindow *)
vtkRenderWindow *GetRenderWindow ()
vtkWindow *GetVTKWindow ()
int GetTwoSidedLighting ()
void SetTwoSidedLighting (int )
void TwoSidedLightingOn ()
void TwoSidedLightingOff ()
void SetBackingStore (int )
int GetBackingStore ()
void BackingStoreOn ()
void BackingStoreOff ()
void WorldToView ()
void ViewToWorld ()
void ViewToWorld (float & ,float & ,float &)
void WorldToView (float & ,float & ,float &)
vtkRayCaster *GetRayCaster ()
float GetZ (int ,int )
void Render2D ()
unsigned long GetMTime ()
float GetLastRenderTimeInSeconds ()
void UnRegister (vtkObject *)

 

Detailed Method Descriptions:

Create a vtkRenderer 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.

static vtkRenderer *New ()

Add a light to the list of lights.

void AddLight (vtkLight *)

Add an actor to the list of actors.

void AddActor (vtkActor *)

Add a volume to the list of volumes.

void AddVolume (vtkVolume *)

Remove a light from the list of lights.

void RemoveLight (vtkLight *)

Remove an actor from the list of actors.

void RemoveActor (vtkActor *)

Remove a volume from the list of volumes.

void RemoveVolume (vtkVolume *)

Return the collection of lights.

vtkLightCollection *GetLights ()

Set / get the collection of actors.

void SetActors (vtkActorCollection *)
vtkActorCollection *GetActors ()

Return the collection of volumes.

vtkVolumeCollection *GetVolumes ()

Specify the camera to use for this renderer.

void SetActiveCamera (vtkCamera *)

Get the current camera.

vtkCamera *GetActiveCamera ()

Add an culler to the list of cullers.

void AddCuller (vtkCuller *)

Remove an actor from the list of cullers.

void RemoveCuller (vtkCuller *)

Return the collection of cullers.

vtkCullerCollection *GetCullers ()

Set the intensity of ambient lighting.

void SetAmbient (float ,float ,float )
void SetAmbient (float *)
float *GetAmbient ()

Set/Get the amount of time this renderer is allowed to spend rendering its scene. This is used by vtkLODActor's.

void SetAllocatedRenderTime (float )
float GetAllocatedRenderTime ()

Create an image. This is a superclass method which will in turn call the DeviceRender method of Subclasses of vtkRenderer

void Render ()

Create an image. Subclasses of vtkRenderer must implement this method.

void DeviceRender ()

Ask all actors to build and draw themselves. Returns the number of actors processed.

int UpdateActors ()

Ask the volumes to build and draw themselves. Returns the number of volumes processed.

int UpdateVolumes ()

Ask the active camera to do whatever it needs to do prior to rendering. Creates a camera if none found active.

int UpdateCameras ()

Ask all lights to load themselves into rendering pipeline. This method will return the actual number of lights that were on.

int UpdateLights ()

Returns the number of visible actors.

int VisibleActorCount ()

Returns the number of visible volumes.

int VisibleVolumeCount ()

Create and add a light to renderer.

void CreateLight ()

Automatically set up the camera based on the visible actors. The camera will reposition itself to view the center point of the actors, and move along its initial view plane normal (i.e., vector defined from camera position to focal point) so that all of the actors can be seen.

void ResetCamera ()

Automatically set up the camera based on a specified bounding box (xmin,xmax, ymin,ymax, zmin,zmax). Camera will reposition itself so that its focal point is the center of the bounding box, and adjust its distance and position to preserve its initial view plane normal (i.e., vector defined from camera position to focal point). Note: is the view plane is parallel to the view up axis, the view up axis will be reset to one of the three coordinate axes.

void ResetCamera (float )

Alternative version of ResetCamera(bounds[6]);

void ResetCamera (float ,float ,float ,float ,float ,float )

Specify the rendering window in which to draw. This is automatically set when the renderer is created by MakeRenderer. The user probably shouldn't ever need to call this method.

void SetRenderWindow (vtkRenderWindow *)
vtkRenderWindow *GetRenderWindow ()
vtkWindow *GetVTKWindow ()

Turn on/off two-sided lighting of surfaces. If two-sided lighting is off, then only the side of the surface facing the light(s) will be lit, and the other side dark. If two-sided lighting on, both sides of the surface will be lit.

int GetTwoSidedLighting ()
void SetTwoSidedLighting (int )
void TwoSidedLightingOn ()
void TwoSidedLightingOff ()

Turn on/off using backing store. This may cause the re-rendering time to be slightly slower when the view changes. But it is much faster when the image has not changed, such as during an expose event.

void SetBackingStore (int )
int GetBackingStore ()
void BackingStoreOn ()
void BackingStoreOff ()

Convert world point coordinates to view coordinates.

void WorldToView ()

Convert view point coordinates to world coordinates.

void ViewToWorld ()
void ViewToWorld (float & ,float & ,float &)

Convert world point coordinates to view coordinates.

void WorldToView (float & ,float & ,float &)

Return the RayCaster being used by this renderer.

vtkRayCaster *GetRayCaster ()

Given a pixel location, return the Z value

float GetZ (int ,int )

Render the 2D actors.

void Render2D ()

Return the MTime of the renderer also considering its ivars.

unsigned long GetMTime ()

Get the time required, in seconds, for the last Render call.

float GetLastRenderTimeInSeconds ()

Detects reference loop renderer<->rayCaster

void UnRegister (vtkObject *)