[vtkusers] vtkFollower doesn't work in VTK4?

Chen, Elvis anisotropic7 at yahoo.ca
Fri Feb 15 16:33:21 EST 2002


greetings,

I'm trying to display a labeled axes so that my users
can get some visual cue.  Each axis is labeled as
x/y/z-axis respectively.  For the labeling, I use
vtkVectorText for the text itself, and use
vtkFollower() for the actor.

The problem is, the text doesn't really fact the
camera even vtkFollower dictates it to.  The script is
listed below.  What am I doing wrong?

I'm using VTK 4.0 (release Candidate) and Python 2.2

thx in advance,


ztext = vtkVectorText()
ztext.SetText( 'Z-axis' )
ztextMapper = vtkPolyDataMapper()
ztextMapper.SetInput( ztext.GetOutput() )
ztextActor = vtkFollower()
ztextActor.SetMapper( ztextMapper )
ztextActor.AddPosition( 0, 0, 70 )
ztextActor.SetScale( 7., 7., 7. )


# add all the actors
ren.AddActor( ztextActor )

# setup Camera
ren.GetActiveCamera().SetPosition( 0.0, -250.0, 15.0 )
ren.GetActiveCamera().SetFocalPoint( 0.0, 0.0, 15.0 )
ren.GetActiveCamera().SetViewUp( 0.0, 0.0, 1.0 )
ren.GetActiveCamera().ComputeViewPlaneNormal()


______________________________________________________________________ 
Web-hosting solutions for home and business! http://website.yahoo.ca



More information about the vtkusers mailing list