How to freeze an actor in the render and not rotate with the other actors.

Hi, is there any mechanism to tell the render/Actor not to update the position of an actor inside the render when I rotate?

For example, I have 8 sphere actors forming a cube (one sphere per vertex) when I rotate the scene, each sphere stays in its vertex keeping the cube structure intact. Is there a way to tell one of those spheres not to rotate together with the rest? i.e. to stay still where it was and therefore the cube would remain without one of the spheres in its vertices when I rotate it.

thx!

1 Like

Hello,

Do you mean rotation of the scene with the mouse or with a transform?

regards,

Paulo

Hi Paulo,

I mean rotation of the scene with the mouse

regards!

Hello,

Which interactor style class are you using?

best,

PC

Hi Paulo,

i’m using public class MyInteractorStyle : vtkInteractorStyleTrackballCamera

regards!

Hello,

The problem is that that interactor style transforms the camera, not the objects. When you drag the mouse to rotate the scene, you’re actually orbiting the camera around the focal point, not the scene’s geometry. Then you have to decide whether to stick with your current interactor style or choose another one that better fits changing the actors. I believe you could consider subclassing vtkInteractorStyleTrackballActor instead.

take care,

PC

1 Like

Thank you very much Paulo