The motivation is, I want to export Maya scene to .bullet, and read .bullet in my application; then I want to export the position of each vertex in every frame to a geometry cache; Finally, I could import the geomtry cache into maya.
For example, maya scene contains Cube1 and Cube2. The transform node name and shape name of Cube1 are "pCube1" and "pCubeShape1"; and "pCube2" and "pCubeShape2" for Cube2.
Then the geometry cache can be written as:
Code: Select all
<channel> pCubeShape1 <\channel>
<size> 8 <\size>
<floatVectorArray>
-6.9397 -3.4768 2.53117 // positions of vertex
6.9397 -3.4768 2.53117
-6.9397 3.4768 2.53117
6.9397 3.4768 0.621983
-6.9397 3.4768 -2.53117
6.9397 3.4768 -0.621983
-6.9397 -3.4768 -2.53117
6.9397 -3.4768 -2.53117
<\floatVectorArray>
<channel> pCubeShape2 <\channel>
<size> 8 <\size>
<floatVectorArray>
-3.38128 -2.11329 1.29456
3.38128 -2.11329 1.29456
-3.38128 2.11329 1.29456
3.38128 -0.142298 1.29456
-3.38128 2.11329 -1.29456
3.38128 -0.142298 -1.29456
-3.38128 -2.11329 -1.29456
3.38128 -2.11329 -1.29456
<\floatVectorArray>
So, I hope .bullet could contain The transform node name and shape name of object.
P.S. I debug into the btCollisionShapeData, but I find the btCollisionShapeData::m_name is NULL.
Any suggestions?
Thank you.