问题
Could BulletSharp (or BulletPhysics itself, if you don't know about BulletSharp) work in multithreading mode? If so, where could I find appropriate settings? (like on/off multithreading, numOfThreads, ...)
note: BulletSharp is C# wrapper for BulletPhysics.
PS: I know, there is question, but: - there are no comprehensive answer - much water has flown under the bridge since that time - in present-day BulletSharp / BulletPhysics versions I could not find mentioned classes.
Thank you for any information
回答1:
Yes, multithreading in Bullet was recently revived. BulletSharp P/Invoke 0.10 added multithreading and the demo shows how to set it up.
Use CollisionDispatcherMultiThreaded, ConstraintSolverPoolMultiThreaded, DiscreteDynamicsWorldMultiThreaded in place of the single threaded classes and set up some available scheduler (OpenMP, PPL or TBB) at Threads.TaskScheduler.
Multithreading will be added to BulletSharp C++/CLI soon if that is what you are using.
Work on the GPU pipeline in Bullet 3 seems to have stopped, so there are currently no plans to support version 3 in BulletSharp.
来源:https://stackoverflow.com/questions/46080759/multithreading-in-bulletphysics-bulletsharp