[vtkusers] correct use of vtkActor->SetPosition for translate + rotate
Sergio Aguirre
sergio.aguirre at gmail.com
Mon Mar 21 10:53:16 EDT 2011
Hi everyone
I am doing a small app that using a tracking system to interact with several
actors (2 to 3) in a render window.
Basically what I do is to:
1 - Set up a scene by placing each actor by using Actor->SetPosition() in
the place I want it to be. - (Actors appear to be placed correctly once I
render).
2 - The using a line I test for intersection points and if the do then I go
to step 3. - (I am able to point to the objects but once my code validates
the intersection its not necessarily in the in the place that I placed the
actor in step 1)
3 - Pass a 4x4 Matrix to the actor via Actor->PokeMatrix(), this is done in
a cycle. - (I am able to interact and rotate + translate the object). .
4 - Once I let the actor go, I cant "pick" it in the place I left it, I need
to go back to the coordinates where I picked it in step 2.
So my question is, if I am building a a scene:
a) - What is the correct method to place and control an actor's location?
b) - When passing a matrix via PokeMatrix do I need to "update" the actor or
make sure that all concatenations are done to be able to pick it where I
left it?
Hope you can suggest some sources for review.
Thank you,
Sergio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110321/10f130d0/attachment.htm>
More information about the vtkusers
mailing list