xmsgeom  1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
GmMultiPolyIntersectorUnitTests Class Reference

Tests for GmMultiPolyIntersector. More...

Inheritance diagram for GmMultiPolyIntersectorUnitTests:

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 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...
 

Detailed Description

Tests for GmMultiPolyIntersector.

Definition at line 30 of file GmMultiPolyIntersector.t.h.

Member Function Documentation

void GmMultiPolyIntersectorUnitTests::test1AllOut ( )
//   2
//  /              (10,10)
// 1  3-------------2
//    |             |
//    |             |
//    |      1      |
//    |             |
//    |             |
//    0-------------1
// (0,0)
/// 

Definition at line 1032 of file GmMultiPolyIntersector.cpp.

void GmMultiPolyIntersectorUnitTests::test1EdgeInIn ( )
//               (10,10)
//    3----0----1---2
//    |             |
//    |             |
//    |      1      |
//    |             |
//    |             |
//    0-------------1
// (0,0)
/// 

Definition at line 848 of file GmMultiPolyIntersector.cpp.

void GmMultiPolyIntersectorUnitTests::test1EdgeInOut ( )
//               (10,10)
//    3------1------2--2
//    |             |
//    |             |
//    |      1      |
//    |             |
//    |             |
//    0-------------1
// (0,0)
/// 

Definition at line 956 of file GmMultiPolyIntersector.cpp.

void GmMultiPolyIntersectorUnitTests::test1EdgeOutIn ( )
//               (10,10)
// 1--3------2------2
//    |             |
//    |             |
//    |      1      |
//    |             |
//    |             |
//    0-------------1
// (0,0)
/// 

Definition at line 922 of file GmMultiPolyIntersector.cpp.

void GmMultiPolyIntersectorUnitTests::test1EdgeOutOut ( )
//               (10,10)
// 1--3-------------2--2
//    |             |
//    |             |
//    |      1      |
//    |             |
//    |             |
//    0-------------1
// (0,0)
/// 

Definition at line 896 of file GmMultiPolyIntersector.cpp.

void GmMultiPolyIntersectorUnitTests::test1EdgePtPt ( )
//               (10,10)
//   3|1-----------2|2
//    |             |
//    |             |
//    |      1      |
//    |             |
//    |             |
//    0-------------1
// (0,0)
/// 

Definition at line 872 of file GmMultiPolyIntersector.cpp.

void GmMultiPolyIntersectorUnitTests::test1InIn ( )
//               (10,10)
//    3-------------2
//    |             |
//    |  0--------1 |
//    |             |
//    |      1      |
//    |             |
//    0-------------1
// (0,0)
/// 

Definition at line 709 of file GmMultiPolyIntersector.cpp.

void GmMultiPolyIntersectorUnitTests::test1InOn ( )
//               (10,10)
//    3-------------2
//    |             |
//    |      0------1
//    |             |
//    |      1      |
//    |             |
//    0-------------1
// (0,0)
/// 

Definition at line 778 of file GmMultiPolyIntersector.cpp.

void GmMultiPolyIntersectorUnitTests::test1InOut ( )
//               (10,10)
//    3-------------2
//    |             |
//    |       0----------1
//    |             |
//    |      1      |
//    |             |
//    0-------------1
// (0,0)
/// 

Definition at line 686 of file GmMultiPolyIntersector.cpp.

void GmMultiPolyIntersectorUnitTests::test1InPt ( )
//                 (10,10)
//   3|------1-----2|2
//    |             |
//    |             |
//    |      1      |
//    |             |
//    |             |
//    0-------------1
// (0,0)
/// 

Definition at line 1080 of file GmMultiPolyIntersector.cpp.

void GmMultiPolyIntersectorUnitTests::test1OnIn ( )
//               (10,10)
//    3-------------2
//    |             |
//    0------1      |
//    |             |
//    |      1      |
//    |             |
//    0-------------1
// (0,0)
/// 

Definition at line 755 of file GmMultiPolyIntersector.cpp.

void GmMultiPolyIntersectorUnitTests::test1OnOn ( )
//               (10,10)
//    3-------------2
//    |             |
//    0-------------1
//    |             |
//    |      1      |
//    |             |
//    0-------------1
// (0,0)
/// 

Definition at line 732 of file GmMultiPolyIntersector.cpp.

void GmMultiPolyIntersectorUnitTests::test1OnOut ( )
//               (10,10)
//    3-------------2
//    |             |
//    |             0--1
//    |      1      |
//    |             |
//    |             |
//    0-------------1
// (0,0)
/// 

Definition at line 824 of file GmMultiPolyIntersector.cpp.

void GmMultiPolyIntersectorUnitTests::test1OutIn ( )
//               (10,10)
//    3-------------2
//    |             |
//  0----------1    |
//    |             |
//    |      1      |
//    |             |
//    0-------------1
// (0,0)
/// 

Definition at line 663 of file GmMultiPolyIntersector.cpp.

void GmMultiPolyIntersectorUnitTests::test1OutOn ( )
//               (10,10)
//    3-------------2
//    |             |
// 0--1             |
//    |      1      |
//    |             |
//    |             |
//    0-------------1
// (0,0)
/// 

Definition at line 801 of file GmMultiPolyIntersector.cpp.

void GmMultiPolyIntersectorUnitTests::test1OutOut ( )
//               (10,10)
//    3-------------2
//    |             |
//  0------------------1
//    |             |
//    |      1      |
//    |             |
//    0-------------1
// (0,0)
/// 

Definition at line 639 of file GmMultiPolyIntersector.cpp.

void GmMultiPolyIntersectorUnitTests::test1OutPt ( )
//               (10,10)
// 1-2|3-------------2
//    |             |
//    |             |
//    |      1      |
//    |             |
//    |             |
//    0-------------1
// (0,0)
/// 

Definition at line 982 of file GmMultiPolyIntersector.cpp.

void GmMultiPolyIntersectorUnitTests::test1OutPtOut ( )
//      2
//     /            (10,10)
//    3-------------2
//   /|             |
//  1 |             |
//    |      1      |
//    |             |
//    |             |
//    0-------------1
// (0,0)
/// 

Definition at line 1007 of file GmMultiPolyIntersector.cpp.

void GmMultiPolyIntersectorUnitTests::test1PtIn ( )
//                 (10,10)
//   3|1-----2------2
//    |             |
//    |             |
//    |      1      |
//    |             |
//    |             |
//    0-------------1
// (0,0)
/// 

Definition at line 1056 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 1325 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 1253 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 1128 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 1228 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 1366 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 1277 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 1152 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 1104 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 1202 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 1176 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 1301 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 1539 of file GmMultiPolyIntersector.cpp.

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 1586 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 1621 of file GmMultiPolyIntersector.cpp.

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 1773 of file GmMultiPolyIntersector.cpp.

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 1696 of file GmMultiPolyIntersector.cpp.

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 1395 of file GmMultiPolyIntersector.cpp.

void GmMultiPolyIntersectorUnitTests::testMap2MfBug ( )

We only do the first part: inside to edge.

/// 

Definition at line 1719 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 1428 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 1659 of file GmMultiPolyIntersector.cpp.

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 1492 of file GmMultiPolyIntersector.cpp.

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 1463 of file GmMultiPolyIntersector.cpp.


The documentation for this class was generated from the following files: