该接口对应一组点的集合(LPoints对象)。 更多...
Public 成员函数 | |
| void | Add (double x, double y) |
| void | AddPoints (ILPoints *points) |
| void | AddPointsInRegion (ILRegion *region) |
| int | Count () |
| 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 (HDC hdc, double zoomX, double zoomY, double panX, double panY) |
| BOOL | Empty () |
| ILCircle * | FitCircle () |
| ILEllipse * | FitEllipse () |
| ILLine * | FitLine () |
| void | FromSortables (ILSortables *sortable, LPVPositionMode posMode) |
| ILCircle * | GetBoundingCircle () |
| ILRect * | GetBoundingRect () |
| ILRect * | GetBoundingRotRect () |
| ILPoint * | GetCenter () |
| ILPolygon * | GetConvexHull () |
| void | GetPoints (LArray< double > xs, LArray< double > ys) |
| ILPoint * | Item (int index) |
| void | RemovePoints (double lbX, double ubX, double lbY, double ubY) |
| ILPoints * | Scale (double factorX, double factorY) |
| void | SetPoints (LArray< double > xs, LArray< double > ys) |
| ILPoints * | Transform (ILTransform *tf) |
| ILPoints * | Translate (double offsetX, double offsetY) |
Public 成员函数 继承自 ILGeomObject | |
| void | Drag (LPVGeomHandle geomHandle, int posX, int posY, double zoomX, double zoomY, double panX, double panY) |
| void | EnableHandle (LPVGeomHandle geomHandle, BOOL enabled) |
| LPVGeomHandle | HitTest (int posX, int posY, double zoomX, double zoomY, double panX, double panY) |
| void | ScaleTo (double factorX, double factorY) |
| void | TransformTo (ILTransform *tf) |
| void | TranslateTo (double offsetX, double offsetY) |
Public 成员函数 继承自 ILObject | |
| ILObject * | Copy () |
| LPVErrorCode | Load (LString filename) |
| void | Reset () |
| LPVErrorCode | Save (LString filename) |
| BOOL | Valid () |
额外继承的成员函数 | |
属性 继承自 ILObject | |
| LString | Name [get, set] |
| 对象的名称,默认为空。 大多数情况下,LPV 算法类并不使用这个名称。 若 ILDrawable::SetDrawName() 启用,该名称将被绘制在对象的附近 更多... | |
该接口对应一组点的集合(LPoints对象)。
| void Add | ( | double | x, |
| double | y | ||
| ) |
增加一个点到该点集
| [in] | x | 新增点的 x 坐标 |
| [in] | y | 新增点的 y 坐标 |
| void AddPoints | ( | ILPoints * | points | ) |
将输入的点集合并到该点集
| [in] | points | 输入的点集 |
| void AddPointsInRegion | ( | ILRegion * | region | ) |
将输入区域中的所有点,加入该点集中
| [in] | region | 输入的区域 |
| int Count | ( | ) |
获取集合中点的总数
计算点集中的每一个点到输入直线的距离,输出每个点对应的距离。 距离计算方式与 ILLine::Perpendicular() 相同。
| [in] | line | 输入的直线 |
| vals | 返回所有距离值,与点集顺序对应。 |
计算点集中的每一个点到输入点的距离,输出每个点对应的距离。 距离计算方式与 ILPoint::Distance() 相同。
| [in] | point | 输入的点 |
| vals | 返回所有距离值,与点集顺序对应。 |
计算点集中的每一个点到另一个点集中所有点的最小距离,输出每个点的最小距离及对应最近点的索引。
| [in] | points | 输入的点集 |
| [out] | indexes | 输出最近点在输入点集中的索引 |
| vals | 返回所有距离值,与点集顺序对应。 |
计算点集中的每一个点到输入多边形的距离,输出每个点对应的距离。 距离计算方式与 ILPolygon::DistanceToPoint() 相同。
| [in] | polygon | 输入的多边形 |
| [out] | rootPoints | 返回距离对应的多边形上的垂足 |
| vals | 返回所有距离值,与点集顺序对应。 |
| double DistanceToLine | ( | ILLine * | line, |
| LPVAggregation | aggType | ||
| ) |
计算点集中的每一个点到输入线的距离的统计值,如最大、最小或平均距离。距离计算方式与 ILLine::Perpendicular() 相同。
| [in] | line | 输入的直线 |
| [in] | aggType | 聚合方式 |
| val | 返回距离的统计值 |
| double DistanceToPoint | ( | ILPoint * | point, |
| LPVAggregation | aggType | ||
| ) |
计算点集中的每一个点到输入多边形的距离的统计值,如最大、最小或平均距离。距离计算方式与 ILPoint::Distance() 相同。
| [in] | point | 输入的点 |
| [in] | aggType | 聚合方式 |
| val | 返回距离的统计值 |
| double DistanceToPoints | ( | ILPoints * | points, |
| LPVAggregation | aggType | ||
| ) |
计算点集中的每一个点到另一个点集中所有点的最小距离的统计值,如最大、最小或平均距离。
| [in] | points | 输入的点集 |
| [in] | aggType | 聚合方式 |
| val | 返回距离的统计值 |
| double DistanceToPolygon | ( | ILPolygon * | polygon, |
| LPVAggregation | aggType | ||
| ) |
计算点集中的每一个点到输入多边形的距离的统计值,如最大、最小或平均距离。距离计算方式与 ILPolygon::DistanceToPoint() 相同。
| [in] | polygon | 输入的多边形 |
| [in] | aggType | 聚合方式 |
| val | 返回距离的统计值 |
| void Draw | ( | HDC | hdc, |
| double | zoomX, | ||
| double | zoomY, | ||
| double | panX, | ||
| double | panY | ||
| ) |
| BOOL Empty | ( | ) |
检查当前集合是否为空
| 若为空,返回 | True,否则返回 False |
| ILCircle* FitCircle | ( | ) |
| ILEllipse* FitEllipse | ( | ) |
| void FromSortables | ( | ILSortables * | sortable, |
| LPVPositionMode | posMode | ||
| ) |
根据输入的可排序对象,设置该点集的位置。
| [in] | sortable | 输入的可排序集合对象 |
| [in] | posMode | 设置位置计算的方式 |
| ILCircle* GetBoundingCircle | ( | ) |
计算点集的包围圆形
| ILRect* GetBoundingRect | ( | ) |
计算点集的包围矩形
| ILRect* GetBoundingRotRect | ( | ) |
计算点集的包围旋转矩形
| ILPoint* GetCenter | ( | ) |
获取中心,以所有点的平均位置计算:
\[ (\overline{x}, \overline{y}) \]
| ILPolygon* GetConvexHull | ( | ) |
计算点集的包围凸多边形
获取点集中所有的点
| [in] | xs | 输出点集中所有点的 x 坐标。需要在外部提起按照点的数量初始化数组。 |
| [in] | ys | 输出点集中所有点的 y 坐标 |
| ILPoint* Item | ( | int | index | ) |
获取点集中的指定索引的点
| [in] | index | 输入指定的索引,从 0 开始但小于总数的数字 |
| point | 返回该索引对应的点 |
| void RemovePoints | ( | double | lbX, |
| double | ubX, | ||
| double | lbY, | ||
| double | ubY | ||
| ) |
删除点集中在指定范围中的点
| [in] | lbX | 指定删除范围的 x 坐标下限 |
| [in] | ubX | 指定删除范围的 x 坐标上限 |
| [in] | lbY | 指定删除范围的 y 坐标下限 |
| [in] | ubY | 指定删除范围的 y 坐标上限 |
| ILPoints* Scale | ( | double | factorX, |
| double | factorY | ||
| ) |
缩放当前点集,生成一个新的点集
| [in] | factorX | x 方向的缩放比例 |
| [in] | factorY | y 方向的缩放比例。默认设置为 0,即与 x 方向的缩放系数相同,也就是等比缩放。 |
| results | 返回新的点集 |
设置点集中的点
| [in] | xs | 点集中所有点的 x 坐标 |
| [in] | ys | 点集中所有点的 y 坐标 |
| ILPoints* Transform | ( | ILTransform * | tf | ) |
应用指定的变换矩阵到当前点集,得到一个新的点集
| [in] | tf | 变换矩阵 |
| 返回新的点集 |
| ILPoints* Translate | ( | double | offsetX, |
| double | offsetY | ||
| ) |
平移当前点集,生成一个新的点集
| [in] | offsetX | x 方向的平移量 |
| [in] | offsetY | y 方向的平移量 |
| results | 返回新的点集 |