So yes, rotation_node should indeed be a pointer to a scene node which points to the node to be rotated. And you just don't copy the scene node, but dereference the pointer and thus change the original scene node. you code already got the correct part:
and your Index03 scene node is rotated. That's all. no need to copy things. The arrow in the above statement (or better understandable when writing (*rotating_trans).setRotation()) dereferences the pointer and affects the original node.
Now how to choose the correct scene node? That's up to you. Put your hand into some array or store lots of different pointers in pointer varibales. does not matter. BTW: If you have separate staements for each finger or joint you do not need the additional pointer at all. Just rotate the scene node directly.
irr::scene::ISceneNode * origin = new CCameraSceneNode(0,smgr,1);
irr::scene::ISceneNode * dest = new CCameraSceneNode(0,smgr,2);
// do some other stuff
*dest = *origin;
This may compile and run, but it is a very, very stupid thing to do. The SceneNode and derived classes don't implement operator= or copy constructors, so the default implementation just copies the pointers [or arrays of].
If origin or dest had any children, or had grabbed pointers to resources, the reference counts to those resources would now be off. This will result in memory leaks, accessing deleted memory and double deletes.
Travis
I agree. Take no offense!
I gave this example (the one without //stuff, plz) that shows it is possible to make a copy of pointed object using pointer dereference operator. I should have added a notice about using this code as your own risk.
Next time, I will chose a custom class (foo and bar ones are better!), in order not to interefere with Irrlicht API. Alright ?
Return to Irrlicht after years... I'm lovin it. It's hard to be a Man ! Si vis pacem para belum