I am new to Bullet Physics and stuck with some things related to the AABB-Tree from btDbvt and I hope you can help me a bit.
I just started working on deformable haptic rendering with 3D-objects. We use the chai3d library for the haptic device and want to use VEGA FEM for the deformation simulation. A problem occurring with the VEGA lib is that it has no collision detection implemented. In my research i found a thesis by Ziyun Li in which they use the dtDbvt from bullet to detect collisions. (https://www.ruor.uottawa.ca/bitstream/1 ... thesis.pdf)
We planned to use this AABB-tree aswell but now i struggle a bit to get all working, especially the rayTest.
What i did by now is to try to import the mesh in the AABB-tree (what I am not sure if its correct like i try it):
Code: Select all
btDbvt *tree = new btDbvt();
btDbvtVolume volume;
btDbvtNode node;
// extract point data from loaded mesh
deformableObjectRenderingMesh->ExportMeshGeometry(&vertexCount, &vertexData, &triangleCount, &triangleData);
// create AABB-tree with btDbvt from Bullet Physics Library
int j = 0;
for (int i = 0; i < vertexCount*3; i=i+3) {
btVector3 pointdata = btVector3(vertexData[i],vertexData[i+1],vertexData[i+2]);
volume.FromPoints(&pointdata,3);
cout << j << " " << vertexData[i] << " " << vertexData[i+1] << " " << vertexData[i+2] << endl;
j = j+1;
tree->insert(volume,node.data);
}
All examples uses the world object. In general is it possible to use this AABB-Tree without the world object? And if yes, can you give me a quick help with how the DBVT_IPOLICY is to use.
I hope someone can help me . Thank you a lot.
cheers renoster