|
|
|
@ -22,6 +22,7 @@
|
|
|
|
|
|
|
|
|
|
#include <components/esm/loadgmst.hpp>
|
|
|
|
|
#include <components/sceneutil/positionattitudetransform.hpp>
|
|
|
|
|
#include <components/sceneutil/unrefqueue.hpp>
|
|
|
|
|
|
|
|
|
|
#include <components/nifosg/particle.hpp> // FindRecIndexVisitor
|
|
|
|
|
|
|
|
|
@ -533,6 +534,11 @@ namespace MWPhysics
|
|
|
|
|
setOrigin(btVector3(pos[0], pos[1], pos[2]));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const Resource::BulletShapeInstance* getShapeInstance() const
|
|
|
|
|
{
|
|
|
|
|
return mShapeInstance.get();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void setScale(float scale)
|
|
|
|
|
{
|
|
|
|
|
mShapeInstance->getCollisionShape()->setLocalScaling(btVector3(scale,scale,scale));
|
|
|
|
@ -690,6 +696,11 @@ namespace MWPhysics
|
|
|
|
|
delete mBroadphase;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void PhysicsSystem::setUnrefQueue(SceneUtil::UnrefQueue *unrefQueue)
|
|
|
|
|
{
|
|
|
|
|
mUnrefQueue = unrefQueue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Resource::BulletShapeManager *PhysicsSystem::getShapeManager()
|
|
|
|
|
{
|
|
|
|
|
return mShapeManager.get();
|
|
|
|
@ -1109,6 +1120,9 @@ namespace MWPhysics
|
|
|
|
|
{
|
|
|
|
|
mCollisionWorld->removeCollisionObject(found->second->getCollisionObject());
|
|
|
|
|
|
|
|
|
|
if (mUnrefQueue.get())
|
|
|
|
|
mUnrefQueue->push(found->second->getShapeInstance());
|
|
|
|
|
|
|
|
|
|
mAnimatedObjects.erase(found->second);
|
|
|
|
|
|
|
|
|
|
delete found->second;
|
|
|
|
|