[vtkusers] correct use of vtkActor->SetPosition for translate + rotate
Dženan Zukić
dzenanz at gmail.com
Mon Mar 21 11:51:46 EDT 2011
If I remember correctly, actors have a few matrices. Are you changing the
right one? This might help:
http://public.kitware.com/pipermail/vtkusers/2009-August/102309.html
<http://public.kitware.com/pipermail/vtkusers/2009-August/102309.html>HTH
On Mon, Mar 21, 2011 at 15:53, Sergio Aguirre <sergio.aguirre at gmail.com>wrote:
> 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
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110321/7439c05e/attachment.htm>
More information about the vtkusers
mailing list