Man Page for vtkActor
Table of Contents

NAME

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

SYNOPSIS


#include "/opt/vtk-c++/graphics/vtkActor.h"

class VTK_EXPORT vtkActor : public vtkProp

vtkActor();
~vtkActor();
static vtkActor *New();
const char *GetClassName() {return "vtkActor";};
void PrintSelf(ostream& os, vtkIndent indent);
virtual void Render(vtkRenderer *ren);
virtual void Render(vtkRenderer *, vtkMapper *) {};
vtkActor &operator=(const vtkActor& actor);
void SetProperty(vtkProperty *lut);
void SetProperty(vtkProperty& lut) {this->SetProperty(&lut);};
vtkProperty *GetProperty();
void SetBackfaceProperty(vtkProperty *lut);
void SetBackfaceProperty(vtkProperty& lut) {this->SetBackfaceProperty(&lut);};
vtkProperty *GetBackfaceProperty();
void SetTexture(vtkTexture*);
void SetTexture(vtkTexture& );
vtkTexture *GetTexture();
void SetMapper(vtkMapper*);
void SetMapper(vtkMapper& );
vtkMapper *GetMapper();
void SetUserMatrix(vtkMatrix4x4*);
void SetUserMatrix(vtkMatrix4x4& );
vtkMatrix4x4 *GetUserMatrix();
void SetScale(float, float, float);
void SetScale(float *);
float *GetScale();
void GetScale(float data[3]);
void GetMatrix(vtkMatrix4x4& m);
float *GetBounds();
virtual void InitPartTraversal() {this->TraversalLocation = 0;};
virtual vtkActor *GetNextPart();
virtual int GetNumberOfParts() {return 1;};
virtual void BuildPaths(vtkAssemblyPaths *paths, vtkActorCollection *path);
virtual void Update();
unsigned long int GetMTime(); overload superclasses' implementation

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

SUMMARY

void SetTexture(vtkTexture*)
void SetTexture(vtkTexture& )
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. 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 SetMapper(vtkMapper*)
void SetMapper(vtkMapper& )
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.

vtkMapper *GetMapper()
Returns the Mapper that this actor is getting its data from.

void SetUserMatrix(vtkMatrix4x4*)
void SetUserMatrix(vtkMatrix4x4& )
In addition to the instance variables such as position and orientation, you can specify your own 4x4 transformation matrix that will get concatenated with the actor's 4x4 matrix as determined by the other instance variables. If the other instance variables such as position and orientation are left with their default values then they will result in the identity matrix. And the resulting matrix will be the user defined matrix.

void SetScale(float, float, float)
void SetScale(float *)
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.

virtual void InitPartTraversal() {this->TraversalLocation = 0;};
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.)

virtual void BuildPaths(vtkAssemblyPaths *paths, vtkActorCollection *path);
Used to construct assembly paths and perform part traversal.

virtual void Update();
Update visualization pipeline and any other parts of actor that are necessary.

vtkActor()
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.

vtkActor& operator=(const vtkActor& actor)
Shallow copy of an actor.

void Render(vtkRenderer *ren)
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 visualization network is updated.

void GetMatrix(vtkMatrix4x4& result)
Copy the actor's composite 4x4 matrix into the matrix provided.

float *GetBounds()
Get the bounds for this Actor as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).

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


Table of Contents