Ogre中解决 1.6 到 1.7 的移植问题

来源:互联网 发布:女人购物软件 编辑:程序博客网 时间:2024/04/27 18:35

从 Ogre1.6 到 1.7 可谓问题多呀,自己学习wiki  教程的时候就经常遇到以下

常见问题 :

error C2039: “getWorldPosition”: 不是“Ogre::SceneNode”的成员

查阅 Ogre wiki 得知:

SceneNode - A SceneNode is a logical element of the scene graph hierachy, which is used to organise objects in a -scene. It can have multiple child nodes or -MovableObjects (such as -Entity, -Camera, ManualObject, -Light, -ParticleSytem?, etc.) attached to it. Rather than moving these individual items around, you move the nodes they are attached to.

Note for world and derived properties

 
The functions getWorldPosition(), getWorldOrientation() and getWorldScale() are removed since Ogre 1.6.
Instead you have to use _getDerivedPosition(), _getDerivedOrientation() and _getDerivedScale().

In normal cases you shouldn't use underscore functions if you don't really need them. Related to the SceneNode class ist just a warning symbol.

http://www.ogre3d.org/tikiwiki/-scenenode

getWorldPosition已被 _getDerivedPosition()取代了

怎样解决呢? 我采取的办法是

 Vector3 _getDerivedPosition()
 {

      return mMainNode->_getDerivedPosition(),  

}

方法解决的。可能还有更好的方法解决,欢迎回帖交流

原创粉丝点击