For 2.4, MeshReduction has taken a dependency on the Mesh type. Previously, it worked for any IHomogeneousCompoundShape<Triangle, TriangleWide>, and I'd like to return to that level of support. Mesh is the only such type at the moment, but that is planned to change later.
Given that generic type awareness of the container cannot be passed through at the function level (convex-triangle tests are batched from many sources, so you'd only have the type parameter for the last call prior to flushing), there needs to be an indirection. Currently, a switch chooses from the various hardcoded reduction paths. That switch could be swapped out for a more general indirection, allowing custom reduction passes.
This would require the CollisionBatcher consume a continuation registry, like it currently consumes a pair type registry. Could also use a indirectionless fast path for the most common 'no reduction' case.
The cost of the indirection is effectively meaningless compared to what the reduction algorithms do, especially for meshes.
For 2.4,
MeshReduction
has taken a dependency on theMesh
type. Previously, it worked for anyIHomogeneousCompoundShape<Triangle, TriangleWide>
, and I'd like to return to that level of support.Mesh
is the only such type at the moment, but that is planned to change later.Given that generic type awareness of the container cannot be passed through at the function level (convex-triangle tests are batched from many sources, so you'd only have the type parameter for the last call prior to flushing), there needs to be an indirection. Currently, a switch chooses from the various hardcoded reduction paths. That switch could be swapped out for a more general indirection, allowing custom reduction passes.
This would require the
CollisionBatcher
consume a continuation registry, like it currently consumes a pair type registry. Could also use a indirectionless fast path for the most common 'no reduction' case.The cost of the indirection is effectively meaningless compared to what the reduction algorithms do, especially for meshes.