• David Eberly's avatar
    Major revision of distance-query subsystem. · 2381a3bd
    David Eberly authored
    Most of the distance subsystem of GTE was revised or rewritten, mainly to avoid the LCP solver which was a performance problem when object features were (nearly) parallel. The subsystem consists of linear algebraic objects: point, line, ray, segment, triangle, rectangle, plane, box. The Result objects now have constructors that initialize the members explicitly, and the member names are consistent among files. Derivation of distance queries involving aligned boxes and oriented boxes was removed by factoring out canonical boxes, which are aligned boxes with centers
    at the origin. An aligned box can be reduced to a canonical box by a translation. An oriented box can be reduced to a canonical box by a rotation and a translation. Unit tests were updated, and some classes needed unit testing. Validation of the unit-test results was performed using convex quadratic programming in Mathematica (via NMinimize).
    
    Several bugs were discovered and fixed. DistPointOrientedBox.h had a template alias using AlignedBox when it should have used OrientedBox. DistSegment3OrientedBox3.h had segExtent instead of -segExtent in the last else-block. DistSegment3Rectangle3.had segExtent instead of -segExtent in the last else-block.
    
    AlignedBox has a new member function GetVertices.
    
    Hyperplane has a new member 'origin', a point on the hyperplane.
    
    DistPoint3Rectangle3.h is obsolete, replaced by DistPointRectangle.h (distance in any dimension). DistPoint3Plane3 is obsolete, replaced by DistPointHyperplane.h (distance in any dimension).
    
    DistPointTriangleExact.h is obsolete, its code moved into DistPointTriangle.h DistSegmentSegmentExact.h is obsolete, its code moved into DistSegmentSegment.h.
    2381a3bd
CMakeLists.txt 1018 Bytes