Documentation for vtkActor

vtkActor - represents an object (geometry & properties) in a rendered scene

Super Class: vtkProp

Description:

vtkActor is used to represent an entity in a rendering scene. It inherits functions related to the actors position, and orientation from vtkProp. The actor also has scaling and maintains a reference to the defining geometry (i.e., the mapper), rendering properties, and possibly a texture map. vtkActor combines these instance variables into one 4x4 transformation matrix as follows: [x y z 1] = [x y z 1] Translate(-origin) Scale(scale) Rot(y) Rot(x) Rot (z) Trans(origin) Trans(position)

 

See Also:

vtkProperty vtkTexture vtkMapper vtkActorDevice vtkAssembly vtkFollower vtkLODActor

 

Methods:

void vtkActor ()
void vtkActor ()
const char *GetClassName ()
void PrintSelf (unknown & ,vtkIndent )
static vtkActor *New ()
void Render (vtkRenderer *)
void Render (vtkRenderer * ,vtkMapper *)
void SetProperty (vtkProperty *)
vtkProperty *GetProperty ()
void SetBackfaceProperty (vtkProperty *)
vtkProperty *GetBackfaceProperty ()
void SetTexture (vtkTexture *)
vtkTexture *GetTexture ()
void SetMapper (vtkMapper *)
vtkMapper *GetMapper ()
void SetScale (float ,float ,float )
void SetScale (float *)
float *GetScale ()
void GetMatrix (vtkMatrix4x4 *)
float *GetBounds ()
void InitPartTraversal ()
vtkActor *GetNextPart ()
int GetNumberOfParts ()
void BuildPaths (vtkAssemblyPaths * ,vtkActorCollection *)
void ApplyProperties ()
void Update ()
unsigned long GetMTime ()
void SetAllocatedRenderTime (float )
float GetAllocatedRenderTime ()
void SetProperty (vtkProperty &)
void SetBackfaceProperty (vtkProperty &)
void GetMatrix (vtkMatrix4x4 &)

 

Detailed Method Descriptions:

Creates an actor with the following defaults: origin(0,0,0) position=(0,0,0) scale=(1,1,1) visibility=1 pickable=1 dragable=1 orientation=(0,0,0). No user defined matrix and no texture map.

static vtkActor *New ()

This causes the actor to be rendered. It in turn will render the actor's property, texture map and then mapper. If a property hasn't been assigned, then the actor will create one automatically. Note that a side effect of this method is that the

void Render (vtkRenderer *)
void Render (vtkRenderer * ,vtkMapper *)

Set/Get the property object that controls this actors surface properties. This should be an instance of a vtkProperty object. Every actor must have a property associated with it. If one isn't specified, then one will be generated automatically. Multiple actors can share one property object.

void SetProperty (vtkProperty *)
vtkProperty *GetProperty ()

Set/Get the property object that controls this actors backface surface properties. This should be an instance of a vtkProperty object. If one isn't specified, then the front face properties will be used. Multiple actors can share one property object.

void SetBackfaceProperty (vtkProperty *)
vtkProperty *GetBackfaceProperty ()

Set/Get the texture object to control rendering texture maps. This will be a vtkTexture object. An actor does not need to have an associated texture map and multiple actors can share one texture.

void SetTexture (vtkTexture *)
vtkTexture *GetTexture ()

This is the method that is used to connect an actor to the end of a visualization pipeline, i.e. the mapper. This should be a subclass of vtkMapper. Typically vtkPolyDataMapper and vtkDataSetMapper will be used.

void SetMapper (vtkMapper *)

Returns the Mapper that this actor is getting its data from.

vtkMapper *GetMapper ()

Set/Get the scale of the actor. Scaling in performed independently on the X, Y and Z axis. A scale of zero is illegal and will be replaced with one.

void SetScale (float ,float ,float )
void SetScale (float *)
float *GetScale ()

Get the matrix from the position, origin, scale and orientation This matrix is cached, so multiple GetMatrix() calls will be efficient.

void GetMatrix (vtkMatrix4x4 *)

Get the bounds for this Actor as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax). (The method GetBounds(float bounds[6]) is available from the superclass.)

float *GetBounds ()

Subclasses of vtkActor can be composed of one or more parts. A part is an actor or subclass of actor (e.g., vtkAssembly). The methods InitPartTraversal() and GetNextPart() allow you to get at the parts that compose the actor. To use these methods - first invoke InitPartTraversal() followed by repeated calls to GetNextPart(). GetNextPart() returns a NULL pointer when the list is exhausted. (These methods differ from the vtkAssembly::GetParts() method, which returns a list of the parts that are first level children of the assembly.)

void InitPartTraversal ()
vtkActor *GetNextPart ()
int GetNumberOfParts ()

Used to construct assembly paths and perform part traversal.

void BuildPaths (vtkAssemblyPaths * ,vtkActorCollection *)

Apply the current properties to all parts that compose this actor. This method is overloaded in vtkAssembly to apply the assemblies' properties to all its parts in a recursive manner. Typically the use of this method is to set the desired properties in the assembly, and then push the properties down to the assemblies parts with ApplyProperties().

void ApplyProperties ()

Update visualization pipeline and any other parts of actor that are necessary.

void Update ()

Get the actors mtime plus consider its properties, texture and usermatrix if set.

unsigned long GetMTime ()

The renderer may use the allocated rendering time to determine how to render this actor. (LOD Experiment) The set method is not a macro in order to avoid resetting the mtime of the actor - otherwise the actor would have been modified during every render.

void SetAllocatedRenderTime (float )
float GetAllocatedRenderTime ()

For legacy compatibility. Do not use.

void SetProperty (vtkProperty &)
void SetBackfaceProperty (vtkProperty &)