M_LINE::Set
Set the straight line parameter
int Set(
double a,
double b,
double c,
ProcUnit *ptrProcUnit,
int imageNo,
int mode
);
Parameters
a
|
Straight line parameter A
|
b
|
Straight line parameter B
|
c
|
Straight line parameter C
|
*ptrProcUnit
|
Pointer to the processing unit class
|
imageNo
|
The current target image number to be registered
|
mode
|
bit1:calibration ON/OFF, bit0:scroll ON/OFF
|
Return Value
Returns 0 when the expression is successfully converted.
Otherwise returns a non-zero value.
Description
Set straight line parameters.
Straight line is defined by AX+BY+C=0.
Example
int Sample::MeasureProc(ProcUnit *ptrProcUnit)
{
double a, b, c;
int outputMode = 0;
M_LINE line1;
func_measure(&a, &b, &c);
if (ptrSetupData->outputCoordinate == 1) {
outputMode |= 0x00000001;
}
if (ptrSetupData->calibration == 1) {
outputMode |= 0x00000002;
}
// set data
line1.Set(a, b, c, ptrProcUnit, 0, outputMode);
}