This interface represents a collection of points(LPoints object). More...
Public Member Functions | |
| 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) |
| 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 Member Functions inherited from ILObjects | |
| int | Count () |
| BOOL | Empty () |
| ILObject * | ItemObject (int objIndex) |
Public Member Functions inherited from ILObject | |
| ILObject * | Copy () |
| LPVErrorCode | Load (LString filename) |
| void | Reset () |
| LPVErrorCode | Save (LString filename) |
| BOOL | Valid () |
This interface represents a collection of points(LPoints object).
| void Add | ( | double | x, |
| double | y | ||
| ) |
Add a point to the collection.
| [in] | x | The x-coordinate of the new point |
| [in] | y | The y-coordinate of the new point |
| void AddPoints | ( | ILPoints * | points | ) |
Add the points in the given collection to this.
| [in] | points | The input points |
| void AddPointsInRegion | ( | ILRegion * | region | ) |
Add all points in the given region to the collection.
| [in] | region | The input region |
Calculate the distance from each point in the collection to the input line, report all the distances. The distance is defined as ILLine::Perpendicular().
| [in] | line | The input line. |
| vals | Return all the distances, in the same order as the points. |
Calculate the distance from each point in the collection to the input point, report all the distances. The distance is defined as ILPoint::Distance().
| [in] | point | The input point |
| vals | Return all the distances, in the same order as the points. |
Calculate the distance from each point in the collection to the nearest point in the input points, report all the distances and the index of the nearest point.
| [in] | points | The input points |
| [out] | indexes | Output the index of the nearest point in the input |
| vals | Return all the distances, in the same order as the points. |
Calculate the distance from each point in the collection to the input polygon, report all the distances. The distance is defined as ILPolygon::DistanceToPoint().
| [in] | polygon | The input polygon |
| [out] | rootPoints | Output the root points on the polygon |
| vals | Return all the distances, in the same order as the points. |
| double DistanceToLine | ( | ILLine * | line, |
| LPVAggregation | aggType | ||
| ) |
Calculate the distance from each point in the collection to the input line, report the aggregated metric such as maximum, minimum or average distance. The distance is defined as ILLine::Perpendicular().
| [in] | line | The input Line |
| [in] | aggType | The aggregation type |
| val | Return the distance metric. |
| double DistanceToPoint | ( | ILPoint * | point, |
| LPVAggregation | aggType | ||
| ) |
Calculate the distance from each point in the collection to the input point, report the aggregated metric such as maximum, minimum or average distance. The distance is defined as ILPoint::Distance().
| [in] | point | The input point |
| [in] | aggType | The aggregation type |
| val | Return the distance metric. |
| double DistanceToPoints | ( | ILPoints * | points, |
| LPVAggregation | aggType | ||
| ) |
Calculate the distance from each point in the collection to the nearest point in the input points, report the aggregated metric such as maximum, minimum or average distance.
| [in] | points | The input points |
| [in] | aggType | The aggregation type |
| val | Return the distance metric. |
| double DistanceToPolygon | ( | ILPolygon * | polygon, |
| LPVAggregation | aggType | ||
| ) |
Calculate the distance from each point in the collection to the input polygon, report the aggregated metric such as maximum, minimum or average distance. The distance is defined as ILPolygon::DistanceToPoint().
| [in] | polygon | The input polygon |
| [in] | aggType | The aggregation type |
| val | Return the distance metric. |
| void Draw | ( | LPVPointShape | shape, |
| HDC | hdc, | ||
| double | zoomX, | ||
| double | zoomY, | ||
| double | panX, | ||
| double | panY | ||
| ) |
Draw all the points on HDC.
| [in] | shape | The shape of the point in drawing |
| ILCircle* FitCircle | ( | ) |
Fit a circle which minimize the total distance between the result and all the points. If out-lier filtering is necessary, use LFitting instead.
| val | Return the fitting result circle |
| ILEllipse* FitEllipse | ( | ) |
Fit an ellipse which minimize the total distance between the result and all the points.
| val | Return the fitting result ellipse |
| ILLine* FitLine | ( | ) |
Fit a line which minimize the total distance between the result and all the points. If out-lier filtering is necessary, use LFitting instead.
| val | Return the fitting result line |
| void FromSortables | ( | ILSortables * | sortable, |
| LPVPositionMode | posMode | ||
| ) |
Set placement of the point from the input sortable collection object.
| [in] | sortable | The input sortable collection object |
| [in] | posMode | Specify which points are used as the objects's positions, usually the centers. |
| ILCircle* GetBoundingCircle | ( | ) |
Get the bounding circle of all the points
| ILRect* GetBoundingRect | ( | ) |
Get the bounding rectangle of all the points
| ILRect* GetBoundingRotRect | ( | ) |
Get the rotated bounding rectangle of all the points
| ILPoint* GetCenter | ( | ) |
Get the center, it's averaging position of the all points, as:
\[ (\overline{x}, \overline{y}) \]
| ILPolygon* GetConvexHull | ( | ) |
Get the bounding convex hull of all the points
Get all the points
| [in] | xs | Output x-coordinates of the points, you should get the count and reserve the array outside. |
| [in] | ys | Output y-coordinates of the points |
| ILPoint* Item | ( | int | index | ) |
Fetch one point with the given index.
| [in] | index | The input index, it should be a 0-based number smaller than total count. |
| point | Return the point of given index. |
| void RemovePoints | ( | double | lbX, |
| double | ubX, | ||
| double | lbY, | ||
| double | ubY | ||
| ) |
Remove some points in the collection which is in the given range.
| [in] | lbX | The lower bound of the x-coordinate to be removed |
| [in] | ubX | The upper bound of the x-coordinate to be removed |
| [in] | lbY | The lower bound of the y-coordinate to be removed |
| [in] | ubY | The upper bound of the y-coordinate to be removed |
| ILPoints* Scale | ( | double | factorX, |
| double | factorY | ||
| ) |
Scale the points by the given factor and return a new collection of points
| [in] | factorX | The scale factor of x-coordinate |
| [in] | factorY | The scale factor of y-coordinate |
| results | Return the new collection of points |
Set the points
| [in] | xs | The x-coordinate of the points |
| [in] | ys | The y-coordinate of the points |
| ILPoints* Transform | ( | ILTransform * | tf | ) |
Transform the points via the given transformation and return a new collection of points
| [in] | tf | The transformation. |
| Return | the new collection of points |
| ILPoints* Translate | ( | double | offsetX, |
| double | offsetY | ||
| ) |
Translate the points by the given offset and return a new collection of points
| [in] | offsetX | The x-coordinate of the offset |
| [in] | offsetY | The y-coordinate of the offset |
| results | Return the new collection points |