+ CMake build system fix under Windows: don't define _WINDOWS to allow Glut console demo to build properly

+ 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
This commit is contained in:
erwin.coumans
2009-07-15 16:47:48 +00:00
parent a27b349dd0
commit 40c73f327c
35 changed files with 343 additions and 222 deletions

View File

@@ -365,7 +365,7 @@ GL_ShapeDrawer::ShapeCache* GL_ShapeDrawer::cache(btConvexShape* shape)
for(int i=0;i<ni;i+=3)
{
const unsigned int* ti=pi+i;
const btVector3 nrm=cross(pv[ti[1]]-pv[ti[0]],pv[ti[2]]-pv[ti[0]]).normalized();
const btVector3 nrm=btCross(pv[ti[1]]-pv[ti[0]],pv[ti[2]]-pv[ti[0]]).normalized();
for(int j=2,k=0;k<3;j=k++)
{
const unsigned int a=ti[j];
@@ -857,8 +857,7 @@ void GL_ShapeDrawer::drawOpenGL(btScalar* m, const btCollisionShape* shape, cons
else
{
#else
if (shape->isConcave())//>getShapeType() == TRIANGLE_MESH_SHAPE_PROXYTYPE||shape->getShapeType() == GIMPACT_SHAPE_PROXYTYPE)
// if (shape->getShapeType() == TRIANGLE_MESH_SHAPE_PROXYTYPE)
if (shape->isConcave() && !shape->isInfinite())
{
btConcaveShape* concaveMesh = (btConcaveShape*) shape;
@@ -939,8 +938,8 @@ void GL_ShapeDrawer::drawShadow(btScalar* m,const btVector3& extrusion,const bt
glBegin(GL_QUADS);
for(int i=0;i<sc->m_edges.size();++i)
{
const btScalar d=dot(sc->m_edges[i].n[0],extrusion);
if((d*dot(sc->m_edges[i].n[1],extrusion))<0)
const btScalar d=btDot(sc->m_edges[i].n[0],extrusion);
if((d*btDot(sc->m_edges[i].n[1],extrusion))<0)
{
const int q= d<0?1:0;
const btVector3& a= hull->getVertexPointer()[sc->m_edges[i].v[q]];