jorgerosa
03-12-2012 22:01:27
Hello all. This is my first post here
I´m using: Windows7 + Code::Blocks SVN4589 + MinGW GCC 4.7.2 + Bullet Physics 2.81 + OgreBullet Rev.2978 (All updated to the very lattest versions!)
1 • Compiling Bullet and OgreBullet give me errors like this: (Caused because I´m using: Bullet Physics 2.81)
2 • I´ve edited some OgreBullet files, just like the next example, and seems to work ok: (for example in "OgreBulletDynamicsWorld.cpp")
3 • I´m stuck here at file "(...) OgreBullet\Collisions\src\OgreBulletCollisionsRay.cpp" at line 87, and I´m trying to edit it like:
QUESTION: What code should I add in that line? (Been trying lots of ideas, all fail here...)
OR... I´m doing everything wrong?...
OR... There is an updated (maybe unofficial) OgreBullet version? (If exists, I can´t find...)
THANKYOU!
I´m using: Windows7 + Code::Blocks SVN4589 + MinGW GCC 4.7.2 + Bullet Physics 2.81 + OgreBullet Rev.2978 (All updated to the very lattest versions!)
1 • Compiling Bullet and OgreBullet give me errors like this: (Caused because I´m using: Bullet Physics 2.81)
(...)
OgreBulletCollisionsRay.cpp||In member function 'OgreBulletCollisions::Object* OgreBulletCollisions::CollisionClosestRayResultCallback::getCollidedObject() const':|
OgreBulletCollisionsRay.cpp|96|error: invalid conversion from 'const btCollisionObject*' to 'btCollisionObject*' [-fpermissive]|
(...)
Note the: "error: invalid conversion from 'const btCollisionObject*' to 'btCollisionObject*'"2 • I´ve edited some OgreBullet files, just like the next example, and seems to work ok: (for example in "OgreBulletDynamicsWorld.cpp")
#if BT_BULLET_VERSION>=281
const btCollisionObject* obA = contactManifold->getBody0(); // For newer Bullet versions
const btCollisionObject* obB = contactManifold->getBody1(); // For newer Bullet versions
#else
btCollisionObject* obA = static_cast<btCollisionObject*>(contactManifold->getBody0()); // For older Bullet versions (original code)
btCollisionObject* obB = static_cast<btCollisionObject*>(contactManifold->getBody1()); // For older Bullet versions (original code)
#endif
3 • I´m stuck here at file "(...) OgreBullet\Collisions\src\OgreBulletCollisionsRay.cpp" at line 87, and I´m trying to edit it like:
Object *CollisionClosestRayResultCallback::getCollidedObject () const
{
#if BT_BULLET_VERSION>=281
return <---- ??? NOW,WHAT SHOULD I ADD HERE ??? ---- THANKS !!!
#else
return mWorld->findObject(static_cast<btCollisionWorld::ClosestRayResultCallback *> (mRayResultCallback)->m_collisionObject); // For older Bullet versions (original code)
#endif
}
Note: If I remove or coment that lines, everything compiles ok (but things will be broken, in later use in my project, of course)QUESTION: What code should I add in that line? (Been trying lots of ideas, all fail here...)
OR... I´m doing everything wrong?...
OR... There is an updated (maybe unofficial) OgreBullet version? (If exists, I can´t find...)
THANKYOU!