distance_ccdistance_ccDistanceCcDistanceCc (Operator)
Name
distance_ccdistance_ccDistanceCcDistanceCc
— Berechnen des Abstandes zwischen zwei Konturen.
Signatur
void DistanceCc(const HObject& Contour1, const HObject& Contour2, const HTuple& Mode, HTuple* DistanceMin, HTuple* DistanceMax)
void HXLDCont::DistanceCc(const HXLDCont& Contour2, const HString& Mode, HTuple* DistanceMin, HTuple* DistanceMax) const
void HXLDCont::DistanceCc(const HXLDCont& Contour2, const HString& Mode, double* DistanceMin, double* DistanceMax) const
void HXLDCont::DistanceCc(const HXLDCont& Contour2, const char* Mode, double* DistanceMin, double* DistanceMax) const
void HXLDCont::DistanceCc(const HXLDCont& Contour2, const wchar_t* Mode, double* DistanceMin, double* DistanceMax) const
(Nur Windows)
static void HOperatorSet.DistanceCc(HObject contour1, HObject contour2, HTuple mode, out HTuple distanceMin, out HTuple distanceMax)
void HXLDCont.DistanceCc(HXLDCont contour2, string mode, out HTuple distanceMin, out HTuple distanceMax)
void HXLDCont.DistanceCc(HXLDCont contour2, string mode, out double distanceMin, out double distanceMax)
Beschreibung
distance_ccdistance_ccDistanceCcDistanceCcDistanceCc
berechnet den minimalen und maximalen Abstand
zwischen den Stützpunkten zweier Konturen. Als Eingabe werden die
beiden Konturen
(Contour1Contour1Contour1Contour1contour1
,Contour2Contour2Contour2Contour2contour2
) erwartet. Das jeweilige
Ergebnis wird in den Parametern
DistanceMinDistanceMinDistanceMinDistanceMindistanceMin
und DistanceMaxDistanceMaxDistanceMaxDistanceMaxdistanceMax
zurückgegeben.
Der Parameter ModeModeModeModemode
gibt an, auf welche Weise der Abstand
berechnet wird. 'point_to_point'"point_to_point""point_to_point""point_to_point""point_to_point" bestimmt nur den kleinsten und
größten Abstand der Stützpunkte der Konturen, was sich zwar schneller
berechnen lässt, jedoch zu Ungenauigkeiten beim minimalem Abstand führen
kann. 'point_to_segment'"point_to_segment""point_to_segment""point_to_segment""point_to_segment" bestimmt
dagegen den tatsächlichen minimalen Abstand der Kontursegmente. In beiden
Fällen hat der Suchalgorithmus quadratische Komplexität (n*n). Wird nur der
minimale Abstand der Konturen benötigt, kann auch der Operator
distance_cc_mindistance_cc_minDistanceCcMinDistanceCcMinDistanceCcMin
verwendet werden, welcher Algorithmen mit einer
Komplexität der Ordnung n*log(n) zur Verfügung stellt.
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).
- Wird ohne Parallelisierung verarbeitet.
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:
'point_to_point'
"point_to_point"
"point_to_point"
"point_to_point"
"point_to_point"
Werteliste: 'point_to_point'"point_to_point""point_to_point""point_to_point""point_to_point", 'point_to_segment'"point_to_segment""point_to_segment""point_to_segment""point_to_segment"
DistanceMinDistanceMinDistanceMinDistanceMindistanceMin
(output_control) real(-array) →
HTupleHTupleHtuple (real) (double) (double) (double)
Minimaler Abstand zwischen beiden Konturen.
DistanceMaxDistanceMaxDistanceMaxDistanceMaxdistanceMax
(output_control) real(-array) →
HTupleHTupleHtuple (real) (double) (double) (double)
Maximaler 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(Cont1, Cont2, 'point_to_point', &distance_min, &distance_max);
Ergebnis
distance_ccdistance_ccDistanceCcDistanceCcDistanceCc
liefert den Wert 2 (H_MSG_TRUE).
Alternativen
distance_scdistance_scDistanceScDistanceScDistanceSc
,
distance_pcdistance_pcDistancePcDistancePcDistancePc
,
distance_cc_mindistance_cc_minDistanceCcMinDistanceCcMinDistanceCcMin
,
distance_contours_xlddistance_contours_xldDistanceContoursXldDistanceContoursXldDistanceContoursXld
Siehe auch
distance_srdistance_srDistanceSrDistanceSrDistanceSr
,
distance_prdistance_prDistancePrDistancePrDistancePr
Modul
Foundation