intersection_segmentsintersection_segmentsIntersectionSegmentsIntersectionSegmentsintersection_segments (算子)
名称
intersection_segmentsintersection_segmentsIntersectionSegmentsIntersectionSegmentsintersection_segments — 计算两条线段的交点。
签名
Herror intersection_segments(double Segment1Row1, double Segment1Column1, double Segment1Row2, double Segment1Column2, double Segment2Row1, double Segment2Column1, double Segment2Row2, double Segment2Column2, double* Row, double* Column, Hlong* IsOverlapping)
Herror T_intersection_segments(const Htuple Segment1Row1, const Htuple Segment1Column1, const Htuple Segment1Row2, const Htuple Segment1Column2, const Htuple Segment2Row1, const Htuple Segment2Column1, const Htuple Segment2Row2, const Htuple Segment2Column2, Htuple* Row, Htuple* Column, Htuple* IsOverlapping)
void IntersectionSegments(const HTuple& Segment1Row1, const HTuple& Segment1Column1, const HTuple& Segment1Row2, const HTuple& Segment1Column2, const HTuple& Segment2Row1, const HTuple& Segment2Column1, const HTuple& Segment2Row2, const HTuple& Segment2Column2, HTuple* Row, HTuple* Column, HTuple* IsOverlapping)
static void HOperatorSet.IntersectionSegments(HTuple segment1Row1, HTuple segment1Column1, HTuple segment1Row2, HTuple segment1Column2, HTuple segment2Row1, HTuple segment2Column1, HTuple segment2Row2, HTuple segment2Column2, out HTuple row, out HTuple column, out HTuple isOverlapping)
def intersection_segments(segment_1row_1: Union[float, int], segment_1column_1: Union[float, int], segment_1row_2: Union[float, int], segment_1column_2: Union[float, int], segment_2row_1: Union[float, int], segment_2column_1: Union[float, int], segment_2row_2: Union[float, int], segment_2column_2: Union[float, int]) -> Tuple[Sequence[float], Sequence[float], int]
def intersection_segments_s(segment_1row_1: Union[float, int], segment_1column_1: Union[float, int], segment_1row_2: Union[float, int], segment_1column_2: Union[float, int], segment_2row_1: Union[float, int], segment_2column_1: Union[float, int], segment_2row_2: Union[float, int], segment_2column_2: Union[float, int]) -> Tuple[float, float, int]
描述
intersection_segmentsintersection_segmentsIntersectionSegmentsIntersectionSegmentsIntersectionSegmentsintersection_segments calculates the intersection point of two
line segments, which are defined by their endpoints
(Segment1Row1Segment1Row1Segment1Row1Segment1Row1segment1Row1segment_1row_1,Segment1Column1Segment1Column1Segment1Column1Segment1Column1segment1Column1segment_1column_1),
(Segment1Row2Segment1Row2Segment1Row2Segment1Row2segment1Row2segment_1row_2,Segment1Column2Segment1Column2Segment1Column2Segment1Column2segment1Column2segment_1column_2), and
(Segment2Row1Segment2Row1Segment2Row1Segment2Row1segment2Row1segment_2row_1,Segment2Column1Segment2Column1Segment2Column1Segment2Column1segment2Column1segment_2column_1),
(Segment2Row2Segment2Row2Segment2Row2Segment2Row2segment2Row2segment_2row_2,Segment2Column2Segment2Column2Segment2Column2Segment2Column2segment2Column2segment_2column_2) respectively.
The intersection point, if it exists, is returned in
(RowRowRowRowrowrow,ColumnColumnColumnColumncolumncolumn).
If both segments have a part in common, IsOverlappingIsOverlappingIsOverlappingIsOverlappingisOverlappingis_overlapping returns the
value 1, otherwise 0 is returned.
In this case the endpoints of the mutual segment are
returned in (RowRowRowRowrowrow,ColumnColumnColumnColumncolumncolumn).
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
Segment1Row1Segment1Row1Segment1Row1Segment1Row1segment1Row1segment_1row_1 (输入控制) point.y → HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Row coordinate of the first point
of the first segment.
Segment1Column1Segment1Column1Segment1Column1Segment1Column1segment1Column1segment_1column_1 (输入控制) point.x → HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Column coordinate of the first point
of the first segment.
Segment1Row2Segment1Row2Segment1Row2Segment1Row2segment1Row2segment_1row_2 (输入控制) point.y → HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Row coordinate of the second point
of the first segment.
Segment1Column2Segment1Column2Segment1Column2Segment1Column2segment1Column2segment_1column_2 (输入控制) point.x → HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Column coordinate of the second point
of the first segment.
Segment2Row1Segment2Row1Segment2Row1Segment2Row1segment2Row1segment_2row_1 (输入控制) point.y → HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Row coordinate of the first point
of the second segment.
Segment2Column1Segment2Column1Segment2Column1Segment2Column1segment2Column1segment_2column_1 (输入控制) point.x → HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Column coordinate of the first point
of the second segment.
Segment2Row2Segment2Row2Segment2Row2Segment2Row2segment2Row2segment_2row_2 (输入控制) point.y → HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Row coordinate of the second point
of the second segment.
Segment2Column2Segment2Column2Segment2Column2Segment2Column2segment2Column2segment_2column_2 (输入控制) point.x → HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Column coordinate of the second point
of the second segment.
RowRowRowRowrowrow (输出控制) point.y(-array) → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Row coordinate of the intersection point.
ColumnColumnColumnColumncolumncolumn (输出控制) point.x(-array) → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Column coordinate of the intersection point.
IsOverlappingIsOverlappingIsOverlappingIsOverlappingisOverlappingis_overlapping (输出控制) integer → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Do both segments have a part in common?
结果
如果参数有效,算子 intersection_segmentsintersection_segmentsIntersectionSegmentsIntersectionSegmentsIntersectionSegmentsintersection_segments 返回值 2 ( H_MSG_TRUE )。
替代
intersection_segment_contour_xldintersection_segment_contour_xldIntersectionSegmentContourXldIntersectionSegmentContourXldIntersectionSegmentContourXldintersection_segment_contour_xld,
intersection_contours_xldintersection_contours_xldIntersectionContoursXldIntersectionContoursXldIntersectionContoursXldintersection_contours_xld
另见
intersection_segment_lineintersection_segment_lineIntersectionSegmentLineIntersectionSegmentLineIntersectionSegmentLineintersection_segment_line,
intersection_linesintersection_linesIntersectionLinesIntersectionLinesIntersectionLinesintersection_lines,
intersection_line_contour_xldintersection_line_contour_xldIntersectionLineContourXldIntersectionLineContourXldIntersectionLineContourXldintersection_line_contour_xld
模块
基础