Imagination PowerVR SDK Blog



please can you give me a bref idea about linking this sdk with bullet physics?

I search in the internet but I don’t well understand. I tried some code but always an error was displayed.

thanks for help me


Hi Aicha,

The best thing to do is create an array of vertices from a POD mesh that can be passed to Bullet. A function like this should work (FYI, I’ve not tested it so it may be a little buggy):

CPVRTArray CModel::GetVertices(const unsigned int mesh_id)<br />
{<br />
CPVRTArray vertices;<br />
const SPODMesh& mesh(pod_.pMesh[mesh_id]);<br />
for(unsigned int vertex_id = 0; vertex_id < mesh.nNumVertex; ++vertex_id)<br />
{<br />
PVRTVec3 v = *(PVRTVec3*)(mesh.pInterleaved + mesh.sVertex.nStride * vertex_id);<br />
vertices.Append(v);<br />
}<br />
return vertices;<br />
```<br />
<br />


I want to test the distance between the wheelchair and the other objects in the house to detect collision using the code below I mean that I calculate the distance between wheelchair’s vertices and objects’s vertices . is that possible?

I don’t succeed to use bullet physics with yhis sdk and I don’t have enough time to do it.


Hi Aicha,

Writing an accurate collision detection and response system from scratch is a very time consuming task. I would recommend revisiting integration of an existing solution, such as Bullet, as it will take significantly less time than implementing your own solution.

Bullet have a Hello World example that explains how to set up the various systems within Bullet to implement a simple bounding ball application:

Once you have an understanding of the fundamentals of the Bullet engine, I would recommend reading through the code of the various examples included in the Bullet SDK.