bepu / bepuphysics2

Pure C# 3D real time physics simulation library, now with a higher version number.
Apache License 2.0
2.25k stars 261 forks source link

CollisionBatcher shape data transposition intrinsification #157

Open RossNordby opened 2 years ago

RossNordby commented 2 years ago

With the adoption of .NET 5+ in the library, we have more efficient primitives for transposing AOS<->SOA. Based on the equivalent work in the solver, we can cut down the overhead of transposition significantly.

RossNordby commented 2 years ago

Note that the source of a shape for a CollisionBatcher add is not always directly held by the Simulation.Shapes collection. For example, creating a pair involving the triangle of a Mesh. Being able to load that data just in time requires a pointer to the data.

Note that the CollisionBatcher already has caching mechanisms for putting direct queries into a pointerable cache.

These are not blockers, just something to keep in mind.