Skip to content

BUG: OBB point fixed, triangle line fixed, small delta default for implicitgeometrytopointset

Andrew Wilson requested to merge andrew.wilson/iMSTK:GeometryFixes into master

3 Slightly related issues.

  • Triangle to line intersection function had some very very tricky edge cases for which it didn't work. I never figured them out but replaced it with a more straightforward triangle to line function that works. This isn't the fastest triangle to line function and should be replaced in the future but for now there's no massive performance impacts (given that the function has yet to be used in the few particularly critical spots you would expect for collision detection).
  • The OBB to point function also had a bug. Couldn't quite narrow down the case but fixed it.
  • Lastly a default of 0.001 was used for the central gradient in ImplicitGeometryToPointSetCD. This is particularly for using it with AnalyticalGeometries where small deltas are better (due to analytical definition). Whereas with an SDF a delta of size equivalent to spacing is preferable. Sometimes users will still need to set a smaller one for small AnalyticalGeometries or even ideally provide the gradient analytically so no dx is needed.
Edited by Andrew Wilson

Merge request reports