Leaper Vision Toolkit
中文 / English 2.x
Public 成员函数 | 属性
ILPoint接口 参考

该接口对应一个点(LPoint对象)。 更多...

类 ILPoint 继承关系图:
ILObject LPoint

Public 成员函数

double Collinear (ILPoint *point1, ILPoint *point2)
 
double Distance (ILPoint *point)
 
double DistanceWithRefLine (ILPoint *point, ILLine *refLine)
 
double DotProduct (ILPoint *point)
 
void Draw (LPVPointShape shape, HDC hdc, double zoomX, double zoomY, double panX, double panY)
 
void FromSortable (ILSortable *sortable, LPVPositionMode posMode)
 
ILPointMidPoint (ILPoint *point)
 
ILPointScale (double factorX, double factorY)
 
void Set (double x, double y)
 
ILPointTransform (ILTransform *tf)
 
ILPointTranslate (double offsetX, double offsetY)
 
- Public 成员函数 继承自 ILObject
ILObjectCopy ()
 
LPVErrorCode Load (LString filename)
 
void Reset ()
 
LPVErrorCode Save (LString filename)
 
BOOL Valid ()
 

属性

double X [get, set]
 点的 x 坐标
 
double Y [get, set]
 点的 y 坐标
 

详细描述

该接口对应一个点(LPoint对象)。

成员函数说明

◆ Collinear()

double Collinear ( ILPoint point1,
ILPoint point2 
)

评价当前点和输入的两个点是否共线

参数
[in]point1输入的第一个点
[in]point2输入的第二个点
返回值
返回评价值,在(0, 1) 范围内。返回值越接近 1,共线性越佳。

◆ Distance()

double Distance ( ILPoint point)

计算当前点和输入点建的距离

参数
[in]point输入的点
返回值
返回距离值

◆ DistanceWithRefLine()

double DistanceWithRefLine ( ILPoint point,
ILLine refLine 
)

计算当前点和输入点以参考线为基准的距离

参数
[in]point输入的点
[in]refLine基准参考线
返回值
返回距离值

◆ DotProduct()

double DotProduct ( ILPoint point)

计算当前点与输入点的点乘

参数
[in]point输入的点
返回值
返回点乘的结果

◆ Draw()

void Draw ( LPVPointShape  shape,
HDC  hdc,
double  zoomX,
double  zoomY,
double  panX,
double  panY 
)

绘制点到给定的设备

参数
[in]shape绘制点时使用的形状
参见
Use Draw Functions
备注
该函数在 Linux / MacOS 平台暂不可用。

◆ FromSortable()

void FromSortable ( ILSortable sortable,
LPVPositionMode  posMode 
)

根据输入的可排序对象,设置该点的位置。

参数
[in]sortable输入的可排序对象
[in]posMode设置位置计算的方式

◆ MidPoint()

ILPoint* MidPoint ( ILPoint point)

计算当前点与输入点的中点

参数
[in]point输入的点
返回值
返回计算得到的中点

◆ Scale()

ILPoint* Scale ( double  factorX,
double  factorY 
)

缩放当前点的坐标,得到一个新的点

参数
[in]factorXx 方向的缩放比例
[in]factorYy 方向的缩放比例
返回值
返回新的点

◆ Set()

void Set ( double  x,
double  y 
)

设置点的位置

参数
[in]xx 坐标
[in]yy 坐标

◆ Transform()

ILPoint* Transform ( ILTransform tf)

应用指定的变换矩阵到当前点,得到一个新的点

参数
[in]tf变换矩阵
返回值
返回新的点

◆ Translate()

ILPoint* Translate ( double  offsetX,
double  offsetY 
)

平移当前点,得到一个新的点

参数
[in]offsetXx 方向的平移量
[in]offsetYy 方向的平移量
返回值
返回新的点