remove constraints/rigid bodies from dynamics world in btBulletWorldImporter
Thanks to vicariousentertainment, see http://code.google.com/p/dynamica/issues/detail?id=16 Enable SIMD OpenCL cloth solver by default enable keyboard 'up' for Windows (non-Glut) version
This commit is contained in:
@@ -502,6 +502,13 @@ public:
|
||||
#endif //DESERIALIZE_SOFT_BODIES
|
||||
|
||||
|
||||
SerializeDemo::~SerializeDemo()
|
||||
{
|
||||
m_fileLoader->deleteAllData();
|
||||
delete m_fileLoader;
|
||||
exitPhysics();
|
||||
}
|
||||
|
||||
void SerializeDemo::initPhysics()
|
||||
{
|
||||
setTexturing(true);
|
||||
@@ -512,14 +519,14 @@ void SerializeDemo::initPhysics()
|
||||
setupEmptyDynamicsWorld();
|
||||
|
||||
#ifdef DESERIALIZE_SOFT_BODIES
|
||||
btBulletWorldImporter* fileLoader = new MySoftBulletWorldImporter((btSoftRigidDynamicsWorld*)m_dynamicsWorld);
|
||||
m_fileLoader = new MySoftBulletWorldImporter((btSoftRigidDynamicsWorld*)m_dynamicsWorld);
|
||||
#else
|
||||
btBulletWorldImporter* fileLoader = new btBulletWorldImporter(m_dynamicsWorld);
|
||||
m_fileLoader = new btBulletWorldImporter(m_dynamicsWorld);
|
||||
#endif //DESERIALIZE_SOFT_BODIES
|
||||
// fileLoader->setVerboseMode(true);
|
||||
|
||||
if (!fileLoader->loadFile("testFile.bullet"))
|
||||
// if (!fileLoader->loadFile("../SoftDemo/testFile.bullet"))
|
||||
if (!m_fileLoader->loadFile("testFile.bullet"))
|
||||
// if (!m_fileLoader->loadFile("../SoftDemo/testFile.bullet"))
|
||||
{
|
||||
///create a few basic rigid bodies and save them to testFile.bullet
|
||||
btCollisionShape* groundShape = new btBoxShape(btVector3(btScalar(50.),btScalar(50.),btScalar(50.)));
|
||||
|
||||
@@ -49,15 +49,15 @@ class SerializeDemo : public PlatformDemoApplication
|
||||
|
||||
btDefaultCollisionConfiguration* m_collisionConfiguration;
|
||||
|
||||
class btBulletWorldImporter* m_fileLoader;
|
||||
|
||||
public:
|
||||
|
||||
SerializeDemo()
|
||||
{
|
||||
}
|
||||
virtual ~SerializeDemo()
|
||||
{
|
||||
exitPhysics();
|
||||
}
|
||||
virtual ~SerializeDemo();
|
||||
|
||||
void initPhysics();
|
||||
|
||||
void setupEmptyDynamicsWorld();
|
||||
|
||||
Reference in New Issue
Block a user