|
xmsgrid
1.0
|
Used for speed tests of various point in poly functions / classes. More...
Public Member Functions | |
| GmPointInPolyUnitTests () | |
| constructor | |
| void | DoTest () |
| Run the test. This is the main function to call. | |
Protected Member Functions | |
| virtual void | CheckPoint (const xms::Pt3d &a_pt)=0 |
| virtual double | MaxTime ()=0 |
| virtual void | Setup () |
| Setup the polygons. | |
| virtual void | CheckPoints () |
| Check a lot of points to see if they are in the polys. | |
| virtual void | GetResults () |
| Get the timer results and do some assertions. | |
Protected Attributes | |
| std::vector< xms::Pt3d > | m_outPoly |
| Output polygon. | |
| std::vector< xms::Pt3d > | m_inPoly |
| Input polygon. | |
| boost::timer::cpu_timer | m_timer |
| Timer. | |
| int | m_count |
| Number of points checked. | |
| int | m_status |
| Status (in, out, on) of at least one pt. | |
Private Member Functions | |
| XM_DISALLOW_COPY_AND_ASSIGN (GmPointInPolyUnitTests) | |
| Hide compiler generated copy and assign. | |
Used for speed tests of various point in poly functions / classes.
Uses non-virtual interface pattern. You must override TestPoint and MaxTime.
|
protectedpure virtual |
Determine if a point is in or out.
| a_pt | The point to check. |
Implemented in GmPointInPolyTester_gmPointInPolygon2D, and GmPointInPolyTester_GmPolygon.
Referenced by CheckPoints().
|
protectedpure virtual |
Maximum time for test to take.
Implemented in GmPointInPolyTester_gmPointInPolygon2D, and GmPointInPolyTester_GmPolygon.
Referenced by GetResults().