How to get a workable convexmesh for a triangle mesh such as a .obj model

I want to simulate the triangle mesh as a dynamic actor, so I want to create a convexmesh for it
and use this convexmesh to creat a dynmic actor’s shape to collide. But I have no idea building a workable convexmesh from
a triangle mesh since the limit number of the vertexs are 255.
Who can help me…

The SDK provided examples for creating convex meshes via cooking. The input mesh vertex count in not related to the 256…That is the limit of what the cooking process will output. Creating a convex mesh is a simple as setting up the correct structures based on the input vertex data( your triangle mesh ), and invoking the Cooking API. So

  1. Fill out a physx::PxConvexMeshDesc structure.

  2. Create an object that inherits from physx::PxOutputStream ( a PxOutputStream is required by the cooking API).

  3. Call the cookConvexMesh method of your cooking interface, passing in the 2 PxConvexMeshDesc and your PxOutputStream instance.

  4. Create an object that inherits from physx::PxInputStream( this is need in order to create the actual convex mesh. )

  5. Call the createConvexMesh method of your PxPhysics interface object, passing in your PxInputStream object.