more refactoring, restored some profiling and some debugging
This commit is contained in:
@@ -1053,9 +1053,9 @@ void ColladaConverter::ConvertRigidBodyRef( btRigidBodyInput& rbInput,btRigidBod
|
||||
} else
|
||||
{
|
||||
printf("static concave triangle <mesh> added\n");
|
||||
//rbOutput.m_colShape = new btTriangleMeshShape(trimesh);//btBvhTriangleMeshShape(trimesh);
|
||||
rbOutput.m_colShape = new btBvhTriangleMeshShape(trimesh);
|
||||
//rbOutput.m_colShape = new btBvhTriangleMeshShape(trimesh);
|
||||
rbOutput.m_colShape = new btConvexTriangleMeshShape(trimesh);
|
||||
//rbOutput.m_colShape = new btConvexTriangleMeshShape(trimesh);
|
||||
|
||||
//btTriangleMeshShape
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ float deltaTime = 1.f/60.f;
|
||||
#include "ColladaDemo.h"
|
||||
#include "GL_ShapeDrawer.h"
|
||||
#include "GlutStuff.h"
|
||||
int maxObj = 1;
|
||||
|
||||
|
||||
///custom version of the converter, that creates physics objects/constraints
|
||||
class MyColladaConverter : public ColladaConverter
|
||||
@@ -80,16 +80,6 @@ class MyColladaConverter : public ColladaConverter
|
||||
const btTransform& startTransform,
|
||||
btCollisionShape* shape)
|
||||
{
|
||||
if (!isDynamic)
|
||||
{
|
||||
printf("nondyna\n");
|
||||
} else
|
||||
{
|
||||
if (!maxObj)
|
||||
return 0;
|
||||
maxObj--;
|
||||
}
|
||||
|
||||
|
||||
btRigidBody* body = m_demoApp->localCreateRigidBody(isDynamic, mass, startTransform,shape);
|
||||
m_demoApp->getDynamicsWorld()->addCollisionObject(body);
|
||||
|
||||
@@ -696,6 +696,26 @@ void DemoApplication::renderme()
|
||||
|
||||
glColor3f(0, 0, 0);
|
||||
|
||||
#ifdef USE_QUICKPROF
|
||||
|
||||
|
||||
if ( getDebugMode() & btIDebugDraw::DBG_ProfileTimings)
|
||||
{
|
||||
static int counter = 0;
|
||||
counter++;
|
||||
std::map<std::string, hidden::ProfileBlock*>::iterator iter;
|
||||
for (iter = btProfiler::mProfileBlocks.begin(); iter != btProfiler::mProfileBlocks.end(); ++iter)
|
||||
{
|
||||
char blockTime[128];
|
||||
sprintf(blockTime, "%s: %lf",&((*iter).first[0]),btProfiler::getBlockTime((*iter).first, btProfiler::BLOCK_CYCLE_SECONDS));//BLOCK_TOTAL_PERCENT));
|
||||
glRasterPos3f(xOffset,yStart,0);
|
||||
BMF_DrawString(BMF_GetFont(BMF_kHelvetica10),blockTime);
|
||||
yStart += yIncr;
|
||||
|
||||
}
|
||||
}
|
||||
#endif //USE_QUICKPROF
|
||||
|
||||
|
||||
glRasterPos3f(xOffset,yStart,0);
|
||||
sprintf(buf,"mouse to interact");
|
||||
|
||||
Reference in New Issue
Block a user