The shape information returned by each coin subclass includes now all
The shape information returned by each coin subclass includes now all
rigid body (minus motion state) info. Also the big coin now weights 5.

file:a/Coin.cpp -> file:b/Coin.cpp
--- a/Coin.cpp
+++ b/Coin.cpp
@@ -27,12 +27,10 @@
 
   /// Bullet
   BtOgre::RigidBodyState *coinState=new BtOgre::RigidBodyState(_coinNode);
-  
-  float coinMass=1;
-  btVector3 coinIntertia;
-  shape()->calculateLocalInertia(coinMass,coinIntertia);
 
-  _coinBody=new btRigidBody(coinMass,coinState,shape(),coinIntertia);
+  btRigidBody::btRigidBodyConstructionInfo info=shape();
+  info.m_motionState=coinState;
+  _coinBody=new btRigidBody(info);
 
   _world->addRigidBody(_coinBody,CM_COIN,btBroadphaseProxy::AllFilter);
 }

file:a/Coin.h -> file:b/Coin.h
--- a/Coin.h
+++ b/Coin.h
@@ -25,7 +25,7 @@
   Ogre::SceneManager* sceneMngr();
 
   virtual Ogre::Entity* createEntity() =0;
-  virtual btCollisionShape* shape() =0;
+  virtual btRigidBody::btRigidBodyConstructionInfo shape() =0;
  
 private:
   unsigned int _value;

--- a/CoinBig.cpp
+++ b/CoinBig.cpp
@@ -24,9 +24,12 @@
   return entity;
 }
 
-btCollisionShape* CoinBig::shape()
+btRigidBody::btRigidBodyConstructionInfo CoinBig::shape()
 {
   static btCollisionShape *shape=new btCylinderShape(btVector3(10.0f,1.0f,10.0f));
-  return shape;
+  btVector3 localInertia;
+  shape->calculateLocalInertia(5,localInertia);
+  btRigidBody::btRigidBodyConstructionInfo info(10,0,shape,localInertia);
+  return info;
 }
 

file:a/CoinBig.h -> file:b/CoinBig.h
--- a/CoinBig.h
+++ b/CoinBig.h
@@ -15,11 +15,10 @@
 
 protected:
   virtual Ogre::Entity* createEntity();
-  virtual btCollisionShape* shape();
+  virtual btRigidBody::btRigidBodyConstructionInfo shape();
   
 private: 
   static int _count;
-  static btCollisionShape *_coinShape;
 };
 
 #endif // COINBIG_H_

--- a/CoinNormal.cpp
+++ b/CoinNormal.cpp
@@ -24,9 +24,12 @@
   return entity;
 }
 
-btCollisionShape* CoinNormal::shape()
+btRigidBody::btRigidBodyConstructionInfo CoinNormal::shape()
 {
   static btCollisionShape *shape=new btCylinderShape(btVector3(5.0f,0.5f,5.0f));
-  return shape;
+  btVector3 localInertia;
+  shape->calculateLocalInertia(1,localInertia);
+  btRigidBody::btRigidBodyConstructionInfo info(1,0,shape,localInertia);
+  return info;
 }
 

--- a/CoinNormal.h
+++ b/CoinNormal.h
@@ -15,11 +15,10 @@
 
 protected:
   virtual Ogre::Entity* createEntity();
-  virtual btCollisionShape* shape();
+  virtual btRigidBody::btRigidBodyConstructionInfo shape();
   
 private: 
   static int _count;
-  static btCollisionShape *_coinShape;
 };
 
 #endif // COINNORMAL_H_