intersection_segment_lineintersection_segment_lineIntersectionSegmentLineIntersectionSegmentLineintersection_segment_line (算子)
名称
intersection_segment_lineintersection_segment_lineIntersectionSegmentLineIntersectionSegmentLineintersection_segment_line — 计算线段和线的交点。
签名
Herror intersection_segment_line(double SegmentRow1, double SegmentColumn1, double SegmentRow2, double SegmentColumn2, double LineRow1, double LineColumn1, double LineRow2, double LineColumn2, double* Row, double* Column, Hlong* IsOverlapping)
Herror T_intersection_segment_line(const Htuple SegmentRow1, const Htuple SegmentColumn1, const Htuple SegmentRow2, const Htuple SegmentColumn2, const Htuple LineRow1, const Htuple LineColumn1, const Htuple LineRow2, const Htuple LineColumn2, Htuple* Row, Htuple* Column, Htuple* IsOverlapping)
void IntersectionSegmentLine(const HTuple& SegmentRow1, const HTuple& SegmentColumn1, const HTuple& SegmentRow2, const HTuple& SegmentColumn2, const HTuple& LineRow1, const HTuple& LineColumn1, const HTuple& LineRow2, const HTuple& LineColumn2, HTuple* Row, HTuple* Column, HTuple* IsOverlapping)
static void HOperatorSet.IntersectionSegmentLine(HTuple segmentRow1, HTuple segmentColumn1, HTuple segmentRow2, HTuple segmentColumn2, HTuple lineRow1, HTuple lineColumn1, HTuple lineRow2, HTuple lineColumn2, out HTuple row, out HTuple column, out HTuple isOverlapping)
def intersection_segment_line(segment_row_1: Union[float, int], segment_column_1: Union[float, int], segment_row_2: Union[float, int], segment_column_2: Union[float, int], line_row_1: Union[float, int], line_column_1: Union[float, int], line_row_2: Union[float, int], line_column_2: Union[float, int]) -> Tuple[Sequence[float], Sequence[float], int]
def intersection_segment_line_s(segment_row_1: Union[float, int], segment_column_1: Union[float, int], segment_row_2: Union[float, int], segment_column_2: Union[float, int], line_row_1: Union[float, int], line_column_1: Union[float, int], line_row_2: Union[float, int], line_column_2: Union[float, int]) -> Tuple[float, float, int]
描述
intersection_segment_lineintersection_segment_lineIntersectionSegmentLineIntersectionSegmentLineIntersectionSegmentLineintersection_segment_line calculates the intersection point of a
segment and a line. The segment is defined by its endpoints
(SegmentRow1SegmentRow1SegmentRow1SegmentRow1segmentRow1segment_row_1,SegmentColumn1SegmentColumn1SegmentColumn1SegmentColumn1segmentColumn1segment_column_1) and
(SegmentRow2SegmentRow2SegmentRow2SegmentRow2segmentRow2segment_row_2,SegmentColumn2SegmentColumn2SegmentColumn2SegmentColumn2segmentColumn2segment_column_2). The line is defined by
the two points (LineRow1LineRow1LineRow1LineRow1lineRow1line_row_1,LineColumn1LineColumn1LineColumn1LineColumn1lineColumn1line_column_1) and
(LineRow2LineRow2LineRow2LineRow2lineRow2line_row_2,LineColumn2LineColumn2LineColumn2LineColumn2lineColumn2line_column_2).
The intersection point, if it exists, is returned in
(RowRowRowRowrowrow,ColumnColumnColumnColumncolumncolumn).
If the segment and the line 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).
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
SegmentRow1SegmentRow1SegmentRow1SegmentRow1segmentRow1segment_row_1 (输入控制) point.y → HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Row coordinate of the first point of the segment.
SegmentColumn1SegmentColumn1SegmentColumn1SegmentColumn1segmentColumn1segment_column_1 (输入控制) point.x → HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Column coordinate of the first point of the segment.
SegmentRow2SegmentRow2SegmentRow2SegmentRow2segmentRow2segment_row_2 (输入控制) point.y → HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Row coordinate of the second point of the segment.
SegmentColumn2SegmentColumn2SegmentColumn2SegmentColumn2segmentColumn2segment_column_2 (输入控制) point.x → HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Column coordinate of the second point of the segment.
LineRow1LineRow1LineRow1LineRow1lineRow1line_row_1 (输入控制) point.y → HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Row coordinate of the first point of the line.
LineColumn1LineColumn1LineColumn1LineColumn1lineColumn1line_column_1 (输入控制) point.x → HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Column coordinate of the first point of the line.
LineRow2LineRow2LineRow2LineRow2lineRow2line_row_2 (输入控制) point.y → HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Row coordinate of the second point of the line.
LineColumn2LineColumn2LineColumn2LineColumn2lineColumn2line_column_2 (输入控制) point.x → HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Column coordinate of the second point of the line.
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 the segment and the line have a part in common?
结果
如果参数有效,算子 intersection_segment_lineintersection_segment_lineIntersectionSegmentLineIntersectionSegmentLineIntersectionSegmentLineintersection_segment_line 返回值 2 ( H_MSG_TRUE )。
替代
intersection_line_contour_xldintersection_line_contour_xldIntersectionLineContourXldIntersectionLineContourXldIntersectionLineContourXldintersection_line_contour_xld
另见
intersection_segmentsintersection_segmentsIntersectionSegmentsIntersectionSegmentsIntersectionSegmentsintersection_segments,
intersection_linesintersection_linesIntersectionLinesIntersectionLinesIntersectionLinesintersection_lines,
intersection_segment_contour_xldintersection_segment_contour_xldIntersectionSegmentContourXldIntersectionSegmentContourXldIntersectionSegmentContourXldintersection_segment_contour_xld,
intersection_contours_xldintersection_contours_xldIntersectionContoursXldIntersectionContoursXldIntersectionContoursXldintersection_contours_xld
模块
基础