updated GimpactTestDemo into AllBulletDemos
This commit is contained in:
@@ -45,7 +45,6 @@ extern int gNumGjkChecks;
|
||||
|
||||
|
||||
|
||||
GLDebugDrawer debugDrawer;
|
||||
//Real dts = 0.000001f;
|
||||
Real dts = 1.0 / 60.0;
|
||||
|
||||
@@ -116,23 +115,6 @@ extern ContactAddedCallback gContactAddedCallback;
|
||||
|
||||
|
||||
|
||||
//################################## main #####################################
|
||||
int main(int argc,char** argv)
|
||||
{
|
||||
gContactAddedCallback = CustomMaterialCombinerCallback;
|
||||
|
||||
GimpactConcaveDemo* concaveDemo = new GimpactConcaveDemo(); /// This will not be Deleted!!!
|
||||
concaveDemo->initPhysics();
|
||||
concaveDemo->setCameraDistance(45.f);
|
||||
|
||||
//cannot run stepFront yet, the OpenGL context is not opened (stepFront updates camera...)
|
||||
// concaveDemo->stepFront();
|
||||
// concaveDemo->stepFront();
|
||||
// concaveDemo->stepFront();
|
||||
// concaveDemo->stepFront();
|
||||
|
||||
return glutmain(argc, argv,640,480,"DevO,s GIMPACT Test Demo",concaveDemo);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
void GimpactConcaveDemo::renderme()
|
||||
@@ -416,7 +398,6 @@ void GimpactConcaveDemo::initPhysics()
|
||||
m_constraintSolver = new btSequentialImpulseConstraintSolver();
|
||||
|
||||
m_dynamicsWorld = new btDiscreteDynamicsWorld(m_dispatcher,m_broadphase,m_constraintSolver,m_collisionConfiguration);
|
||||
m_dynamicsWorld->setDebugDrawer(&debugDrawer);
|
||||
|
||||
//create trimesh model and shape
|
||||
initGImpactCollision();
|
||||
|
||||
@@ -16,6 +16,8 @@ subject to the following restrictions:
|
||||
#define TEST_CONCAVE_DEMO_H
|
||||
|
||||
#include "DemoApplication.h"
|
||||
class btTriangleIndexVertexArray;
|
||||
class btDefaultCollisionConfiguration;
|
||||
|
||||
//#define BULLET_TRIANGLE_COLLISION 1
|
||||
#define BULLET_GIMPACT 1
|
||||
@@ -126,6 +128,14 @@ public: ///data
|
||||
btCollisionDispatcher* m_dispatcher;
|
||||
btBroadphaseInterface* m_broadphase;
|
||||
btConstraintSolver* m_constraintSolver;
|
||||
|
||||
static DemoApplication* Create()
|
||||
{
|
||||
GimpactConcaveDemo* demo = new GimpactConcaveDemo();
|
||||
demo->myinit();
|
||||
demo->initPhysics();
|
||||
return demo;
|
||||
}
|
||||
};
|
||||
|
||||
#endif //CONCAVE_DEMO_H
|
||||
|
||||
Reference in New Issue
Block a user