再这样贴代码可不行啦......以后只能笔记式记录了......
首先强调一点,ogre中使用的是右手坐标系。
1.translating in different spaces
node ->translate(0, 0, 10, Ogre::Node::TS_LOCAL);
node ->translate(0, 0, 10, Ogre::Node::TS_WORLD);
node ->translate(0, 0, 10);
最后一个默认,在TS_PARENT中
2.rotating in different spaces
node3 ->yaw(Ogre::Degree(90), Ogre::Node::TS_WORLD);
node3 ->yaw(Ogre::Degree(90));
根据我的理解,每一次旋转是通过将本地坐标系旋转来实现的,也就是说旋转伴随着本地坐标系的变化。假如参照世界坐标系,那么旋转后本地坐标系依然会发生变化,变化参照世界坐标系。世界坐标系当然是不会变的。