distance_cc_min_pointsdistance_cc_min_pointsDistanceCcMinPointsDistanceCcMinPoints (Operator)
Name
distance_cc_min_pointsdistance_cc_min_pointsDistanceCcMinPointsDistanceCcMinPoints
— Berechnen des minimalen Abstandes zwischen zwei Konturen und Zurückgeben der
Punkte, die für die Berechnung benutzt wurden.
Signatur
Herror distance_cc_min_points(const Hobject Contour1, const Hobject Contour2, const char* Mode, double* DistanceMin, double* Row1, double* Column1, double* Row2, double* Column2)
Herror T_distance_cc_min_points(const Hobject Contour1, const Hobject Contour2, const Htuple Mode, Htuple* DistanceMin, Htuple* Row1, Htuple* Column1, Htuple* Row2, Htuple* Column2)
void DistanceCcMinPoints(const HObject& Contour1, const HObject& Contour2, const HTuple& Mode, HTuple* DistanceMin, HTuple* Row1, HTuple* Column1, HTuple* Row2, HTuple* Column2)
HTuple HXLDCont::DistanceCcMinPoints(const HXLDCont& Contour2, const HString& Mode, HTuple* Row1, HTuple* Column1, HTuple* Row2, HTuple* Column2) const
double HXLDCont::DistanceCcMinPoints(const HXLDCont& Contour2, const HString& Mode, double* Row1, double* Column1, double* Row2, double* Column2) const
double HXLDCont::DistanceCcMinPoints(const HXLDCont& Contour2, const char* Mode, double* Row1, double* Column1, double* Row2, double* Column2) const
double HXLDCont::DistanceCcMinPoints(const HXLDCont& Contour2, const wchar_t* Mode, double* Row1, double* Column1, double* Row2, double* Column2) const
(Nur Windows)
static void HOperatorSet.DistanceCcMinPoints(HObject contour1, HObject contour2, HTuple mode, out HTuple distanceMin, out HTuple row1, out HTuple column1, out HTuple row2, out HTuple column2)
HTuple HXLDCont.DistanceCcMinPoints(HXLDCont contour2, string mode, out HTuple row1, out HTuple column1, out HTuple row2, out HTuple column2)
double HXLDCont.DistanceCcMinPoints(HXLDCont contour2, string mode, out double row1, out double column1, out double row2, out double column2)
Beschreibung
distance_cc_mindistance_cc_minDistanceCcMinDistanceCcMinDistanceCcMin
berechnet den minimalen Abstand zwischen zwei
Konturen. Als Eingabe werden die beiden Konturen Contour1Contour1Contour1Contour1contour1
,
Contour2Contour2Contour2Contour2contour2
erwartet. Das Ergebnis wird in DistanceMinDistanceMinDistanceMinDistanceMindistanceMin
zurückgegeben.
Im Vergleich zu distance_cc_mindistance_cc_minDistanceCcMinDistanceCcMinDistanceCcMin
werden auch die Punkte
auf den Eingabekonturen zurückgegeben, zwischen denen der minimale
Abstand gemessen wurde. Der Punkt auf Contour1Contour1Contour1Contour1contour1
wird in
Row1Row1Row1Row1row1
und Column1Column1Column1Column1column1
zurückgegeben; der Punkt auf
Contour2Contour2Contour2Contour2contour2
wird in Row2Row2Row2Row2row2
und Column2Column2Column2Column2column2
zurückgegeben.
Der Parameter ModeModeModeModemode
gibt dabei an, auf welche Weise der Abstand
berechnet wird. 'fast_point_to_segment'"fast_point_to_segment""fast_point_to_segment""fast_point_to_segment""fast_point_to_segment" berechnet den Abstand der
Liniensegmente in der Umgebung der nächstgelegenen Konturpunkte.
'point_to_segment'"point_to_segment""point_to_segment""point_to_segment""point_to_segment" bestimmt den tatsächlichen minimalen Abstand
der Kontursegmente.
Während 'fast_point_to_segment'"fast_point_to_segment""fast_point_to_segment""fast_point_to_segment""fast_point_to_segment" ein effizienter Algorithmen der
Komplexität n*log(n) ist, hat 'point_to_segment'"point_to_segment""point_to_segment""point_to_segment""point_to_segment" quadratische
Komplexität, die sich in einer längeren Rechenzeit niederschlägt,
insbesondere bei Konturen mit vielen Liniensegmenten.
Achtung
Die beiden ikonischen Eingabeparameter müssen die gleiche Anzahl von
Konturen enthalten.
Ausführungsinformationen
- Multithreading-Typ: reentrant (läuft parallel zu nicht-exklusiven Operatoren).
- Multithreading-Bereich: global (kann von jedem Thread aufgerufen werden).
- Automatisch parallelisiert auf interner Datenebene.
Parameter
Contour1Contour1Contour1Contour1contour1
(input_object) xld_cont(-array) →
objectHXLDContHXLDContHobject
Erste Eingabekontur.
Contour2Contour2Contour2Contour2contour2
(input_object) xld_cont(-array) →
objectHXLDContHXLDContHobject
Zweite Eingabekontur.
ModeModeModeModemode
(input_control) string →
HTupleHTupleHtuple (string) (string) (HString) (char*)
Art der Abstandsberechnung.
Defaultwert:
'fast_point_to_segment'
"fast_point_to_segment"
"fast_point_to_segment"
"fast_point_to_segment"
"fast_point_to_segment"
Werteliste: 'fast_point_to_segment'"fast_point_to_segment""fast_point_to_segment""fast_point_to_segment""fast_point_to_segment", 'point_to_segment'"point_to_segment""point_to_segment""point_to_segment""point_to_segment"
DistanceMinDistanceMinDistanceMinDistanceMindistanceMin
(output_control) number(-array) →
HTupleHTupleHtuple (real) (double) (double) (double)
Minimaler Abstand zwischen beiden Konturen.
Beispiel (C)
gen_contour_polygon_rounded_xld(Cont1, [0,100,100,0,0], [0,0,100,100,0],
[50,50,50,50,50], 0.5);
gen_contour_polygon_rounded_xld(Cont2, [41,91,91,41,41], [41,41,91,91,41],
[25,25,25,25,25], 0.5);
distance_cc_min_points(Cont1, Cont2, "fast_point_to_segment", &distance_min,
&Row1, &Column1, &Row2, &Column2);
Ergebnis
distance_cc_min_pointsdistance_cc_min_pointsDistanceCcMinPointsDistanceCcMinPointsDistanceCcMinPoints
liefert den Wert 2 (H_MSG_TRUE).
Alternativen
distance_scdistance_scDistanceScDistanceScDistanceSc
,
distance_pcdistance_pcDistancePcDistancePcDistancePc
,
distance_ccdistance_ccDistanceCcDistanceCcDistanceCc
,
distance_contours_xlddistance_contours_xldDistanceContoursXldDistanceContoursXldDistanceContoursXld
,
distance_cc_mindistance_cc_minDistanceCcMinDistanceCcMinDistanceCcMin
Siehe auch
distance_srdistance_srDistanceSrDistanceSrDistanceSr
,
distance_prdistance_prDistancePrDistancePrDistancePr
Modul
Foundation