added debug drawing for concave objects (draws overlapping triangles)

This commit is contained in:
ejcoumans
2006-07-05 05:03:09 +00:00
parent 6163b42e8c
commit d2570694a9
3 changed files with 30 additions and 6 deletions

View File

@@ -32,7 +32,7 @@ subject to the following restrictions:
#include "CollisionShapes/TriangleMesh.h"
#include "IDebugDraw.h"
//#include "GLDebugDrawer.h"
#include "GLDebugDrawer.h"
#include "PHY_Pro.h"
@@ -57,6 +57,7 @@ CcdPhysicsEnvironment* physicsEnvironmentPtr = 0;
TriangleMesh meshData;
StridingMeshInterface* ptr;
GLDebugDrawer debugDrawer;
//GL_LineSegmentShape shapeE(SimdPoint3(-50,0,0),
// SimdPoint3(50,0,0));
@@ -214,7 +215,7 @@ int main(int argc,char** argv)
#endif//DEBUG_MESH
// GLDebugDrawer debugDrawer;
ConstraintSolver* solver = new SequentialImpulseConstraintSolver;
//ConstraintSolver* solver = new OdeConstraintSolver;
@@ -322,7 +323,7 @@ int main(int argc,char** argv)
}
*/
//for the line that represents the AABB extents
// physicsEnvironmentPtr->setDebugDrawer(&debugDrawer);
physicsEnvironmentPtr->setDebugDrawer(&debugDrawer);
}
@@ -336,6 +337,8 @@ void renderme()
float m[16];
int i;
debugDrawer.SetDebugMode(getDebugMode());
for (i=0;i<numObjects;i++)
{
SimdTransform transA;