area_intersection_rectangle2area_intersection_rectangle2AreaIntersectionRectangle2AreaIntersectionRectangle2 (Operator)

Name

area_intersection_rectangle2area_intersection_rectangle2AreaIntersectionRectangle2AreaIntersectionRectangle2 — Calculate the intersection area of oriented rectangles.

Signature

area_intersection_rectangle2( : : Rect1Row, Rect1Column, Rect1Phi, Rect1Length1, Rect1Length2, Rect2Row, Rect2Column, Rect2Phi, Rect2Length1, Rect2Length2 : AreaIntersection)

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)

Description

area_intersection_rectangle2area_intersection_rectangle2AreaIntersectionRectangle2AreaIntersectionRectangle2AreaIntersectionRectangle2 calculates the intersection area of two oriented rectangles (i.e., of type rectangle2), which are defined by their parameters (center (Rect1RowRect1RowRect1RowRect1Rowrect1Row, Rect1ColumnRect1ColumnRect1ColumnRect1Columnrect1Column), orientation Rect1PhiRect1PhiRect1PhiRect1Phirect1Phi, and the half edge lengths Rect1Length1Rect1Length1Rect1Length1Rect1Length1rect1Length1 and Rect1Length2Rect1Length2Rect1Length2Rect1Length2rect1Length2) and (center (Rect2RowRect2RowRect2RowRect2Rowrect2Row, Rect2ColumnRect2ColumnRect2ColumnRect2Columnrect2Column), orientation Rect2PhiRect2PhiRect2PhiRect2Phirect2Phi, and the half edge lengths Rect2Length1Rect2Length1Rect2Length1Rect2Length1rect2Length1 and Rect2Length2Rect2Length2Rect2Length2Rect2Length2rect2Length2), respectively. The intersection area is returned in AreaIntersectionAreaIntersectionAreaIntersectionAreaIntersectionareaIntersection. If multiple values are given for the parameters of the second rectangle, the output is a tuple with the intersection area of the first rectangle with each of the second rectangles. In case no parameters are given for the second rectangle, an empty tuple is returned in AreaIntersectionAreaIntersectionAreaIntersectionAreaIntersectionareaIntersection.

Execution Information

Parameters

Rect1RowRect1RowRect1RowRect1Rowrect1Row (input_control)  rectangle2.center.y HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Center row coordinate of the first rectangle.

Rect1ColumnRect1ColumnRect1ColumnRect1Columnrect1Column (input_control)  rectangle2.center.x HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Center column coordinate of the first rectangle.

Rect1PhiRect1PhiRect1PhiRect1Phirect1Phi (input_control)  rectangle2.angle.rad HTupleHTupleHtuple (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).

Rect1Length1Rect1Length1Rect1Length1Rect1Length1rect1Length1 (input_control)  rectangle2.hwidth HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Half length of the first edge of the first rectangle.

Rect1Length2Rect1Length2Rect1Length2Rect1Length2rect1Length2 (input_control)  rectangle2.hheight HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Half length of the second edge of the first rectangle.

Rect2RowRect2RowRect2RowRect2Rowrect2Row (input_control)  rectangle2.center.y(-array) HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Center row coordinate of the second rectangle.

Rect2ColumnRect2ColumnRect2ColumnRect2Columnrect2Column (input_control)  rectangle2.center.x(-array) HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Center column coordinate of the second rectangle.

Rect2PhiRect2PhiRect2PhiRect2Phirect2Phi (input_control)  rectangle2.angle.rad(-array) HTupleHTupleHtuple (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).

Rect2Length1Rect2Length1Rect2Length1Rect2Length1rect2Length1 (input_control)  rectangle2.hwidth(-array) HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Half length of the first edge of the second rectangle.

Rect2Length2Rect2Length2Rect2Length2Rect2Length2rect2Length2 (input_control)  rectangle2.hheight(-array) HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Half length of the second edge of the second rectangle.

AreaIntersectionAreaIntersectionAreaIntersectionAreaIntersectionareaIntersection (output_control)  real(-array) HTupleHTupleHtuple (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_rectangle2AreaIntersectionRectangle2AreaIntersectionRectangle2AreaIntersectionRectangle2 returns the value 2 (H_MSG_TRUE).

See also

gen_rectangle2gen_rectangle2GenRectangle2GenRectangle2GenRectangle2, intersection_segmentsintersection_segmentsIntersectionSegmentsIntersectionSegmentsIntersectionSegments, intersection_segment_lineintersection_segment_lineIntersectionSegmentLineIntersectionSegmentLineIntersectionSegmentLine, intersection_segment_contour_xldintersection_segment_contour_xldIntersectionSegmentContourXldIntersectionSegmentContourXldIntersectionSegmentContourXld, intersection_line_contour_xldintersection_line_contour_xldIntersectionLineContourXldIntersectionLineContourXldIntersectionLineContourXld, intersection_contours_xldintersection_contours_xldIntersectionContoursXldIntersectionContoursXldIntersectionContoursXld

Module

Foundation