area_intersection_rectangle2area_intersection_rectangle2AreaIntersectionRectangle2AreaIntersectionRectangle2area_intersection_rectangle2 (Operator)
Name
area_intersection_rectangle2area_intersection_rectangle2AreaIntersectionRectangle2AreaIntersectionRectangle2area_intersection_rectangle2
— Calculate the intersection area of oriented rectangles.
Signature
Herror area_intersection_rectangle2(double Rect1Row, double Rect1Column, double Rect1Phi, double Rect1Length1, double Rect1Length2, double Rect2Row, double Rect2Column, double Rect2Phi, double Rect2Length1, double Rect2Length2, double* AreaIntersection)
Herror T_area_intersection_rectangle2(const Htuple Rect1Row, const Htuple Rect1Column, const Htuple Rect1Phi, const Htuple Rect1Length1, const Htuple Rect1Length2, const Htuple Rect2Row, const Htuple Rect2Column, const Htuple Rect2Phi, const Htuple Rect2Length1, const Htuple Rect2Length2, Htuple* AreaIntersection)
void AreaIntersectionRectangle2(const HTuple& Rect1Row, const HTuple& Rect1Column, const HTuple& Rect1Phi, const HTuple& Rect1Length1, const HTuple& Rect1Length2, const HTuple& Rect2Row, const HTuple& Rect2Column, const HTuple& Rect2Phi, const HTuple& Rect2Length1, const HTuple& Rect2Length2, HTuple* AreaIntersection)
static void HOperatorSet.AreaIntersectionRectangle2(HTuple rect1Row, HTuple rect1Column, HTuple rect1Phi, HTuple rect1Length1, HTuple rect1Length2, HTuple rect2Row, HTuple rect2Column, HTuple rect2Phi, HTuple rect2Length1, HTuple rect2Length2, out HTuple areaIntersection)
def area_intersection_rectangle2(rect_1row: MaybeSequence[Union[float, int]], rect_1column: MaybeSequence[Union[float, int]], rect_1phi: MaybeSequence[Union[float, int]], rect_1length_1: MaybeSequence[Union[float, int]], rect_1length_2: MaybeSequence[Union[float, int]], rect_2row: MaybeSequence[Union[float, int]], rect_2column: MaybeSequence[Union[float, int]], rect_2phi: MaybeSequence[Union[float, int]], rect_2length_1: MaybeSequence[Union[float, int]], rect_2length_2: MaybeSequence[Union[float, int]]) -> Sequence[float]
def area_intersection_rectangle2_s(rect_1row: MaybeSequence[Union[float, int]], rect_1column: MaybeSequence[Union[float, int]], rect_1phi: MaybeSequence[Union[float, int]], rect_1length_1: MaybeSequence[Union[float, int]], rect_1length_2: MaybeSequence[Union[float, int]], rect_2row: MaybeSequence[Union[float, int]], rect_2column: MaybeSequence[Union[float, int]], rect_2phi: MaybeSequence[Union[float, int]], rect_2length_1: MaybeSequence[Union[float, int]], rect_2length_2: MaybeSequence[Union[float, int]]) -> float
Description
area_intersection_rectangle2area_intersection_rectangle2AreaIntersectionRectangle2AreaIntersectionRectangle2area_intersection_rectangle2
calculates the intersection area of two
oriented rectangles (i.e., of type rectangle2), which are defined by their
parameters (center (Rect1RowRect1RowRect1Rowrect1Rowrect_1row
, Rect1ColumnRect1ColumnRect1Columnrect1Columnrect_1column
), orientation
Rect1PhiRect1PhiRect1Phirect1Phirect_1phi
, and the half edge lengths Rect1Length1Rect1Length1Rect1Length1rect1Length1rect_1length_1
and Rect1Length2Rect1Length2Rect1Length2rect1Length2rect_1length_2
) and
(center (Rect2RowRect2RowRect2Rowrect2Rowrect_2row
, Rect2ColumnRect2ColumnRect2Columnrect2Columnrect_2column
), orientation
Rect2PhiRect2PhiRect2Phirect2Phirect_2phi
, and the half edge lengths Rect2Length1Rect2Length1Rect2Length1rect2Length1rect_2length_1
and
Rect2Length2Rect2Length2Rect2Length2rect2Length2rect_2length_2
), respectively.
The intersection area is returned in AreaIntersectionAreaIntersectionAreaIntersectionareaIntersectionarea_intersection
.
Parameter Broadcasting
This operator supports parameter broadcasting.
This means that each parameter can be given as a tuple of length
1 or N.
Parameters with tuple length 1 will be repeated internally
such that the number of results is always N.
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
Rect1RowRect1RowRect1Rowrect1Rowrect_1row
(input_control) rectangle2.center.y(-array) →
HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Center row coordinate of the first rectangle.
Rect1ColumnRect1ColumnRect1Columnrect1Columnrect_1column
(input_control) rectangle2.center.x(-array) →
HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Center column coordinate of the first rectangle.
Rect1PhiRect1PhiRect1Phirect1Phirect_1phi
(input_control) rectangle2.angle.rad(-array) →
HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Angle between the positive horizontal axis and the first
edge of the first rectangle (in radians).
Rect1Length1Rect1Length1Rect1Length1rect1Length1rect_1length_1
(input_control) rectangle2.hwidth(-array) →
HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Half length of the first edge of the first rectangle.
Rect1Length2Rect1Length2Rect1Length2rect1Length2rect_1length_2
(input_control) rectangle2.hheight(-array) →
HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Half length of the second edge of the first rectangle.
Rect2RowRect2RowRect2Rowrect2Rowrect_2row
(input_control) rectangle2.center.y(-array) →
HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Center row coordinate of the second rectangle.
Rect2ColumnRect2ColumnRect2Columnrect2Columnrect_2column
(input_control) rectangle2.center.x(-array) →
HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Center column coordinate of the second rectangle.
Rect2PhiRect2PhiRect2Phirect2Phirect_2phi
(input_control) rectangle2.angle.rad(-array) →
HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Angle between the positive horizontal axis and the first
edge of the second rectangle (in radians).
Rect2Length1Rect2Length1Rect2Length1rect2Length1rect_2length_1
(input_control) rectangle2.hwidth(-array) →
HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Half length of the first edge of the second rectangle.
Rect2Length2Rect2Length2Rect2Length2rect2Length2rect_2length_2
(input_control) rectangle2.hheight(-array) →
HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Half length of the second edge of the second rectangle.
AreaIntersectionAreaIntersectionAreaIntersectionareaIntersectionarea_intersection
(output_control) real(-array) →
HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Intersection area of the first rectangle with the second
rectangle.
Result
If the parameters are valid, the operator
area_intersection_rectangle2area_intersection_rectangle2AreaIntersectionRectangle2AreaIntersectionRectangle2area_intersection_rectangle2
returns the value 2 (
H_MSG_TRUE)
.
See also
gen_rectangle2gen_rectangle2GenRectangle2GenRectangle2gen_rectangle2
,
intersection_segmentsintersection_segmentsIntersectionSegmentsIntersectionSegmentsintersection_segments
,
intersection_segment_lineintersection_segment_lineIntersectionSegmentLineIntersectionSegmentLineintersection_segment_line
,
intersection_segment_contour_xldintersection_segment_contour_xldIntersectionSegmentContourXldIntersectionSegmentContourXldintersection_segment_contour_xld
,
intersection_line_contour_xldintersection_line_contour_xldIntersectionLineContourXldIntersectionLineContourXldintersection_line_contour_xld
,
intersection_contours_xldintersection_contours_xldIntersectionContoursXldIntersectionContoursXldintersection_contours_xld
Module
Foundation