[vtkusers] Animating via X,Y,Z angles

John Washbourne jwashbourne at corelab.com
Wed Dec 12 17:39:39 EST 2001


Greetings all,

I have not watched this list for some time (since a brief
involvement with the never dying topic of segmentation some
years ago), but I resubscribed, and it is great to see VTK going
strong. I need some help with key frame animation.

I do most of my animation using geomview, which does a fine job
of textured surface rendering, and I have several homegrown apps
I use to do key frame animations with geomview's control
language. Some recent work I am doing requires volume rendering
tools, and I have dusted off some old vtk codes and downloaded
the latest (non CVS) version 3.2. I have been using the
UserMethod of RenderWindowInteractor to do some key frame
animation via camera azimuth, elevation, roll, and zoom calls,
but this does not allow me to straightforwardly re-use
parameters from my geomview animations. I am sure that VTK has
the functionality I am used to, I just need some pointers
please.

In geomview I can specify the object about which I want to
translate/rotate, the center of translation/rotation, the frame
of reference for translation/rotation, and then give
(simultaneous) rotations for X, Y, and Z. Normally the way I do
animations the object is "world" (the collection of all geometry
objects), the center of rotation is also "world", and the frame
of reference is the camera. Thus the collection of all objects
rotates about its own center and I  use camera "normalized"
coordinates. One nice side effect of rotating the objects not
the camera is you dont have to recompute ViewUp and etc, etc
(although clipping might be a problem with excessive
translation).

Now for VTK: the camera methods azimuth and elevation have some
of the functionality I need, rotation around the focal point,
but lack X,Y,Z equivalents. I do know that if I only had a
single actor, I could use the methods from vtkProp3D to RotateX,
RotateY, and RotateZ and (I think) get the same results. However
what I need is a vtkProp3D that applies to the collection of all
actors, as rotating/translating them individually is clearly not
the same. It appears that the ApplyProperties method of
vtkActorCollection is almost there, but lacks the X,Y,Z
rotations from vtkProp3D. I am sure that I am missing something
obvious with regards to rotation/translation of a collections of
actors, and your help will be greatly appreciated. I get the
feeling I should be looking at vtkAssembly (although the notes
say it is slower than lists of actors).

As an farfield aside regarding configuration and compilation of
vtk 4.0, it seems to me that the configuration is an incredible
nightmare compared to the older methods of user.make and the
configure script. Before anyone gets offended, I know zero about
ccmake and there are surely some tricks to make the process more
smoothly satisfying. To be truthful, I dont hope to ever learn
about ccmake but I do see its usefulness regarding cross
platformitivity.

Cheers and thanks in advance for any help.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jwashbourne.vcf
Type: text/x-vcard
Size: 293 bytes
Desc: Card for John Washbourne
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20011212/b6195f52/attachment.vcf>


More information about the vtkusers mailing list