distance_prdistance_prDistancePrDistancePr (Operator)
Name
distance_prdistance_prDistancePrDistancePr
— Calculate the distance between a point and a region.
Signature
void DistancePr(const HObject& Region, const HTuple& Row, const HTuple& Column, HTuple* DistanceMin, HTuple* DistanceMax)
void HRegion::DistancePr(const HTuple& Row, const HTuple& Column, HTuple* DistanceMin, HTuple* DistanceMax) const
void HRegion::DistancePr(double Row, double Column, double* DistanceMin, double* DistanceMax) const
static void HOperatorSet.DistancePr(HObject region, HTuple row, HTuple column, out HTuple distanceMin, out HTuple distanceMax)
void HRegion.DistancePr(HTuple row, HTuple column, out HTuple distanceMin, out HTuple distanceMax)
void HRegion.DistancePr(double row, double column, out double distanceMin, out double distanceMax)
Description
The operator distance_prdistance_prDistancePrDistancePrDistancePr
calculates the distance
between a point and one region.
As input the coordinates of the points
(RowRowRowRowrow
,ColumnColumnColumnColumncolumn
) and one
region are expected.
If a point is inside of the region, its minimum distance is zero.
The parameters
DistanceMinDistanceMinDistanceMinDistanceMindistanceMin
and DistanceMaxDistanceMaxDistanceMaxDistanceMaxdistanceMax
return
the result of the calculation.
Execution Information
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Parameters
RegionRegionRegionRegionregion
(input_object) region →
objectHRegionHRegionHobject
Input region.
RowRowRowRowrow
(input_control) point.y(-array) →
HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Row coordinate of the point.
ColumnColumnColumnColumncolumn
(input_control) point.x(-array) →
HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Column coordinate of the point.
DistanceMinDistanceMinDistanceMinDistanceMindistanceMin
(output_control) real(-array) →
HTupleHTupleHtuple (real) (double) (double) (double)
Minimum distance between the point and the region.
DistanceMaxDistanceMaxDistanceMaxDistanceMaxdistanceMax
(output_control) real(-array) →
HTupleHTupleHtuple (real) (double) (double) (double)
Maximum distance between the point and the region.
Example (HDevelop)
gen_circle (Circle, 200, 200, 100.5)
draw_point (WindowHandle, Row, Column)
gen_cross_contour_xld (Cross, Row, Column, 15, 0)
distance_pr (Circle, Row, Column, DistanceMin, DistanceMax)
Result
distance_prdistance_prDistancePrDistancePrDistancePr
returns 2 (H_MSG_TRUE).
Alternatives
distance_pcdistance_pcDistancePcDistancePcDistancePc
,
distance_lrdistance_lrDistanceLrDistanceLrDistanceLr
,
distance_srdistance_srDistanceSrDistanceSrDistanceSr
,
diameter_regiondiameter_regionDiameterRegionDiameterRegionDiameterRegion
See also
hamming_distancehamming_distanceHammingDistanceHammingDistanceHammingDistance
,
select_region_pointselect_region_pointSelectRegionPointSelectRegionPointSelectRegionPoint
,
test_region_pointtest_region_pointTestRegionPointTestRegionPointTestRegionPoint
,
smallest_rectangle2smallest_rectangle2SmallestRectangle2SmallestRectangle2SmallestRectangle2
Module
Foundation