[vtkusers] Moving actors

Arun Srinivasan sakumar79 at hotmail.com
Wed May 7 14:59:23 EDT 2003


Hi,
   I am a beginner and I am a bit confused by the actor class. There seem to 
be three class members - Position, Center and Origin which are causing me 
confusion. What exactly are the purpose of the three?

What I am trying to do is the following:
   I am reading an actor from a file. Its extents are different from the 
dimensions of the new VTK world in which I am placing it, so I want to move 
and scale (down) the actor to suit the new world.

What I am doing is:
   I get the bounds of the actor, and I have determined how much to move 
(dx, dy, dz) and scale (s). I take the actor and set its position and origin 
to (center+dx, center+dy, center+dz) and then set the scale to s.

What I am getting is:
   When I try printing the extents, I get the following:
(s)               is 0.666667                                             
(Okay)
(dx, dy, dz)   is 107.5   -37.5   0                                   (Okay)

Initial Bounds is
-109.4  -105.3  37.1    39.7    0       0                           (Okay)
Bounds after setting Position to its own center
-216.75 -212.65 75.5    78.1    0       0                          (WHAT!!!)
Bounds after setting Position to move to center+(dx, dy, dz)
-72.7333        -70     25.9333 27.6667 0       0               (Again, 
What?!)

   Further, when I try to scale it later in the program, the actor doesnt 
scale visibly but moves (soon goes out of screen)

  Any help in figuring out the problem is appreciated...
Thanks in advance,
Arun K Srinivasan

_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail




More information about the vtkusers mailing list