First, sorry for my english level.
my english level is very low so may be you can't understand what i say.
i want use only Collision Detection part in Bullet.
so i saw CollisionInterfaceDemo project. and i try same method my app.
create Box like this.
Code: Select all
btCollisionObject * obj = new btCollisionObject();
btCollisionWorld * world = new btCollisionWorld(........);
btMatrix3X3 basisA;
basisA.setIdentity();
btBoxShape * box = new btBoxShape( btVector3( 0.0f, 0.0f, 0.0f ) );
obj->getWorldTransform().setBasis(basisA);
obj->setCollisionShape(box);
Code: Select all
m_ indexVertex = btTriangleIndexVertexArray( totalverts, gIndices, indexstride, totalverts, (btScalar*) &gvertices[0].x(), vertstride);
trimeshShape = new btBvhTriangleMeshShape( m_ indexVertex, true, aabbmin, aabbmax );
triangle is not correct position. so i get contact result wrong position.
search internet to solve problem.. but i can't find it..
and i hope draw triangle using btIDebugDraw.
so i inherite btIDebugDraw and implement DrawLine() like this...
class DxDebugDraw : public btIDebugDraw
{
virtual void DrawLine();
}
and.. i set debug Mode
Code: Select all
DxDebugDraw debug_draw;
debug_draw.setDebugMode( debug_draw.getDebugMode() | btIDebugDraw::DBG_DrawWireframe );
Code: Select all
world.getdispatchInfo().m_debugDraw = debug_draw;
but it's not work.. and i can't see any drawing.
plz. anyone help me.
what i miss creating shape or using btIDebugDraw ?
when call DrawLine() in btIDebugDraw at Bullet library ?
i was using only Collision Detect part.
so i find some reference paper on the Internet.
have any reference paper you got it?