I am working on a school project about using VTK to draw a roller bearing. As you know, when the bearing is rotating, the roller is similar to pure rolling, it can be shown as rotation and revolution of the roller around the origin (0,0,0).
I modified the VTK sample ’ VTKExamples/site/Cxx/Animation/RotatingSphere’, trying to do this rotation and revolution, but I failed several times. From the user’s guide and my experiments, it shows out that SetOrigin will be done first, wherever it is, like this sample:
if (TimerCount < 180)
Actor4->SetOrigin(0, 0, 3.75);
Actor4->SetOrigin(0, 0, 0);
The origin will go (0,0,3.75) first and then go to (0,0,0), after the origin moving, it will rotate around (0,0,0), the origin now, and do order RotateY(4) and RotateY(1).
I want to know how to deal with this problem, make the roller rotation and revolution at the same time.