xmsgrid
1.0
|
Tests for GmMultiPolyIntersector. More...
Public Member Functions | |
void | test1OutOut () |
void | test1OutIn () |
void | test1InOut () |
void | test1InIn () |
void | test1OnOn () |
void | test1OnIn () |
void | test1InOn () |
void | test1OutOn () |
void | test1OnOut () |
void | test1EdgeInIn () |
void | test1EdgePtPt () |
void | test1EdgeOutOut () |
void | test1EdgeOutIn () |
void | test1EdgeInOut () |
void | test1OutPt () |
void | test1OutPtOut () |
void | test1AllOut () |
void | test1PtIn () |
void | test1InPt () |
void | test2OnOn () |
void | test2InOn () |
void | test2OnIn () |
void | test2OutOut () |
void | test2OutIn () |
void | test2InOut () |
void | test2InIn () |
void | test2InPt () |
void | test2PtIn () |
void | test2InEdgePt () |
void | testCorners () |
void | testQuadCorners () |
void | testQuadCornersBug12396 () |
void | test2InOutIn () |
void | testInsideToInside () |
Given 1 x 2 2D grid turned into triangles with point at poly center triangles numbered as follows: More... | |
void | testOutsideToOutside () |
Given 1 x 2 2D grid turned into triangles with point at poly center triangles numbered as follows: More... | |
void | testTouchesVertex () |
Given 1 x 2 2D grid turned into triangles with point at poly center triangles numbered as follows: More... | |
void | testTouchesEdge () |
Given 1 x 2 2D grid turned into triangles with point at poly center triangles numbered as follows: More... | |
void | testAlongEdgesInsideToInside () |
Given 3 x 3 2D grid turned into triangles with point at poly center triangles numbered as follows: More... | |
void | testAlongEdgesOutsideToOutside () |
Given 3 x 3 2D grid turned into triangles with point at poly center triangles numbered as follows: More... | |
void | testEdgeThroughOppositeVertexAtAngle () |
Given 1 x 2 2D grid turned into triangles with point at poly center triangles numbered as follows: More... | |
void | testStartAtEdgeThroughAdjacent () |
Given 1 x 2 2D grid turned into triangles with point at poly center triangles numbered as follows: More... | |
void | testInsideToEdgeThenThroughAdjacent () |
Given 1 x 2 2D grid turned into triangles with point at poly center triangles numbered as follows: More... | |
void | testEndAtEdgeFromAdjacent () |
Given 1 x 2 2D grid turned into triangles with point at poly center triangles numbered as follows: More... | |
void | testSmsCase1 () |
This case revealed the need for a tolerance when comparing t values. | |
void | testMap2MfBug () |
We only do the first part: inside to edge. More... | |
Tests for GmMultiPolyIntersector.
Definition at line 29 of file GmMultiPolyIntersector.t.h.
void GmMultiPolyIntersectorUnitTests::test1AllOut | ( | ) |
// 2 // / (10,10) // 1 3-------------2 // | | // | | // | 1 | // | | // | | // 0-------------1 // (0,0) ///
Definition at line 1215 of file GmMultiPolyIntersector.cpp.
void GmMultiPolyIntersectorUnitTests::test1EdgeInIn | ( | ) |
// (10,10) // 3----0----1---2 // | | // | | // | 1 | // | | // | | // 0-------------1 // (0,0) ///
Definition at line 1032 of file GmMultiPolyIntersector.cpp.
void GmMultiPolyIntersectorUnitTests::test1EdgeInOut | ( | ) |
// (10,10) // 3------1------2--2 // | | // | | // | 1 | // | | // | | // 0-------------1 // (0,0) ///
Definition at line 1138 of file GmMultiPolyIntersector.cpp.
void GmMultiPolyIntersectorUnitTests::test1EdgeOutIn | ( | ) |
// (10,10) // 1--3------2------2 // | | // | | // | 1 | // | | // | | // 0-------------1 // (0,0) ///
Definition at line 1106 of file GmMultiPolyIntersector.cpp.
void GmMultiPolyIntersectorUnitTests::test1EdgeOutOut | ( | ) |
// (10,10) // 1--3-------------2--2 // | | // | | // | 1 | // | | // | | // 0-------------1 // (0,0) ///
Definition at line 1080 of file GmMultiPolyIntersector.cpp.
void GmMultiPolyIntersectorUnitTests::test1EdgePtPt | ( | ) |
// (10,10) // 3|1-----------2|2 // | | // | | // | 1 | // | | // | | // 0-------------1 // (0,0) ///
Definition at line 1056 of file GmMultiPolyIntersector.cpp.
void GmMultiPolyIntersectorUnitTests::test1InIn | ( | ) |
// (10,10) // 3-------------2 // | | // | 0--------1 | // | | // | 1 | // | | // 0-------------1 // (0,0) ///
Definition at line 888 of file GmMultiPolyIntersector.cpp.
void GmMultiPolyIntersectorUnitTests::test1InOn | ( | ) |
// (10,10) // 3-------------2 // | | // | 0------1 // | | // | 1 | // | | // 0-------------1 // (0,0) ///
Definition at line 960 of file GmMultiPolyIntersector.cpp.
void GmMultiPolyIntersectorUnitTests::test1InOut | ( | ) |
// (10,10) // 3-------------2 // | | // | 0----------1 // | | // | 1 | // | | // 0-------------1 // (0,0) ///
Definition at line 864 of file GmMultiPolyIntersector.cpp.
void GmMultiPolyIntersectorUnitTests::test1InPt | ( | ) |
// (10,10) // 3|------1-----2|2 // | | // | | // | 1 | // | | // | | // 0-------------1 // (0,0) ///
Definition at line 1263 of file GmMultiPolyIntersector.cpp.
void GmMultiPolyIntersectorUnitTests::test1OnIn | ( | ) |
// (10,10) // 3-------------2 // | | // 0------1 | // | | // | 1 | // | | // 0-------------1 // (0,0) ///
Definition at line 936 of file GmMultiPolyIntersector.cpp.
void GmMultiPolyIntersectorUnitTests::test1OnOn | ( | ) |
// (10,10) // 3-------------2 // | | // 0-------------1 // | | // | 1 | // | | // 0-------------1 // (0,0) ///
Definition at line 912 of file GmMultiPolyIntersector.cpp.
void GmMultiPolyIntersectorUnitTests::test1OnOut | ( | ) |
// (10,10) // 3-------------2 // | | // | 0--1 // | 1 | // | | // | | // 0-------------1 // (0,0) ///
Definition at line 1008 of file GmMultiPolyIntersector.cpp.
void GmMultiPolyIntersectorUnitTests::test1OutIn | ( | ) |
// (10,10) // 3-------------2 // | | // 0----------1 | // | | // | 1 | // | | // 0-------------1 // (0,0) ///
Definition at line 840 of file GmMultiPolyIntersector.cpp.
void GmMultiPolyIntersectorUnitTests::test1OutOn | ( | ) |
// (10,10) // 3-------------2 // | | // 0--1 | // | 1 | // | | // | | // 0-------------1 // (0,0) ///
Definition at line 984 of file GmMultiPolyIntersector.cpp.
void GmMultiPolyIntersectorUnitTests::test1OutOut | ( | ) |
// (10,10) // 3-------------2 // | | // 0------------------1 // | | // | 1 | // | | // 0-------------1 // (0,0) ///
Definition at line 816 of file GmMultiPolyIntersector.cpp.
void GmMultiPolyIntersectorUnitTests::test1OutPt | ( | ) |
// (10,10) // 1-2|3-------------2 // | | // | | // | 1 | // | | // | | // 0-------------1 // (0,0) ///
Definition at line 1165 of file GmMultiPolyIntersector.cpp.
void GmMultiPolyIntersectorUnitTests::test1OutPtOut | ( | ) |
// 2 // / (10,10) // 3-------------2 // /| | // 1 | | // | 1 | // | | // | | // 0-------------1 // (0,0) ///
Definition at line 1190 of file GmMultiPolyIntersector.cpp.
void GmMultiPolyIntersectorUnitTests::test1PtIn | ( | ) |
// (10,10) // 3|1-----2------2 // | | // | | // | 1 | // | | // | | // 0-------------1 // (0,0) ///
Definition at line 1239 of file GmMultiPolyIntersector.cpp.
void GmMultiPolyIntersectorUnitTests::test2InEdgePt | ( | ) |
// (0,10) // 3------1-----4|-------------5 2 // | | | // | | | // | 1 | 2 | // | | | // | | | // 0-------------1-------------2 // (0,0) (20,0) ///
Definition at line 1500 of file GmMultiPolyIntersector.cpp.
void GmMultiPolyIntersectorUnitTests::test2InIn | ( | ) |
// (0,10) // 3-------------4-------------5 // | | | // | 0-------------1 | // | | | // | 1 | 2 | // | | | // 0-------------1-------------2 // (0,0) (20,0) ///
Definition at line 1431 of file GmMultiPolyIntersector.cpp.
void GmMultiPolyIntersectorUnitTests::test2InOn | ( | ) |
// (0,10) // 3-------------4-------------5 // | | | // | 0-------1 | // | | | // | 1 | 2 | // | | | // 0-------------1-------------2 // (0,0) (20,0) ///
Definition at line 1311 of file GmMultiPolyIntersector.cpp.
void GmMultiPolyIntersectorUnitTests::test2InOut | ( | ) |
// (0,10) // 3-------------4-------------5 // | | | // | 0---------------------1 // | | | // | 1 | 2 | // | | | // 0-------------1-------------2 // (0,0) (20,0) ///
Definition at line 1407 of file GmMultiPolyIntersector.cpp.
void GmMultiPolyIntersectorUnitTests::test2InOutIn | ( | ) |
// (0,20) // 3-------------2 // | 1 | // | \| // | 1 \ // | |\ // | | \ // 0-------------1--\----------6 // | \ | // | 2 | // | | // | 2 | // | | // 4-------------5 // (0,0) (20,0) ///
Definition at line 1647 of file GmMultiPolyIntersector.cpp.
void GmMultiPolyIntersectorUnitTests::test2InPt | ( | ) |
// (0,10) // 3------1-----2|4-------------5 // | | | // | | | // | 1 | 2 | // | | | // | | | // 0-------------1-------------2 // (0,0) (20,0) ///
Definition at line 1454 of file GmMultiPolyIntersector.cpp.
void GmMultiPolyIntersectorUnitTests::test2OnIn | ( | ) |
// (0,10) // 3-------------4-------------5 // | | | // | 0-------1 | // | | | // | 1 | 2 | // | | | // 0-------------1-------------2 // (0,0) (20,0) ///
Definition at line 1335 of file GmMultiPolyIntersector.cpp.
void GmMultiPolyIntersectorUnitTests::test2OnOn | ( | ) |
// (0,10) // 3-------------4-------------5 // | | | // 0-------------1 | // | | | // | 1 | 2 | // | | | // 0-------------1-------------2 // (0,0) (20,0) ///
Definition at line 1287 of file GmMultiPolyIntersector.cpp.
void GmMultiPolyIntersectorUnitTests::test2OutIn | ( | ) |
// (0,10) // 3-------------4-------------5 // | | | // 0------------------------1 | // | | | // | 1 | 2 | // | | | // 0-------------1-------------2 // (0,0) (20,0) ///
Definition at line 1383 of file GmMultiPolyIntersector.cpp.
void GmMultiPolyIntersectorUnitTests::test2OutOut | ( | ) |
// (0,10) // 3-------------4-------------5 // | | | // 0--------------------------------1 // | | | // | 1 | 2 | // | | | // 0-------------1-------------2 // (0,0) (20,0) ///
Definition at line 1359 of file GmMultiPolyIntersector.cpp.
void GmMultiPolyIntersectorUnitTests::test2PtIn | ( | ) |
// (0,10) // 3------------4|1-----2------5 // | | | // | | | // | 1 | 2 | // | | | // | | | // 0-------------1-------------2 // (0,0) (20,0) ///
Definition at line 1477 of file GmMultiPolyIntersector.cpp.
void GmMultiPolyIntersectorUnitTests::testAlongEdgesInsideToInside | ( | ) |
Given 3 x 3 2D grid turned into triangles with point at poly center triangles numbered as follows:
// // (0, 0) // +-------------+-------------+-------------+ // |\ 4 /|\ 8 /|\ 12 /| // | \ / | \ / | \ / | // | \ / | \ / | \ / | // | 1 x 3 | 5 x 7 | 9 x 11 | // | / 1 | / \ | / \ | // | / \ | / \ | / \ | // |/ 2 \|/ 6 \|/ 10 \| // +-------------+-------------+-------------+ // |\ 16 /|\ 20 /|\ 24 /| // | \ / | \ / | \ / | // | \ / | \ / | \ / | // | 13 x 15 | 17 x 19 | 21 x 23 | // | / \ | / \ | / \ | // | / \ | / \ | / \ | // |/ 14 \|/ 18 \|/ 22 \| // +-------------+-------------+-------------+ // |\ 28 /|\ 32 /|\ 36 /| // | \ / | \ / | \ / | // | \ / | \ / | 2 / | // | 25 x 27 | 29 x 31 | 33 x 35 | // | / \ | / \ | / \ | // | / \ | / \ | / \ | // |/ 26 \|/ 30 \|/ 34 \| // +-------------+-------------+-------------+ // (30, -30) ///
Definition at line 1818 of file GmMultiPolyIntersector.cpp.
References xms::trBuildGridTrianglePolys().
void GmMultiPolyIntersectorUnitTests::testAlongEdgesOutsideToOutside | ( | ) |
Given 3 x 3 2D grid turned into triangles with point at poly center triangles numbered as follows:
// // (0, 0) // 0-------------1-------------2-------------3 // |\ 4 /|\ 8 /|\ 12 /| // | \ / | \ / | \ / | // | \ / | \ / | \ / | // | 1 12 3 | 5 13 7 | 9 14 11 | // | / \ | / \ | / \ | // | / \ | / \ | / \ | // |/ 2 \|/ 6 \|/ 10 \| // 1 4-------------5-------------6-------------7 2 // |\ 16 /|\ 20 /|\ 24 /| // | \ / | \ / | \ / | // | \ / | \ / | \ / | // | 13 15 15 | 17 16 19 | 21 17 23 | // | / \ | / \ | / \ | // | / \ | / \ | / \ | // |/ 14 \|/ 18 \|/ 22 \| // 8-------------9------------10------------11 // (30, -20) ///
Definition at line 1865 of file GmMultiPolyIntersector.cpp.
References xms::trBuildGridTrianglePolys().
void GmMultiPolyIntersectorUnitTests::testCorners | ( | ) |
// (0,10) // 3-------------4-------------5 // | | | // | | | // | 1|1 | 2 | // | | | // | | | // 0------------2|1------------2 // (0,0) (20,0) ///
Definition at line 1532 of file GmMultiPolyIntersector.cpp.
void GmMultiPolyIntersectorUnitTests::testEdgeThroughOppositeVertexAtAngle | ( | ) |
Given 1 x 2 2D grid turned into triangles with point at poly center triangles numbered as follows:
// // (0, 0) // +-------------+-------------+ // |\ 4 /|\ 8 /| // | \ / | \ / | // | \ / 1 | \ / | // | 1 x 3 | 5 x 7 | // | / \ | / \ | 2 // | / \ | / \ | // |/ 2 \|/ 6 \| // +-------------+-------------+ // (20, -10) ///
Definition at line 1898 of file GmMultiPolyIntersector.cpp.
References xms::trBuildGridTrianglePolys().
void GmMultiPolyIntersectorUnitTests::testEndAtEdgeFromAdjacent | ( | ) |
Given 1 x 2 2D grid turned into triangles with point at poly center triangles numbered as follows:
// // (0, 0) // +-------------+-------------+ // |\ 4 /|\ 8 /| // | \ / | \ / | // | \ / | \ / | // | 1 x 3 | 5 x 7 | // | / \ | / \ | // | / \ | / \ | // |/ 2 \|/ 6 \| // +-------------+-------------+ // (20, -10) ///
Definition at line 2039 of file GmMultiPolyIntersector.cpp.
References xms::trBuildGridTrianglePolys().
void GmMultiPolyIntersectorUnitTests::testInsideToEdgeThenThroughAdjacent | ( | ) |
Given 1 x 2 2D grid turned into triangles with point at poly center triangles numbered as follows:
We only do the first part: inside to edge.
// // (0, 0) // +-------------+-------------+ // |\ 4 /|\ 8 /| // | \ / | \ / | // | \ / | \ / | // | 1 x 3 | 5 x 7 | // | / \ | / \ | // | / \ | / \ | // |/ 2 \|/ 6 \| // +-------------+-------------+ // (20, -10) ///
Definition at line 1972 of file GmMultiPolyIntersector.cpp.
References xms::trBuildGridTrianglePolys().
void GmMultiPolyIntersectorUnitTests::testInsideToInside | ( | ) |
Given 1 x 2 2D grid turned into triangles with point at poly center triangles numbered as follows:
// // (0, 0) // 0-------------1-------------2 // |\ 4 /|\ 8 /| // | \ 1 / | \ / | // | \ / | \ / | // | 1 3 3 | 5 4 7 | // | / \ | / \ | // | / \ | / 2 \ | // |/ 2 \|/ 6 \| // 5-------------6-------------7 // (20, -10) ///
Definition at line 1676 of file GmMultiPolyIntersector.cpp.
References xms::trBuildGridTrianglePolys().
void GmMultiPolyIntersectorUnitTests::testMap2MfBug | ( | ) |
We only do the first part: inside to edge.
///
Definition at line 1995 of file GmMultiPolyIntersector.cpp.
void GmMultiPolyIntersectorUnitTests::testOutsideToOutside | ( | ) |
Given 1 x 2 2D grid turned into triangles with point at poly center triangles numbered as follows:
// // (0, 0) // 1 0-------------1-------------2 // |\ 4 /|\ 8 /| // | \ / | \ / | // | \ / | \ / | // | 1 3 3 | 5 4 7 | // | / \ | / \ | // | / \ | / \ | // |/ 2 \|/ 6 \| // 5-------------6-------------7 2 // (20, -10) ///
Definition at line 1709 of file GmMultiPolyIntersector.cpp.
References xms::trBuildGridTrianglePolys().
void GmMultiPolyIntersectorUnitTests::testQuadCorners | ( | ) |
// Pt 0: (104.346,-300.604,48.558) // Pt 1: (105.148,-298.88,48.225) // Pt 2: (105.994,-297.142,47.225) // Pt 3: (110.439,-299.669,48.533) // Pt 4: (109.543,-301.391,47.2) // Pt 5: (108.738,-303.082,47.867) // Pt 6: (113.06,-305.811,47.175) // Pt 7: (113.886,-304.089,48.175) // 2-------------3 // | | \ // | | \ // | 2 | \ // | | 3 \ // | | \ // 1-------------4-------------7 // | | | // | | | // | 1 | 4 | // | | | // | | | // 0-------------5-------------6 // (0,0) (20,0) ///
Definition at line 1571 of file GmMultiPolyIntersector.cpp.
void GmMultiPolyIntersectorUnitTests::testQuadCornersBug12396 | ( | ) |
// Pt 0: (263.313, -361.915, 47.375) // Pt 1: (263.914, -360.497, 46.375) // Pt 2: (264.582, -358.729, 48.375) // Pt 3: (269.892, -359.609, 48.35) // Pt 4: (269.228, -361.033, 46.35) // Pt 5: (268.569, -362.502, 47.35) // Pt 6: (273.694, -363.319, 47.325) // Pt 7: (274.372, -361.835, 46.325) // Pt 8: (275.054, -360.401, 48.325) // 2-------------3-------------8 // | | | // | | | // | 2 | 3 | // | | | // | | | // 1------p0---p1|4------------7 // | | | // | | | // | 1 | 4 | // | | | // | | | // 0-------------5-------------6 ///
Definition at line 1614 of file GmMultiPolyIntersector.cpp.
void GmMultiPolyIntersectorUnitTests::testStartAtEdgeThroughAdjacent | ( | ) |
Given 1 x 2 2D grid turned into triangles with point at poly center triangles numbered as follows:
// // (0, 0) 2 // +-------------+-------------+ // |\ 4 /|\ 8 /| // | \ / | \ / | // | \ / | \ / | // | 1 x 3 | 5 x 7 | // | / \ | / \ | // | / \ 1 / \ | // |/ 2 \|/ 6 \| // +-------------+-------------+ // (20, -10) ///
Definition at line 1936 of file GmMultiPolyIntersector.cpp.
References xms::trBuildGridTrianglePolys().
void GmMultiPolyIntersectorUnitTests::testTouchesEdge | ( | ) |
Given 1 x 2 2D grid turned into triangles with point at poly center triangles numbered as follows:
// // (0, 0) // 0-------------1-------------2 // 1 |\ 4 /|\ 8 /| // \ | \ / | \ / | // 2| \ / | \ / | // | 1 3 3 | 5 4 7 | // | / \ | / \ | // | / \ | / \ | // |/ 2 \|/ 6 \| // 5-------------6-------------7 2 // (20, -10) ///
Definition at line 1771 of file GmMultiPolyIntersector.cpp.
References xms::trBuildGridTrianglePolys().
void GmMultiPolyIntersectorUnitTests::testTouchesVertex | ( | ) |
Given 1 x 2 2D grid turned into triangles with point at poly center triangles numbered as follows:
// // 1 //(0,0) / // 0-------------1-------------2 // /|\ 4 /|\ 8 /| // 2 | \ / | \ / | // | \ / | \ / | // | 1 3 3 | 5 4 7 | // | / \ | / \ | // | / \ | / \ | // |/ 2 \|/ 6 \| // 5-------------6-------------7 2 // (20, -10) ///
Definition at line 1742 of file GmMultiPolyIntersector.cpp.
References xms::trBuildGridTrianglePolys().