Previous

Section

<<<

Isosurface Generation using VTK

Next

Section

>>>

VTK Basics

 

 

3.4.1.1. vtkActor / vtkLODActor Functions

Below are the functions used to configure the actor objects. When there are functions that are only available to either vtkActor or vtkLODActor, that information will be listed. Remember, vtkLODActor has vtkActor as a superclass.

 

  • void SetMapper( vtkMapper * )

     This function sets as the mapper that should be used for this actor. Looking back to the pipeline for this tutorial, the mapper set to this actor will be of type vtkPolyDataMapper.

 

  • vtkLODActor: void SetNumberOfCloudPoints( int )

        The above function will set the number of random cloud points as a lower level of detail when the full geometry cannot be displayed. One could say that any valid integer would work here. For this tutorial, 1000000 (one million) will be used since there will only be two actors in the renderer.

  • vtkProperty * GetProperty().SetColor( float r, float g, float b )

        This is one of those cascading function calls that seem to work best in this context. It is necessary to retrieve the property object from the actor object. Since it seems kind of a waste to store a whole vtkProperty object just to make some simple adjustments, the cascaded function call is used to make the return object temporary. Yet since a pointer object is returned, despite the fact that the vtkProperty object gets destroyed, the changes are made to the appropriate vtkActor or vtkLODActor object. Here, the vtkProperty being adjusted is RGB color. Remember, the floating-point range of values is just 0 to 1, with 0 being the absence of the color component and 1 being the full presence of the color component. If for some reason, whatever setting applied here does not work, remember to make sure that the call SetScalarVisibilityOff() was called on the vtkPolyDataMapper.

 

  • vtkProperty * GetProperty().SetOpacity( float )

        This is one of those cascading function calls that seem to work best in this context. For an explanation on why cascading function calls are used, view the argument above. Here, the vtkProperty being adjusted is amount of opacity. The floating-point range of values is just 0 to 1, with 0 making the object completely transparent, and 1 making the object completely opaque (non-transparent). As state above, if for some reason, whatever setting applied here does not work, remember to make sure that the call SetScalarVisibilityOff() was called on the vtkPolyDataMapper.

 

 

<<< Previous

vtkActor / vtkLODActor

 

Table of Contents

 

Next >>>

vtkRenderer