- May 20, 2014 at 9:58 pm #31717
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 meMay 21, 2014 at 8:22 am #38762
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)
const SPODMesh& mesh(pod_.pMesh[mesh_id]);
for(unsigned int vertex_id = 0; vertex_id < mesh.nNumVertex; ++vertex_id)
PVRTVec3 v = *(PVRTVec3*)(mesh.pInterleaved + mesh.sVertex.nStride * vertex_id);
JoeMay 22, 2014 at 8:27 pm #38763
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.May 23, 2014 at 9:16 am #38764
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: http://www.bulletphysics.org/mediawiki-1.5.8/index.php/Hello_World
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.