xmsgrid  1.0
GmPointInPolyUnitTests Class Referenceabstract

Used for speed tests of various point in poly functions / classes. More...

Inheritance diagram for GmPointInPolyUnitTests:
GmPointInPolyTester_gmPointInPolygon2D GmPointInPolyTester_GmPolygon

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::Pt3dm_outPoly
 Output polygon.
 
std::vector< xms::Pt3dm_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.
 

Detailed Description

Used for speed tests of various point in poly functions / classes.

Uses non-virtual interface pattern. You must override TestPoint and MaxTime.

Definition at line 42 of file geoms.t.h.

Member Function Documentation

◆ CheckPoint()

virtual void GmPointInPolyUnitTests::CheckPoint ( const xms::Pt3d a_pt)
protectedpure virtual

Determine if a point is in or out.

Parameters
a_ptThe point to check.

Implemented in GmPointInPolyTester_gmPointInPolygon2D, and GmPointInPolyTester_GmPolygon.

Referenced by CheckPoints().

◆ MaxTime()

virtual double GmPointInPolyUnitTests::MaxTime ( )
protectedpure virtual

Maximum time for test to take.

Returns
The max time

Implemented in GmPointInPolyTester_gmPointInPolygon2D, and GmPointInPolyTester_GmPolygon.

Referenced by GetResults().


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