MeshKit  1.0
freeZone.cpp File Reference
#include <iostream>
#include <list>
#include "meshkit/AF2FreeZone.hpp"
#include "meshkit/AF2Point2D.hpp"
#include "TestUtil.hpp"
Include dependency graph for freeZone.cpp:

Go to the source code of this file.

Functions

AF2FreeZone makeSquareFreeZone ()
AF2FreeZone makePentagonFreeZone ()
AF2FreeZone makeDiamondFreeZone ()
void testSquareConvex ()
void testPentagonConvex ()
void testClockwiseSquare ()
void testLocalNonConvex ()
void testGlobalNonConvex ()
void testSquareContains ()
void testSquareContainsVertex ()
void testSquareNotContains ()
void testPentagonContains ()
void testPentagonNotContains ()
void testPentagonNotContainsVertex ()
void testDiamondNearContains ()
void testDiamondNotContainsVertex ()
void testSquareIntersect ()
void testSquareNotIntersect ()
void testSquareNotIntersectSegment ()
void testSquareIntersectOutwardRay ()
void testPentagonIntersect ()
void testPentagonNearIntersect ()
void testPentagonNotIntersectBB ()
void testPentagonNotIntersectCW ()
void testPentagonNotIntersectZoneCW ()
void testPentagonNotIntersectZoneCCW ()
void testPentagonIntersectSegment ()
void testPentagonNotIntersectOutwardRay ()
void testPentagonIntersectInwardRay ()
void testDiamondNotIntersectSegment ()
void testDiamondNotIntersectOutwardRay ()
void testDiamondIntersectInwardRay ()
void testRegressionAlpha ()
int main (int argc, char **argv)

Detailed Description

Test:

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.


Function Documentation

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.

Definition at line 169 of file freeZone.cpp.

Definition at line 490 of file freeZone.cpp.

Definition at line 269 of file freeZone.cpp.

Definition at line 278 of file freeZone.cpp.

Definition at line 477 of file freeZone.cpp.

Definition at line 466 of file freeZone.cpp.

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.

Definition at line 188 of file freeZone.cpp.

Definition at line 288 of file freeZone.cpp.

Definition at line 162 of file freeZone.cpp.

Definition at line 360 of file freeZone.cpp.

Definition at line 455 of file freeZone.cpp.

Definition at line 428 of file freeZone.cpp.

Definition at line 370 of file freeZone.cpp.

Definition at line 297 of file freeZone.cpp.

Definition at line 307 of file freeZone.cpp.

Definition at line 387 of file freeZone.cpp.

Definition at line 398 of file freeZone.cpp.

Definition at line 441 of file freeZone.cpp.

Definition at line 418 of file freeZone.cpp.

Definition at line 408 of file freeZone.cpp.

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.

Definition at line 241 of file freeZone.cpp.

Definition at line 250 of file freeZone.cpp.

void testSquareConvex ( )

Definition at line 155 of file freeZone.cpp.

Definition at line 318 of file freeZone.cpp.

Definition at line 349 of file freeZone.cpp.

Definition at line 260 of file freeZone.cpp.

Definition at line 328 of file freeZone.cpp.

Definition at line 338 of file freeZone.cpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines