[vtkusers] Can't move vtkAxesActor with vtkInteractorStyleTrackballActor

David Doria daviddoria+vtk at gmail.com
Tue Jan 12 08:39:44 EST 2010


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



More information about the vtkusers mailing list