vehicle demo

kangaroo
Posts: 11
Joined: Wed Mar 13, 2013 10:18 pm

vehicle demo

Post by kangaroo »

Hi. I have been looking at VehicleDemo.cpp code. It seems to me that groundShape was added to collision objects twice, first time as a box
btCollisionShape* groundShape = new btBoxShape(btVector3(50,3,50));
m_collisionShapes.push_back(groundShape);
and then as a mesh
groundShape = new btBvhTriangleMeshShape(m_indexVertexArrays,useQuantizedAabbCompression);
m_collisionShapes.push_back(groundShape);
what is the reason for this?
kangaroo
Posts: 11
Joined: Wed Mar 13, 2013 10:18 pm

Re: vehicle demo

Post by kangaroo »

I decided to ask one more thing while im at it. What method could i use to draw a bunch of triangles if i put them as a btTriangleIndexVertexArray or btTriangleMesh. Is there such a method?