actorid
scrawl 12 years ago
parent 00a2de432a
commit 867fb620c3

@ -70,7 +70,6 @@ BulletShapeManager *BulletShapeManager::sThis = 0;
BulletShapeManager *BulletShapeManager::getSingletonPtr()
{
assert(sThis);
return sThis;
}
@ -82,6 +81,9 @@ BulletShapeManager &BulletShapeManager::getSingleton()
BulletShapeManager::BulletShapeManager()
{
assert(!sThis);
sThis = this;
mResourceType = "BulletShape";
// low, because it will likely reference other resources
@ -95,6 +97,8 @@ BulletShapeManager::~BulletShapeManager()
{
// and this is how we unregister it
Ogre::ResourceGroupManager::getSingleton()._unregisterResourceManager(mResourceType);
sThis = 0;
}
BulletShapePtr BulletShapeManager::load(const Ogre::String &name, const Ogre::String &group)

@ -120,6 +120,14 @@ protected:
static BulletShapeManager *sThis;
private:
/** \brief Explicit private copy constructor. This is a forbidden operation.*/
BulletShapeManager(const BulletShapeManager &);
/** \brief Private operator= . This is a forbidden operation. */
BulletShapeManager& operator=(const BulletShapeManager &);
public:
BulletShapeManager();

@ -251,7 +251,6 @@ namespace Physic
PhysicEngine::~PhysicEngine()
{
HeightFieldContainer::iterator hf_it = mHeightFieldMap.begin();
for (; hf_it != mHeightFieldMap.end(); ++hf_it)
{
@ -293,6 +292,8 @@ namespace Physic
delete broadphase;
delete pairCache;
delete mShapeLoader;
delete BulletShapeManager::getSingletonPtr();
}
void PhysicEngine::addHeightField(float* heights,

Loading…
Cancel
Save