OGREHEAD
04-07-2013 11:47:13
I get a linking error which i find strange.
When I just do:
I get the following linker error
But when I then add the followingBoxCollisionShape
The linker error disappears.
Does this mean I am missing something or doing anything wrong?
Why can I not just create a physics world without objects?
How can the addition of some code suddenly "correct" previous code?
When I just do:
SceneManager1 = Root::getSingleton().getSceneManager( "SceneManager1" );
DebugDrawer *debugDrawer = new DebugDrawer();
debugDrawer->setDrawWireframe( true );
debugDrawer->setDebugMode( DebugDrawer::DBG_MAX_DEBUG_DRAW_MODE );
debugDrawer->setDrawAabb( true );
debugDrawer->setDrawContactPoints( true );
debugDrawer->setDrawFeaturesText( true );
mWorld = new DynamicsWorld( SceneManager1, AxisAlignedBox( Ogre::Vector3( -10000, -10000, -10000 ), Ogre::Vector3( 10000, 10000, 10000 ) ), Ogre::Vector3( 0, 0, 0 ) );
mWorld->setShowDebugShapes( true );
mWorld->setDebugDrawer( debugDrawer );
I get the following linker error
/usr/bin/ld: /usr/local/lib/libBulletDynamics.so: undefined reference to symbol '_ZN12btAxisSweep3C1ERK9btVector3S2_tP22btOverlappingPairCacheb'
But when I then add the followingBoxCollisionShape
BoxCollisionShape *shape1 = new BoxCollisionShape( Ogre::Vector3( 50, 50, 15.5 ) );
OgreBulletDynamics::RigidBody *body1 = new OgreBulletDynamics::RigidBody ( "Box1", mWorld );
body1->setShape (SceneManager1->getSceneNode( "Orb1" ), shape1, 0.6f, 0.6f, 1.0f, SceneManager1->getSceneNode( "Orb1" )->getPosition(), Quaternion( 0, 0, 0, 1 ) );
body1->enableActiveState();
The linker error disappears.
Does this mean I am missing something or doing anything wrong?
Why can I not just create a physics world without objects?
How can the addition of some code suddenly "correct" previous code?