- Code: Select all
vector<dVector> vParameters;
And here is my loading code:
- Code: Select all
case COLLISION_VERTEX_CLOUD:
{
if (bVerbose) TB_PRINTF("Vertex Cloud.\n");
int numVertices = CollisionShape->vParameters.size();
dFloat* const temp = new dFloat[numVertices * 3];
int count = 0;
for (int i = 0; i < numVertices; i++)
{
temp[count] = CollisionShape->vParameters[i].m_x; count++;
temp[count] = CollisionShape->vParameters[i].m_y; count++;
temp[count] = CollisionShape->vParameters[i].m_z; count++;
}
collision = NewtonCreateConvexHull(world, numVertices, &temp[0], 3 * sizeof(dFloat), 0.001f, (int)newEntity->GetObjID(), &matrix[0][0]);
delete[] temp;
}
break;
...
if(collision != NULL)
TBAddSubCollision(newEntity, objectCollision, collision);
I'm at a loss as to why this is happening, because both Release and Debug are loading the same data, and I haven't ever noticed this until I implemented vertex clouds in my code. I also have a log file (for debugging) showing the identical loading data for both Debug and Release.
In this particular case, I have 26 collision elements in a compound STATIC collision. These elements are fairly small, boxy elements with between 6-20 vertices at most, so nothing too taxing.
Any thoughts as to what this may be?