perform GrahamScanConvexHull2D around an arbitrary oriented 2D plane in 3D, to fix some convex hull face merging problems

add compound shape support to BulletXmlWorldImporter and fix some compile issue under Debian (hopefully)
object picking change in the demos: create a ball-socket picking constraint when holding shift while mouse dragging, otherwise a fixed (6dof) constraint
add assert in constraint solver, when both objects have their inertia tensor rows set to zero
btPolyhedralContactClipping: add edge-edge contact point in  findSeparatingAxis (similar to the default GJK case)
This commit is contained in:
erwin.coumans
2012-09-28 07:14:48 +00:00
parent 837e5cb5e0
commit 60bf599246
24 changed files with 385 additions and 153 deletions

View File

@@ -28,15 +28,24 @@ subject to the following restrictions:
#include <stdio.h> //printf debugging
#include "GLDebugDrawer.h"
GLDebugDrawer gDebugDrawer;
void BulletXmlImportDemo::initPhysics()
{
setTexturing(true);
setTexturing(true);
setShadows(true);
setCameraDistance(btScalar(30.));
setupEmptyDynamicsWorld();
m_dynamicsWorld->setDebugDrawer(&gDebugDrawer);
btBulletXmlWorldImporter* importer = new btBulletXmlWorldImporter(m_dynamicsWorld);
importer->loadFile("bullet_basic.xml");
// importer->loadFile("bulletser.xml");
@@ -54,6 +63,8 @@ void BulletXmlImportDemo::clientMoveAndDisplay()
///step the simulation
if (m_dynamicsWorld)
{
m_dynamicsWorld->stepSimulation(ms / 1000000.f);
m_dynamicsWorld->debugDrawWorld();
}
@@ -90,6 +101,7 @@ void BulletXmlImportDemo::setupEmptyDynamicsWorld()
///use the default collision dispatcher. For parallel processing you can use a diffent dispatcher (see Extras/BulletMultiThreaded)
m_dispatcher = new btCollisionDispatcher(m_collisionConfiguration);
btGImpactCollisionAlgorithm::registerAlgorithm(m_dispatcher);
m_broadphase = new btDbvtBroadphase();
@@ -101,7 +113,7 @@ void BulletXmlImportDemo::setupEmptyDynamicsWorld()
//btGImpactCollisionAlgorithm::registerAlgorithm((btCollisionDispatcher*)m_dynamicsWorld->getDispatcher());
m_dynamicsWorld->setGravity(btVector3(0,-10,0));
}
@@ -115,7 +127,11 @@ BulletXmlImportDemo::~BulletXmlImportDemo()
exitPhysics();
}
void BulletXmlImportDemo::clientResetScene()
{
exitPhysics();
initPhysics();
}
void BulletXmlImportDemo::exitPhysics()