BulletPhysics/BulletSharp 中的多线程? [英] Multithreading in BulletPhysics / BulletSharp?
问题描述
BulletSharp(或 BulletPhysics 本身,如果您不了解 BulletSharp)可以在多线程模式下工作吗?如果是这样,我在哪里可以找到合适的设置?(比如开/关多线程,numOfThreads,...)
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, ...)
注意:BulletSharp 是 BulletPhysics 的 C# 包装器.
PS:我知道,有问题,但:- 没有全面的答案- 从那时起,桥下流过很多水- 在目前的 BulletSharp/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.
感谢您提供任何信息
推荐答案
是的,Bullet 中的多线程最近恢复了.BulletSharp P/Invoke 0.10 添加了多线程和 demo 展示了如何设置.
Yes, multithreading in Bullet was recently revived. BulletSharp P/Invoke 0.10 added multithreading and the demo shows how to set it up.
使用 CollisionDispatcherMultiThreaded、ConstraintSolverPoolMultiThreaded、DiscreteDynamicsWorldMultiThreaded 代替单线程类,并在 Threads.TaskScheduler 中设置一些可用的调度程序(OpenMP、PPL 或 TBB).
Use CollisionDispatcherMultiThreaded, ConstraintSolverPoolMultiThreaded, DiscreteDynamicsWorldMultiThreaded in place of the single threaded classes and set up some available scheduler (OpenMP, PPL or TBB) at Threads.TaskScheduler.
多线程将很快添加到 BulletSharp C++/CLI,如果这是您正在使用的.
Multithreading will be added to BulletSharp C++/CLI soon if that is what you are using.
Bullet 3 中 GPU 管道的工作似乎已经停止,因此目前没有计划在 BulletSharp 中支持版本 3.
Work on the GPU pipeline in Bullet 3 seems to have stopped, so there are currently no plans to support version 3 in BulletSharp.
这篇关于BulletPhysics/BulletSharp 中的多线程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!