[vtkusers] correct use of vtkActor->SetPosition for translate + rotate

Sergio Aguirre sergio.aguirre at gmail.com
Mon Mar 21 12:50:17 EDT 2011


Hi everyone

This is definitely a vtkOBBTree issue, I will start a new thread.

Thank you.

Sergio

2011/3/21 Sergio Aguirre <sergio.aguirre at gmail.com>

> Thanks for the reply.
>
> I had reviewed the link you sent and actually found that by passing my
> pointer matrix to the UserMatrix it had a odd offset when applying the
> rotations and translations that are (at least in my current implementation)
> done correctly by passing the matrix to PokeMatrix.
>
> I think my problem is more in the way I test for intersection by a line...
> I am using vtkOBBTree that takes vtkDataSet as an input and perhaps I am not
> updating the my actor's ivars to the (for example) vtkConeSource ivars.
>
> Will let you know in a few.
>
> Sergio
>
> 2011/3/21 Dženan Zukić <dzenanz at gmail.com>
>
>> 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/44f71518/attachment.htm>


More information about the vtkusers mailing list