Bullet shapes with the imgtec powervr mesh object

Please don't post Bullet support questions here, use the above forums instead.
offspring8901
Posts: 1
Joined: Fri Feb 12, 2010 10:11 am

Bullet shapes with the imgtec powervr mesh object

Post by offspring8901 »

How bullet physics shape will be initialized from the mesh object of powervr pod file with interleaved data?
How their world matrix will be used for the btTransform for the shape?
nickb
Posts: 2
Joined: Thu Mar 18, 2010 9:54 pm

Re: Bullet shapes with the imgtec powervr mesh object

Post by nickb »

if you take a look at the DrawMesh function in one of their training courses you will see a GL function called 'glVertexAttribPointer'. Look at

glVertexAttribPointer(VERTEX_ARRAY, 3, GL_FLOAT, GL_FALSE, pMesh->sVertex.nStride, pMesh->sVertex.pData)

This is showing how to step through the data to pick out the vertices. Each vertex is 3*GL_FLOAT bytes in length, pMesh->sVertex.nStride shows you how many bytes there are between each vertex, and pMesh->sVertex.pData is a pointer to the first vertex in the data.