What are the steps that bepu must undergo from me createing a static tri mesh to it being fullyintergrated into the broadphase and working?
It goes something like this:
1) Give vertices/indices to StaticMesh constructor.
2) Construct StaticMeshShape directly from inputed vertices/indices. This is the standard local-space Shape that all collision informations have. This step is just assigning some references, very simple and quick.
3) Construct the TriangleMesh data structure. This involves creating a new TriangleMeshBoundingBoxTree, which is by far the most expensive part of the process. The data is recursively split until it reaches the leaf nodes, generating garbage and performing large numbers of sorts.
4) Some miscellaneous other setup is performed. It's all nearly instant.
5) Adding the mesh to the space just involves inserting the collision entry into the broadphase dynamic hierarchy. As mentioned earlier, dynamic hierarchies are very quick. It's as expensive as inserting a simple box entity to the broadphase. The cost of adding/removing objects from the broadphase will probably be invisible compared to the reconstruction process.
when any are edited I need to rebuild the changed static tri mesh then re-add it.
Any Ideas on how I should go about all this?
Attempt to spread calculations over multiple frames as much as possible. Doing this with an individual StaticMesh wouldn't be trivial, but you can attempt to ensure that only one StaticMesh is being managed (edited, reconstructed) at a time to prevent frame hitches (which may end up being unavoidable).
A complete solution would come in the form of a custom usage of the dynamic hierarchies. The generalized dynamic hierarchy may be fast enough for changing meshes that you don't have to worry about doing anything tricky, but if it does need some extra help, it's not that difficult to spread the update process or even full reconstruction over multiple frames, preventing any single frame from jerking.