mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-22 22:40:12 +00:00
part 2
This commit is contained in:
parent
00a2de432a
commit
867fb620c3
3 changed files with 15 additions and 2 deletions
|
@ -70,7 +70,6 @@ BulletShapeManager *BulletShapeManager::sThis = 0;
|
||||||
|
|
||||||
BulletShapeManager *BulletShapeManager::getSingletonPtr()
|
BulletShapeManager *BulletShapeManager::getSingletonPtr()
|
||||||
{
|
{
|
||||||
assert(sThis);
|
|
||||||
return sThis;
|
return sThis;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,6 +81,9 @@ BulletShapeManager &BulletShapeManager::getSingleton()
|
||||||
|
|
||||||
BulletShapeManager::BulletShapeManager()
|
BulletShapeManager::BulletShapeManager()
|
||||||
{
|
{
|
||||||
|
assert(!sThis);
|
||||||
|
sThis = this;
|
||||||
|
|
||||||
mResourceType = "BulletShape";
|
mResourceType = "BulletShape";
|
||||||
|
|
||||||
// low, because it will likely reference other resources
|
// low, because it will likely reference other resources
|
||||||
|
@ -95,6 +97,8 @@ BulletShapeManager::~BulletShapeManager()
|
||||||
{
|
{
|
||||||
// and this is how we unregister it
|
// and this is how we unregister it
|
||||||
Ogre::ResourceGroupManager::getSingleton()._unregisterResourceManager(mResourceType);
|
Ogre::ResourceGroupManager::getSingleton()._unregisterResourceManager(mResourceType);
|
||||||
|
|
||||||
|
sThis = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
BulletShapePtr BulletShapeManager::load(const Ogre::String &name, const Ogre::String &group)
|
BulletShapePtr BulletShapeManager::load(const Ogre::String &name, const Ogre::String &group)
|
||||||
|
|
|
@ -120,6 +120,14 @@ protected:
|
||||||
|
|
||||||
static BulletShapeManager *sThis;
|
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:
|
public:
|
||||||
|
|
||||||
BulletShapeManager();
|
BulletShapeManager();
|
||||||
|
|
|
@ -251,7 +251,6 @@ namespace Physic
|
||||||
|
|
||||||
PhysicEngine::~PhysicEngine()
|
PhysicEngine::~PhysicEngine()
|
||||||
{
|
{
|
||||||
|
|
||||||
HeightFieldContainer::iterator hf_it = mHeightFieldMap.begin();
|
HeightFieldContainer::iterator hf_it = mHeightFieldMap.begin();
|
||||||
for (; hf_it != mHeightFieldMap.end(); ++hf_it)
|
for (; hf_it != mHeightFieldMap.end(); ++hf_it)
|
||||||
{
|
{
|
||||||
|
@ -293,6 +292,8 @@ namespace Physic
|
||||||
delete broadphase;
|
delete broadphase;
|
||||||
delete pairCache;
|
delete pairCache;
|
||||||
delete mShapeLoader;
|
delete mShapeLoader;
|
||||||
|
|
||||||
|
delete BulletShapeManager::getSingletonPtr();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PhysicEngine::addHeightField(float* heights,
|
void PhysicEngine::addHeightField(float* heights,
|
||||||
|
|
Loading…
Reference in a new issue