48 lines
1.6 KiB
C
Executable file
48 lines
1.6 KiB
C
Executable file
#include "3dphysics.h"
|
|
|
|
/*
|
|
btDefaultCollisionConfiguration *collisionConfig {
|
|
NULL};
|
|
btCollisionDispatcher *dispatcher {
|
|
NULL};
|
|
btBroadphaseInterface *overlappingPairCache {
|
|
NULL};
|
|
btSequentialImpulseConstraintSolver *solver {
|
|
NULL};
|
|
btDiscreteDynamicsWorld *dynamicsWorld {
|
|
NULL};
|
|
btRigidBody *worldFloor {
|
|
NULL};
|
|
|
|
void btUpdate()
|
|
{
|
|
// dynamicsWorld->stepSimulation(deltaT);
|
|
}
|
|
|
|
void btInit()
|
|
{
|
|
// collisionConfig = new btDefaultCollisionConfiguration();
|
|
// dispatcher = new btCollisionDispatcher(collisionConfig);
|
|
// overlappingPairCache = new btDbvtBroadphase();
|
|
// solver = new btSequentialImpulseConstraintSolver;
|
|
// dynamicsWorld = new btDiscreteDynamicsWorld(dispatcher, overlappingPairCache, solver, collisionConfig);
|
|
// dynamicsWorld->setGravity(btVector3(0.f, -9.8f, 0.f));
|
|
// btDebugDrawer = new BulletDebugDrawer_OpenGL();
|
|
// dynamicsWorld->setDebugDrawer(btDebugDrawer);
|
|
|
|
|
|
//btDebugDrawer->setDebugMode(btIDebugDraw::DBG_DrawWireframe | btIDebugDraw::DBG_DrawAabb);
|
|
// Add camera and plane to world
|
|
// dynamicsWorld->addRigidBody(camera.body);
|
|
// camera.body->setGravity(btVector3(0.f, 0.f, 0.f));
|
|
|
|
// Create and add plane
|
|
// btStaticPlaneShape* floorShape = new btStaticPlaneShape(btVector3(0.f, 1.f, 0.f), 0.f);
|
|
// btDefaultMotionState* motionState = new btDefaultMotionState();
|
|
// btVector3 bodyInertia;
|
|
// btRigidBody::btRigidBodyConstructionInfo bodyCI = btRigidBody::btRigidBodyConstructionInfo(0.f, motionState, floorShape, bodyInertia);
|
|
// worldFloor = new btRigidBody(bodyCI);
|
|
// dynamicsWorld->addRigidBody(worldFloor);
|
|
}
|
|
*/
|