error tolerance in GjkPairDetector?
Posted: Sun Mar 26, 2017 12:16 pm
I want to use bullet physics to measure the distance between convex objects (boxes) and use the GjkPairDetector with the VoronoiSimplexSolver and the GjkEpaPenetrationDepthSolver.
A simple test case shows results that are not exact enough for my needs.
My test objects:
Box0: center at position (1|0|0), size=(1|1|1)
Box1: center at position (-1|2|0), size=(1|1|1)
Box2: center at position (5|3|0), size=(1|1|1)
expected distances:
d( Box0 | Box1) = 0.0
d( Box0 | Box2) = 2.23606
d( Box1 | Box2) = 4.0
computed distance between Box0 and Box1 is
0.033137 with
point_Box0 = (-0.0117157 | 1.01172 | 0.96)
point_Box1 = (0.0117157 | 0.988284 | 0.96)
computed distance between Box0 and Box2 is
2.26367 with
point_Box0 = (4.0045 | 2.02157 | 0.96)
point_Box2 = (1.9955 | 0.978433 | 0.96)
The distance between Box1 and Box2 is computed correctly.
Is there any way to reduce the error such that getClosestPoints returns results with an accuracy of at least four decimal places?
Any help would be appreciated!
A simple test case shows results that are not exact enough for my needs.
My test objects:
Box0: center at position (1|0|0), size=(1|1|1)
Box1: center at position (-1|2|0), size=(1|1|1)
Box2: center at position (5|3|0), size=(1|1|1)
expected distances:
d( Box0 | Box1) = 0.0
d( Box0 | Box2) = 2.23606
d( Box1 | Box2) = 4.0
computed distance between Box0 and Box1 is
0.033137 with
point_Box0 = (-0.0117157 | 1.01172 | 0.96)
point_Box1 = (0.0117157 | 0.988284 | 0.96)
computed distance between Box0 and Box2 is
2.26367 with
point_Box0 = (4.0045 | 2.02157 | 0.96)
point_Box2 = (1.9955 | 0.978433 | 0.96)
The distance between Box1 and Box2 is computed correctly.
Is there any way to reduce the error such that getClosestPoints returns results with an accuracy of at least four decimal places?
Any help would be appreciated!