+ Allow user to enable useConvexConservativeDistanceUtil . Use dynamicsWorld->getDispatchInfo().m_useConvexConservativeDistanceUtil = true; (see Demos/Benchmarks/Benchmark4 (convex objects falling down) + Fix for plane drawing (just wire-frame) + Gimpact: use collision margin of 0.07 for demo (because BULLET_TRIANGLE_COLLISION is used) + replace dot,cross,distance,angle,triple in btVector3 by btDot, btCross,btDistance,btAngle,btDistance to avoid naming conflicts + Some fixes in GJK penetration depth normal direction (broken in a previous commit) + fix in calculateDiffAxisAngleQuaternion to make ConvexConservativeDistanceUtil work properly + allow debug drawing to debug btContinuousConvexCollision + add comment/warning that btTriangleMesh::findOrAddVertex is an internal method, users should use addTriangle instead
41 lines
879 B
C++
41 lines
879 B
C++
|
|
|
|
#include "ConvexDecompositionDemo.h"
|
|
#include "GlutStuff.h"
|
|
#include "GLDebugDrawer.h"
|
|
#include "btBulletDynamicsCommon.h"
|
|
|
|
#ifndef _WINDOWS
|
|
|
|
GLDebugDrawer gDebugDrawer;
|
|
|
|
int main(int argc,char** argv)
|
|
{
|
|
const char* filename = "file.obj";
|
|
|
|
|
|
ConvexDecompositionDemo* convexDecompDemo = new ConvexDecompositionDemo();
|
|
|
|
convexDecompDemo->initPhysics(filename);
|
|
|
|
convexDecompDemo->getDynamicsWorld()->setDebugDrawer(&gDebugDrawer);
|
|
|
|
|
|
convexDecompDemo->clientResetScene();
|
|
|
|
|
|
|
|
glutmain(argc, argv,640,480,"Bullet Physics Demo. http://www.continuousphysics.com/Bullet/phpBB2/",convexDecompDemo);
|
|
|
|
delete convexDecompDemo;
|
|
|
|
return 0;
|
|
}
|
|
#else
|
|
DemoApplication* createDemo()
|
|
{
|
|
ConvexDecompositionDemo* convexDecompDemo = new ConvexDecompositionDemo();
|
|
return convexDecompDemo;
|
|
}
|
|
#endif _WINDOWS
|