Translation and Rotation an object in VTK

Hi everyoone!
I want to translate an object along with the object’s axises (X, Y, Z) and also rotate it along the cycles around X, Y and Z axises. My interactor is QVTKInteractor not renderWindowInteractor(I mean I want to render it on OpenGL Widget in Qt). the picture of what I want is attached here.

Sorry, do you know anybody who can answer my question?
@mwestphal

@charly_bollinger

Hello @kimia_ghodoosi,

I’m not sure to fully understand what you mean about interactors. If you want to interact with what is rendered in the VTK window, you’ve got to use VTK tools for that. In other words, to interact with VTK data, you need to use VTK widgets that are attached to the render window interactor. Indeed, when interacting with VTK, if you can interact with a widget, it will first tries to interact through the widget, and if no valid action is available, it will fallback on the default behavior of the interactor.

A widget that could be useful for rotating your data is the recently added vtkOrientationWidget. An example of its use is provided in the Interaction/Widgets/Testing/Cxx/ directory.
For the translating part, I’m not aware of this kind of widget. It could easily be added though, the same way the rotation one was added.