Provides access to members that locate a part of a geometry closest to a point.
|HitTest||Locates a part of a geometry closest to a query point. Any located part must be within searchRadius units from the query point.|
Locates a part of a geometry closest to a query point. Any located part must be within searchRadius units from the query point.
Public Function HitTest ( _ ByVal QueryPoint As IPoint, _ ByVal searchRadius As Double, _ ByVal geometryPart As esriGeometryHitPartType, _ ByVal hitPoint As IPoint, _ ByRef hitDistance As Double, _ ByRef hitPartIndex As Integer, _ ByRef hitSegmentIndex As Integer, _ ByRef bRightSide As Boolean _ ) As Boolean
public bool HitTest ( IPoint QueryPoint, double searchRadius, esriGeometryHitPartType geometryPart, IPoint hitPoint, ref double hitDistance, ref int hitPartIndex, ref int hitSegmentIndex, ref bool bRightSide );
The segment index returned has different meanings depending on the esriGeometryHitPartType used (Please see the example for more details).
EsriGeometryPartVertex: returns a vertex index
EsriGeometryPartBoundary, esriGeometryPartMidpoint and esriGeometryPartEndpoint: return a segment index
EsriGeometryPartCentroid: Always returns 0 for the part index and the segment index.
brightside: Indicates if the input point is on the right side of the input geometry
Note: The distance units use in this method are the units of the input geometry. No conversion is performed. esriGeometryHitPartType parameter cannot be a combination of several esriGeometryHitPartTypes.
Classes that implement IHitTest
|Envelope||A rectangle with sides parallel to a coordinate system defining the extent of another geometry; optionally has min and max measure, height and ID attributes.|
|MultiPatch||A collection of surface patches.|
|Multipoint||An ordered collection of points; optionally has measure, height and ID attributes.|
|Point||A two dimensional point, optionally with measure, height, and ID attributes.|
|Polygon||A collection of rings ordered by their containment relationship; optionally has measure, height and ID attributes.|
|Polyline||An ordered collection of paths; optionally has measure, height and ID attributes.|