RotatedRectangleCorners
Computes the 4 corner points of a rotated rectangle.
Syntax
Definition:
HRESULT RotatedRectangleCorners(
HRESULT hrPrev,
TcVnRotatedRectangle& stRect,
TcVnArray4_Point2_REAL& aCorners
)Parameters
|
Name |
Type |
Description |
|---|---|---|
|
hrPrev |
HRESULT indicating the result of previous operations (If SUCCEEDED(hrPrev) equals false, no operation is executed.) | |
|
stRect |
Rotated rectangle | |
|
aCorners |
Returns the 4 corner points |
Further information
The function returns the four corners aCorners of the rotated rectangle as TcVnArray4_Point2_REAL, which corresponds to an Array [0..3] of TcVnPoint2_REAL . At an angle of 0°, aCorners[0] contains the coordinates of the lower left corner of the rectangle parallel to the axes. The remaining indices follow a clockwise order from the top left (aCorners[1]), top right (aCorners[2]), to the bottom right (aCorners[3]). If the rectangle is rotated by 165°, for example, the corner assignment rotates accordingly so that the original bottom left corner is now at the top right.

Required License
TC3 Vision Base
System Requirements
Development environment | Target platform | PLC libraries to include |
|---|---|---|
TwinCAT V3.1.4024.59 or later | PC or CX (x64) with min. PL50, e.g. Intel Atom® 4-core CPU | Tc3_Vision |
Return value