Returns the intersections of the query ray and the TIN.
[Visual Basic .NET] Public Sub QueryLocateWithinDistance ( _ ByVal pRay As IRay, _ ByVal maxDistance As Double, _ ByVal pLocations As IGeometry _ )
[C#] public void QueryLocateWithinDistance ( IRay pRay, double maxDistance, IGeometry pLocations );
[C++]
HRESULT QueryLocateWithinDistance(
IRay* pRay,
double maxDistance,
IGeometry* pLocations
);
[C++]Parameters
pRay [in]pRay is a parameter of type IRay
maxDistance [in] maxDistance is a parameter of type double pLocationspLocations is a parameter of type IGeometry
Product Availability
Description
Finds the points of intersection between a ray and the surface. Can return either the first point of intersection or all intersections. The search for intersections can also be constrained by distance.
pRay is the ray for which intersections will be calculated.
maxDistance is the 2D search distance along the ray that acts as a constraint. No intersections will be returned beyond this distance. Pass a negative value to turn the constraint off and search as far as possible (i.e., to the edge of the surface).
pLocations is either a point or multipoint. This must be instantiated before calling the method. Pass a point if you want only the first intersction. Use a multipoint to collect multiple intersections. If multiple intersections are found they will be placed in sorted order from first to last in the multipoint. If there is no intersection, either because the ray does not intersect the surface or doesn't intersect within the maxDistance, the output will be set to empty.
Notes:
- It's beneficial to use a distance limit, for the sake of performance, because the method will not need to search as far as possible, thus speeding up the calculation. Specify a maxDistance if it makes sense for the application.
- Consider using this method or ITinSurface3.QueryLocate instead of other Locate methods when inside a loop, for the sake of efficiency, because it reuses the output object each iteration whereas other methods create new ones.