oops sorry for the mistake in the post title but i can't edit the title text so:
ppMeshList and
THEIR world position...How to
access them ?
I'm working on the collision system for SPARK wrapper and i want to calculate the object AABB based on the object vertices
There will be 2 vectors (AABB.min and AABB.max)
But each time i get the vertexData pointer and read the positions of the vertices i get wrong positions (assuming that vertexPositions are not world positions) i tried it in dbpro and get the same wrong results with the vertexdata commands too (LOCK VERTEXDATA FOR LIMB and so on...)
then i figured out if i add the limb positions to the vertex positions i get the correct worldpos.
posx# = GET VERTEXDATA POSITION X(id) + GET LIMB POSITION X(1,1)
posy# = GET VERTEXDATA POSITION Y(id) + GET LIMB POSITION Y(1,1)
posz# = GET VERTEXDATA POSITION Z(id) + GET LIMB POSITION Z(1,1)
The question is how to access the mesh global positions ?
here's a part of a code for explanation :
vertices = (dbVertex *) meshList[ind]->pVertexData;
float vertX = vertices[i].x;
// gives wrong position
// meshList[ind] global position need to be added to vertX...
Thanks !
EDIT: Just found out thats not correct ... so i need the transform matrix because of the rotation and scale... but i can't find them... any ideas about this ?