[vtkusers] Can't move vtkAxesActor with vtkInteractorStyleTrackballActor

Karthik Krishnan karthik.krishnan at kitware.com
Mon Jan 11 06:34:52 EST 2010


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.


On Sun, Jan 10, 2010 at 3:59 PM, David Doria <daviddoria+vtk at gmail.com> wrote:
> If I use vtkInteractorStyleTrackballActor:
>
>  vtkSmartPointer<vtkInteractorStyleTrackballActor> style =
>      vtkSmartPointer<vtkInteractorStyleTrackballActor>::New(); //like paraview
>
>  renderWindowInteractor->SetInteractorStyle( style );
>
> I can move/rotate a normal actor:
>
>  vtkSmartPointer<vtkConeSource> coneSource =
> vtkSmartPointer<vtkConeSource>::New();
>  vtkSmartPointer<vtkPolyDataMapper> coneMapper =
> vtkSmartPointer<vtkPolyDataMapper>::New();
>  coneMapper->SetInput(coneSource->GetOutput());
>  vtkSmartPointer<vtkActor> coneActor = vtkSmartPointer<vtkActor>::New();
>  coneActor->SetMapper(coneMapper);
>  renderer->AddActor(coneActor);
>
> But I can't move/rotate an AxesActor:
>
> vtkSmartPointer<vtkAxesActor> axes = vtkSmartPointer<vtkAxesActor>::New();
> renderer->AddActor(axes);
>
> Anyone know why this might be?
>
> I tried setting:
> axes->DragableOn();
>
> but it appears 'true' is the default value, so that didn't change anything.
>
> 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
>



More information about the vtkusers mailing list