Leaper Vision Toolkit
中文 / English 2.x
Public 成员函数
ILPoints接口 参考

该接口对应一组点的集合(LPoints对象)。 更多...

类 ILPoints 继承关系图:
ILObjects ILObject LPoints

Public 成员函数

void Add (double x, double y)
 
void AddPoints (ILPoints *points)
 
void AddPointsInRegion (ILRegion *region)
 
LArray< double > DistancesToLine (ILLine *line)
 
LArray< double > DistancesToPoint (ILPoint *point)
 
LArray< double > DistancesToPoints (ILPoints *points, LArray< int > indexes)
 
LArray< double > DistancesToPolygon (ILPolygon *polygon, LArray< ILPoint * > rootPoints)
 
double DistanceToLine (ILLine *line, LPVAggregation aggType)
 
double DistanceToPoint (ILPoint *point, LPVAggregation aggType)
 
double DistanceToPoints (ILPoints *points, LPVAggregation aggType)
 
double DistanceToPolygon (ILPolygon *polygon, LPVAggregation aggType)
 
void Draw (LPVPointShape shape, HDC hdc, double zoomX, double zoomY, double panX, double panY)
 
ILCircleFitCircle ()
 
ILEllipseFitEllipse ()
 
ILLineFitLine ()
 
void FromSortables (ILSortables *sortable, LPVPositionMode posMode)
 
ILCircleGetBoundingCircle ()
 
ILRectGetBoundingRect ()
 
ILRectGetBoundingRotRect ()
 
ILPointGetCenter ()
 
ILPolygonGetConvexHull ()
 
void GetPoints (LArray< double > xs, LArray< double > ys)
 
ILPointItem (int index)
 
void RemovePoints (double lbX, double ubX, double lbY, double ubY)
 
ILPointsScale (double factorX, double factorY)
 
void SetPoints (LArray< double > xs, LArray< double > ys)
 
ILPointsTransform (ILTransform *tf)
 
ILPointsTranslate (double offsetX, double offsetY)
 
- Public 成员函数 继承自 ILObjects
int Count ()
 
BOOL Empty ()
 
ILObjectItemObject (int objIndex)
 
- Public 成员函数 继承自 ILObject
ILObjectCopy ()
 
LPVErrorCode Load (LString filename)
 
void Reset ()
 
LPVErrorCode Save (LString filename)
 
BOOL Valid ()
 

详细描述

该接口对应一组点的集合(LPoints对象)。

成员函数说明

◆ Add()

void Add ( double  x,
double  y 
)

增加一个点到该点集

参数
[in]x新增点的 x 坐标
[in]y新增点的 y 坐标

◆ AddPoints()

void AddPoints ( ILPoints points)

将输入的点集合并到该点集

参数
[in]points输入的点集

◆ AddPointsInRegion()

void AddPointsInRegion ( ILRegion region)

将输入区域中的所有点,加入该点集中

参数
[in]region输入的区域

◆ DistancesToLine()

LArray<double> DistancesToLine ( ILLine line)

计算点集中的每一个点到输入直线的距离,输出每个点对应的距离。 距离计算方式与 ILLine::Perpendicular() 相同。

参数
[in]line输入的直线
返回值
vals返回所有距离值,与点集顺序对应。

◆ DistancesToPoint()

LArray<double> DistancesToPoint ( ILPoint point)

计算点集中的每一个点到输入点的距离,输出每个点对应的距离。 距离计算方式与 ILPoint::Distance() 相同。

参数
[in]point输入的点
返回值
vals返回所有距离值,与点集顺序对应。

◆ DistancesToPoints()

LArray<double> DistancesToPoints ( ILPoints points,
LArray< int >  indexes 
)

计算点集中的每一个点到另一个点集中所有点的最小距离,输出每个点的最小距离及对应最近点的索引。

参数
[in]points输入的点集
[out]indexes输出最近点在输入点集中的索引
返回值
vals返回所有距离值,与点集顺序对应。

◆ DistancesToPolygon()

LArray<double> DistancesToPolygon ( ILPolygon polygon,
LArray< ILPoint * >  rootPoints 
)

计算点集中的每一个点到输入多边形的距离,输出每个点对应的距离。 距离计算方式与 ILPolygon::DistanceToPoint() 相同。

参数
[in]polygon输入的多边形
[out]rootPoints返回距离对应的多边形上的垂足
返回值
vals返回所有距离值,与点集顺序对应。

◆ DistanceToLine()

double DistanceToLine ( ILLine line,
LPVAggregation  aggType 
)

计算点集中的每一个点到输入线的距离的统计值,如最大、最小或平均距离。距离计算方式与 ILLine::Perpendicular() 相同。

参数
[in]line输入的直线
[in]aggType聚合方式
返回值
val返回距离的统计值

◆ DistanceToPoint()

double DistanceToPoint ( ILPoint point,
LPVAggregation  aggType 
)

计算点集中的每一个点到输入多边形的距离的统计值,如最大、最小或平均距离。距离计算方式与 ILPoint::Distance() 相同。

参数
[in]point输入的点
[in]aggType聚合方式
返回值
val返回距离的统计值

◆ DistanceToPoints()

double DistanceToPoints ( ILPoints points,
LPVAggregation  aggType 
)

计算点集中的每一个点到另一个点集中所有点的最小距离的统计值,如最大、最小或平均距离。

参数
[in]points输入的点集
[in]aggType聚合方式
返回值
val返回距离的统计值

◆ DistanceToPolygon()

double DistanceToPolygon ( ILPolygon polygon,
LPVAggregation  aggType 
)

计算点集中的每一个点到输入多边形的距离的统计值,如最大、最小或平均距离。距离计算方式与 ILPolygon::DistanceToPoint() 相同。

参数
[in]polygon输入的多边形
[in]aggType聚合方式
返回值
val返回距离的统计值

◆ Draw()

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

绘制点集到给定的设备上

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

◆ FitCircle()

ILCircle* FitCircle ( )

根据该点集拟合一个圆,使得点集中的所有点到这个圆的距离之和最小。 如需剔除输入中的异常点,请使用 LFitting

返回值
val返回拟合圆
参见
FitLine(), FitEllipse().

◆ FitEllipse()

ILEllipse* FitEllipse ( )

根据该点集拟合一个椭圆,使得点集中的所有点到这个椭圆的距离之和最小。

返回值
val返回拟合椭圆
参见
FitLine(), FitCircle().

◆ FitLine()

ILLine* FitLine ( )

根据该点集拟合一条直线,使得点集中的所有点到这条直线的距离之和最小。 如需剔除输入中的异常点,请使用 LFitting

返回值
val返回拟合直线
参见
FitCircle(), FitEllipse().

◆ FromSortables()

void FromSortables ( ILSortables sortable,
LPVPositionMode  posMode 
)

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

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

◆ GetBoundingCircle()

ILCircle* GetBoundingCircle ( )

计算点集的包围圆形

◆ GetBoundingRect()

ILRect* GetBoundingRect ( )

计算点集的包围矩形

◆ GetBoundingRotRect()

ILRect* GetBoundingRotRect ( )

计算点集的包围旋转矩形

◆ GetCenter()

ILPoint* GetCenter ( )

获取中心,以所有点的平均位置计算:

\[ (\overline{x}, \overline{y}) \]

◆ GetConvexHull()

ILPolygon* GetConvexHull ( )

计算点集的包围凸多边形

◆ GetPoints()

void GetPoints ( LArray< double >  xs,
LArray< double >  ys 
)

获取点集中所有的点

参数
[in]xs输出点集中所有点的 x 坐标。需要在外部提起按照点的数量初始化数组。
[in]ys输出点集中所有点的 y 坐标

◆ Item()

ILPoint* Item ( int  index)

获取点集中的指定索引的点

参数
[in]index输入指定的索引,从 0 开始但小于总数的数字
返回值
point返回该索引对应的点

◆ RemovePoints()

void RemovePoints ( double  lbX,
double  ubX,
double  lbY,
double  ubY 
)

删除点集中在指定范围中的点

参数
[in]lbX指定删除范围的 x 坐标下限
[in]ubX指定删除范围的 x 坐标上限
[in]lbY指定删除范围的 y 坐标下限
[in]ubY指定删除范围的 y 坐标上限

◆ Scale()

ILPoints* Scale ( double  factorX,
double  factorY 
)

缩放当前点集,生成一个新的点集

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

◆ SetPoints()

void SetPoints ( LArray< double >  xs,
LArray< double >  ys 
)

设置点集中的点

参数
[in]xs点集中所有点的 x 坐标
[in]ys点集中所有点的 y 坐标

◆ Transform()

ILPoints* Transform ( ILTransform tf)

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

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

◆ Translate()

ILPoints* Translate ( double  offsetX,
double  offsetY 
)

平移当前点集,生成一个新的点集

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