imaqGetPerpendicularLine
Usage
int imaqGetPerpendicularLine(PointFloat refLineStart, PointFloat refLineEnd, PointFloat point, PointFloat* perpLineStart, PointFloat* perpLineEnd, double* distance);
Purpose
Computes a line that passes through a point and is perpendicular to a reference line.
Parameters
|
Name
|
Type
|
Description
|
|---|---|---|
| refLineStart | PointFloat | The coordinate location of the start of the reference line. |
| refLineEnd | PointFloat | The coordinate location of the end of the reference line. |
| point | PointFloat | The coordinate location of the point. |
| perpLineStart | PointFloat* | On return, the coordinate location of the start of the perpendicular line. This point is point. Set this parameter to NULL if you do not need this information. |
| perpLineEnd | PointFloat* | On return, the coordinate location of the end of the perpendicular line. This point lies on the reference line. Set this parameter to NULL if you do not need this information. |
| distance | double* | On return, the shortest (Euclidean) distance from the point to the reference line. Set this parameter to NULL if you do not need this information. |
Return Value
| Type |
Description |
|---|---|
| int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError(). |
Parameter Discussion
perpLineStart,perpLineEnd—If point lies on the reference line, perpLineStart is not the same as point. perpLineEnd is point, and perpLineStart lies on the line perpendicular to the reference line.