vtdata library
Public Member Functions | Static Public Attributes | List of all members
DPolyArray Class Reference

Inherits vector< DPolygon2 >.

Public Member Functions

int FindPoly (const DPoint2 &p) const
 

Static Public Attributes

static int s_previous_poly = -1
 

Detailed Description

A collection of DPolygon2 objects.

Member Function Documentation

int DPolyArray::FindPoly ( const DPoint2 p) const

Return the index of the polygon at a specified point, or -1 if there is no polygon there.

For speed, it first test the polygon which was found last time. For spatially linear testing, this can be a 10x speedup.