Multithreading in BulletPhysics / BulletSharp?

这一生的挚爱 提交于 2019-12-25 01:45:17

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!