MeshKit
1.0
|
#include <iostream>
#include <list>
#include "meshkit/AF2FreeZone.hpp"
#include "meshkit/AF2Point2D.hpp"
#include "TestUtil.hpp"
Go to the source code of this file.
Test the two-dimensional free zone object.
The free zone has four key capabilities -- (1) construction, (2) verification of convexity, (3) detection of point containment, and (4) detection of intersection with a line segment.
With the detection of point containment and detection of intersection, the free zone has the capability to not detect a containment or intersection in cases where the query point or line segment is approximately equal to some portion of the boundary.
Definition in file freeZone.cpp.
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 64 of file freeZone.cpp.
Definition at line 139 of file freeZone.cpp.
Definition at line 119 of file freeZone.cpp.
Definition at line 103 of file freeZone.cpp.
void testClockwiseSquare | ( | ) |
Definition at line 169 of file freeZone.cpp.
void testDiamondIntersectInwardRay | ( | ) |
Definition at line 490 of file freeZone.cpp.
void testDiamondNearContains | ( | ) |
Definition at line 269 of file freeZone.cpp.
void testDiamondNotContainsVertex | ( | ) |
Definition at line 278 of file freeZone.cpp.
void testDiamondNotIntersectOutwardRay | ( | ) |
Definition at line 477 of file freeZone.cpp.
void testDiamondNotIntersectSegment | ( | ) |
Definition at line 466 of file freeZone.cpp.
void testGlobalNonConvex | ( | ) |
Test that even though every sequence of three points along the boundary forms a counterclockwise triangle, the convexity test detects that a region is not convex because there are multiple cycles before the counterclockwise traversal is closed.
Definition at line 215 of file freeZone.cpp.
void testLocalNonConvex | ( | ) |
Definition at line 188 of file freeZone.cpp.
void testPentagonContains | ( | ) |
Definition at line 288 of file freeZone.cpp.
void testPentagonConvex | ( | ) |
Definition at line 162 of file freeZone.cpp.
void testPentagonIntersect | ( | ) |
Definition at line 360 of file freeZone.cpp.
void testPentagonIntersectInwardRay | ( | ) |
Definition at line 455 of file freeZone.cpp.
void testPentagonIntersectSegment | ( | ) |
Definition at line 428 of file freeZone.cpp.
void testPentagonNearIntersect | ( | ) |
Definition at line 370 of file freeZone.cpp.
void testPentagonNotContains | ( | ) |
Definition at line 297 of file freeZone.cpp.
void testPentagonNotContainsVertex | ( | ) |
Definition at line 307 of file freeZone.cpp.
void testPentagonNotIntersectBB | ( | ) |
Definition at line 387 of file freeZone.cpp.
void testPentagonNotIntersectCW | ( | ) |
Definition at line 398 of file freeZone.cpp.
void testPentagonNotIntersectOutwardRay | ( | ) |
Definition at line 441 of file freeZone.cpp.
void testPentagonNotIntersectZoneCCW | ( | ) |
Definition at line 418 of file freeZone.cpp.
void testPentagonNotIntersectZoneCW | ( | ) |
Definition at line 408 of file freeZone.cpp.
void testRegressionAlpha | ( | ) |
A problem showed up that the near intersection method was likely to incorrectly report an intersection when one endpoint of the test edge coincided with a vertex of the free zone, the test edge lay outside the free zone, and the angle between the test edge and the free zone boundary edge was somewhat small. Intersections were sometimes reported for angles as large as 0.2 radians or 11 degrees.
This test checks that an intersection is not reported when the angle is more than 0.005 radians or 0.3 degrees.
Definition at line 511 of file freeZone.cpp.
void testSquareContains | ( | ) |
Definition at line 241 of file freeZone.cpp.
void testSquareContainsVertex | ( | ) |
Definition at line 250 of file freeZone.cpp.
void testSquareConvex | ( | ) |
Definition at line 155 of file freeZone.cpp.
void testSquareIntersect | ( | ) |
Definition at line 318 of file freeZone.cpp.
void testSquareIntersectOutwardRay | ( | ) |
Definition at line 349 of file freeZone.cpp.
void testSquareNotContains | ( | ) |
Definition at line 260 of file freeZone.cpp.
void testSquareNotIntersect | ( | ) |
Definition at line 328 of file freeZone.cpp.
void testSquareNotIntersectSegment | ( | ) |
Definition at line 338 of file freeZone.cpp.