mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
A few asserts for better error localisation.
This commit is contained in:
parent
16c0690edb
commit
526159f961
@ -65,12 +65,15 @@ BulletWorld() {
|
|||||||
default:
|
default:
|
||||||
bullet_cat.error() << "no proper broadphase algorithm!" << endl;
|
bullet_cat.error() << "no proper broadphase algorithm!" << endl;
|
||||||
}
|
}
|
||||||
|
nassertv(_broadphase);
|
||||||
|
|
||||||
// Configuration
|
// Configuration
|
||||||
_configuration = new btSoftBodyRigidBodyCollisionConfiguration();
|
_configuration = new btSoftBodyRigidBodyCollisionConfiguration();
|
||||||
|
nassertv(_configuration);
|
||||||
|
|
||||||
// Dispatcher
|
// Dispatcher
|
||||||
_dispatcher = new btCollisionDispatcher(_configuration);
|
_dispatcher = new btCollisionDispatcher(_configuration);
|
||||||
|
nassertv(_dispatcher);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
_dispatcher.registerCollisionCreateFunc(
|
_dispatcher.registerCollisionCreateFunc(
|
||||||
@ -97,9 +100,13 @@ BulletWorld() {
|
|||||||
|
|
||||||
// Solver
|
// Solver
|
||||||
_solver = new btSequentialImpulseConstraintSolver;
|
_solver = new btSequentialImpulseConstraintSolver;
|
||||||
|
nassertv(_solver);
|
||||||
|
|
||||||
// World
|
// World
|
||||||
_world = new btSoftRigidDynamicsWorld(_dispatcher, _broadphase, _solver, _configuration);
|
_world = new btSoftRigidDynamicsWorld(_dispatcher, _broadphase, _solver, _configuration);
|
||||||
|
nassertv(_world);
|
||||||
|
nassertv(_world->getPairCache());
|
||||||
|
|
||||||
_world->setGravity(btVector3(0.0f, 0.0f, 0.0f));
|
_world->setGravity(btVector3(0.0f, 0.0f, 0.0f));
|
||||||
|
|
||||||
// Ghost-pair callback
|
// Ghost-pair callback
|
||||||
|
Loading…
x
Reference in New Issue
Block a user