[vtkusers] Can't move vtkAxesActor with vtkInteractorStyleTrackballActor

David Doria daviddoria+vtk at gmail.com
Tue Jan 12 09:20:26 EST 2010


On Tue, Jan 12, 2010 at 8:52 AM, Francois Bertel
<francois.bertel at kitware.com> wrote:
> If you look at the hierarchy of vtkProp, you'll see vtkPropAssembly
> and vtkAssembly.
>
> On Tue, Jan 12, 2010 at 8:39 AM, David Doria <daviddoria+vtk at gmail.com> wrote:
>> On Tue, Jan 12, 2010 at 7:57 AM, Dean Inglis <dean.inglis at camris.ca> wrote:
>>>
>>> David,
>>>
>>> I havent tried this, but you can get all the actors that comprise
>>> the vtkAxesActor in a vtkPropCollection and then maybe(?) transform
>>> them one by one or as a whole.  You can also set a UserTransform
>>> through the vtkProp3D API.
>>>
>>> Dean
>>>
>>> On Mon, Jan 11, 2010 at 6:34 AM, Karthik Krishnan
>>> <karthik.krishnan at kitware.com> wrote:
>>>>
>>>> The right way to modify the axes actor is to modify the camera. That's
>>>> its purpose (to follow the camera).
>>>> The trackball actor interactor style doesn't rotate the camera. It
>>>> simply changes the transform associated with individual actors as you
>>>> interact with them.
>>>>
>>>
>>> Karthik,
>>>
>>> Yes, that's what I was trying to do - change the transform of the axes
>>> actor as I interact with it. I was trying to use it to represent
>>> "positioning and aiming" a "camera" in my scene.
>>>
>>> Is there a better tool to do this? Or is there a way to "unlock" the
>>> axes actor so it will move with the trackballActor interactor?
>>>
>>> Thanks,
>>>
>>> David
>>
>> Dean -
>>
>> I see, so basically we are trying to convert an AxesActor back to a
>> normal actor that looks like an axes.
>>
>> This function already exists:
>> vtkSmartPointer<vtkPropCollection> movableAxes =
>> vtkSmartPointer<vtkPropCollection>::New();
>> axes->GetActors (movableAxes);
>>
>> But I can't do this:
>> renderer->AddActor(movableAxes);
>>
>> because it only accepts a vtkProp, not a vtkPropCollection. Is there a
>> way to combine all the props in a propCollection into a single
>> prop/actor?
>>
>> Thanks,
>>
>> David
>> _______________________________________________
>> 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
>>
>
>
>
> --
> François Bertel, PhD  | Kitware Inc. Suite 204
> 1 (518) 371 3971 x113 | 28 Corporate Drive
>                      | Clifton Park NY 12065, USA
> _______________________________________________
> 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
>

Ok I've extracted the parts of the axes as Dean suggested - then I've
re-assembled them as Francois suggested:

http://www.cmake.org/Wiki/VTK/Examples/MovableAxes

But I still cannot move them. Any thoughts?

David



More information about the vtkusers mailing list