The documentation around the vertex and mesh functions seems a little shy. I'm trying to directly manipulate to the vertices of an object... in my case a sphere. I'm trying something like:
if(dbObjectExist(objID)
{
dbMakeMeshFromObject(29, objID);
dbAddMeshToVertexData(29);
dbLockVertexDataForMesh(29);
int vertCount = dbGetVertexDataVertexCount();
for(int i = 0; i < vertCount; i++)
{
//Do something with each vertex
}
dbUnlockVertexData();
}
My questions are -- am I using the lock/unlock properly (are they even needed) and more importantly, after I do this, how do I get the mesh associated with my original object? I don't see a dbMakeObjectFromMesh function.
Is this all just crazy talk?!
Thanks.