Interface IHitTest

Namespace
ESRI.ArcGIS.Geometry
Assembly
ESRI.Server.Geometry.dll

Provides access to members that locate a part of a geometry closest to a point.

[Guid("0EB12C6E-18F6-11D1-8337-0000F8775BE9")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IHitTest

Methods

HitTest(IPoint, double, esriGeometryHitPartType, IPoint, ref double, ref int, ref int, ref bool)

Locates a part of a geometry closest to a query point. Any located part must be within searchRadius units from the query point.

bool HitTest(IPoint QueryPoint, double searchRadius, esriGeometryHitPartType geometryPart, IPoint hitPoint, ref double hitDistance, ref int hitPartIndex, ref int hitSegmentIndex, ref bool bRightSide)

Parameters

QueryPoint IPoint
searchRadius double
geometryPart esriGeometryHitPartType
hitPoint IPoint
hitDistance double
hitPartIndex int
hitSegmentIndex int
bRightSide bool

Returns

bool

Remarks

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.