Parameter 3 is the tolerance that will be use to construct the convex hull shape,

Parameter 4 is the id of the collision shape.

Parameter 3 is very important for tuning the performance of the engine.

Must people ignore it and always se 0, and that generate convex hull with more vertices than it may be necessary.

The convex hull routine in Newton is no like most convex hull routine use be other engines or by public domain algorithm like qhull, which generate an approximate of the convex hull.

Newton always generates an exact convex hull of the input data, I mean absolute exact hull with zero error.

This accuracy sometime works to degrade the performance of the engine because if the shape has too many vertices then the collision takes longer to converge to the solution.

That is where the third parameter comes in handy, it lets you adjust the accuracy of the collision shape generated by the algorithm

Before it was difficult for me to explaining this but now that I have the editor, I can take screen shots to explain it better.

Here is a shot of a relatively complex mesh and its exact convex hull shape

NewtonCollision* collision = NewtonCreateConvexHullFromMesh (m_newton, meshInfo->GetMesh(), 0.0f, 0);

Here is the same collision shape using, a 1% tolerance

NewtonCollision* collision = NewtonCreateConvexHullFromMesh (m_newton, meshInfo->GetMesh(), 0.01f, 0);

As you can see the collision shape have way fewer vertices than the exact one while it is almost identical.

The second shape is about 3 to for time faster in the collision than the first one.