我正在尝试将bullet四元数(btQuaternion)转换为irrlicht四元数(irr :: core :: quaternion),以便进行原型制作游戏。
btQuaternion orientation= rigidBody->getOrientation();//now turn bullet quaternion -> irrlicht
finalOrientation= core::quaternion(orientation.getX, orientation.getY, orientation.getZ, orientation.getW);
但是我得到了一个错误,我无法弄明白。
Error 1 error C3867: 'btQuadWord::getX': function call missing argument list; use '&btQuadWord::getX' to create a pointer to member c:\users\matia\documents\visual studio 2008\projects\bulletimplant\bulletimplant\bulletimplant.cpp 86
Error 2 error C3867: 'btQuadWord::getY': function call missing argument list; use '&btQuadWord::getY' to create a pointer to member c:\users\matia\documents\visual studio 2008\projects\bulletimplant\bulletimplant\bulletimplant.cpp 86
Error 3 error C3867: 'btQuadWord::getZ': function call missing argument list; use '&btQuadWord::getZ' to create a pointer to member c:\users\matia\documents\visual studio 2008\projects\bulletimplant\bulletimplant\bulletimplant.cpp 86
Error 4 error C3867: 'btQuaternion::getW': function call missing argument list; use '&btQuaternion::getW' to create a pointer to member c:\users\matia\documents\visual studio 2008\projects\bulletimplant\bulletimplant\bulletimplant.cpp 86
视觉工作室抱怨函数调用缺少参数列表,但我无法找到解决方案。请帮忙。感谢
答案 0 :(得分:4)
假设没有任何函数需要任何参数,我相信你需要:
finalOrientation= core::quaternion(orientation.getX(), orientation.getY(), orientation.getZ(), orientation.getW());
编译器抱怨,因为getX
,getY
,getZ
和getW
是函数,调用时函数后面应该跟一个参数列表。