bepu / bepuphysics2

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

Mesh-mesh support #39

Closed RossNordby closed 5 years ago

RossNordby commented 6 years ago

The beta is shipping with no mesh-mesh support. There is no fundamental reason; I just didn't want to delay a packaged beta for a fairly low value feature.

The most significant chunk of work required to bring mesh-mesh online is fixing triangle-triangle. The current version sort-of-works, but I moved on before perfecting it. Currently, it can generate some goofy contacts at oblique angles. The key change is doing all contact clipping on the plane defined by the contact normal, similar to what was already done in the box-triangle case.

Given that mesh-mesh would tend to imply fairly complicated shapes, it would also benefit from dedicated tree vs tree traversal rather than the general purpose 'all children of A against local tree of B'.

RossNordby commented 5 years ago

Added in 68f821279bc079707b602f2f465d3b1b36b37ea6 in a lazy way. No effort put into efficient dedicated midphase test; uses n * log(m) semibruteforce. Now that it's supported, ignore it, mesh-mesh is pretty much always a bad idea!