Functions | |
| GEOMLIBEXPORT int | ArcFrom3Pts (const DPOINT2D *p1, const DPOINT2D *p2, const DPOINT2D *p3, double *cx, double *cy, double *r, double *sang, double *eang) |
| GEOMLIBEXPORT int | CheckPointD (const DPOINT2D *start, const DPOINT2D *end, const DPOINT2D *point) |
| int | CheckPointL (const LPOINT2D *start, const LPOINT2D *end, const LPOINT2D *point) |
| GEOMLIBEXPORT int | CircleFrom2Pts (const DPOINT2D *p1, const DPOINT2D *p2, double *cx, double *cy, double *r) |
| GEOMLIBEXPORT int | CircleFrom3Pts (const DPOINT2D *T1, const DPOINT2D *T2, const DPOINT2D *T3, double *center_x, double *center_y, double *radius) |
| int | ClipLineD (const DRECT2D *cliprect, DPOINT2D *start, DPOINT2D *end) |
| int | ComputeDPolygonsFromSelectedVoronoi (DPOLYGON **Dpolys, INT32 *NumDpolys, VORONOI_DIAGRAM *vdiagram) |
| ERRVALUE | ComputeSimpleBufferL (const LPOINT2D *ipointlist, int inumpoints, double bufdist, int joinstyle, LPOINT2D **rpointlist, int *rnumpoints) |
| GEOMLIBEXPORT double | DistPointLineSegD (const DPOINT2D *start, const DPOINT2D *end, const DPOINT2D *point, DPOINT2D *closest) |
| double | DistPointLineSegW (const WPOINT2D *start, const WPOINT2D *end, const WPOINT2D *point, DPOINT2D *closest) |
| GEOMLIBEXPORT double | DistPointRectD (const DRECT2D *rect, const DPOINT2D *point, DPOINT2D *closest) |
| void | DoneVoronoiDiagram (VORONOI_DIAGRAM *vdiagram) |
| int | ExtendLineToRectD (DPOINT2D *ip1, DPOINT2D *ip2, DRECT2D *rect, DPOINT2D *op1, DPOINT2D *op2) |
| double | FindDistToArc (const CONICARC *arc, const DPOINT2D *point, int type) |
| double | FindDistToEArc (const CONICEARC *earc, double x, double y, int type) |
| double | FindDistToEllipse (const CONICELLIPSE *elp, double x, double y) |
| GEOMLIBEXPORT int | FindLineInt (const DPOINT2D *line1pt1, const DPOINT2D *line1pt2, const DPOINT2D *line2pt1, const DPOINT2D *line2pt2, DPOINT2D *intpoint) |
| void | InitVoronoiDiagram (VORONOI_DIAGRAM *vdiagram) |
| GEOMLIBEXPORT ERRVALUE | LineFromConic (const CADEARC &earc, SIMPLE_ARRAY< DPOINT2D > &PointList, TRANS2D_AFFINE *ArcToPixel, bool IsChord, bool IsWedge) |
| INT32 | MfitBSplineMovePoint (DPOINT2D *In, DPOINT2D **Out, INT32 NumPts, INT32 EditPoint, int F, double Tolerance, UINT32 Flags) |
| INT32 | MfitPointsBezier (DPOINT2D *In, DPOINT2D **Out, INT32 NumPts, INT32 NumOut, double Tolerance, UINT32 Flags) |
| INT32 | MfitPointsBSpline (DPOINT2D *In, DPOINT2D **Out, INT32 NumPts, int F, double Tolerance, UINT32 Flags) |
| INT32 | MfitPointsBSplineQuadratic (DPOINT2D *In, DPOINT2D **Out, INT32 NumPts, int F, double Tolerance, UINT32 Flags) |
| INT32 | MfitPointsSpline3D (DPOINT3D *In, DPOINT3D **Out, INT32 NumPts, INT32 F, double Tolerance, int SplineType, UINT32 Flags) |
| GEOMLIBEXPORT int | PointInPolyD (const DPOLYGON *polygon, const DPOINT2D *point) |
| int | PointInPolyL (const LPOLYGON *polygon, const LPOINT2D *point) |
| GEOMLIBEXPORT int | PolyStatsD (const DPOLYGON *polygon, double *area, double *centx, double *centy, int *orient) |
| GEOMLIBEXPORT INT32 | RemoveDupPts (DPOINT2D *pts, INT32 num) |
| GEOMLIBEXPORT INT32 | RemoveDupPtsT (DPOINT2D *pts, INT32 num, double thresh) |
| GEOMLIBEXPORT int | SolveLinear (int n, double *A, double *b, double *x) |
| int | SolveLinearSVD (int n, double *A, double *B, double *X) |
| int | VoronoiProc (DPOINT3D **Points, INT32 *NumPoints, VORONOI_DIAGRAM *vdiagram, double ExtFactor) |
| GEOMLIBEXPORT int ArcFrom3Pts | ( | const DPOINT2D * | p1, | |
| const DPOINT2D * | p2, | |||
| const DPOINT2D * | p3, | |||
| double * | cx, | |||
| double * | cy, | |||
| double * | r, | |||
| double * | sang, | |||
| double * | eang | |||
| ) |
Compute arc from three points on the circumference of a circle.
| GEOMLIBEXPORT int CheckPointD | ( | const DPOINT2D * | start, | |
| const DPOINT2D * | end, | |||
| const DPOINT2D * | point | |||
| ) |
Determine point location relative to a line (double coordinates).
| start | Starting point used to define line |
| end | Ending point used to define line |
| point | Point to check |
Determine point location relative to a line (LONG coordinates).
| start | Starting point used to define line |
| end | Ending point used to define line |
| point | Point to check |
| GEOMLIBEXPORT int CircleFrom2Pts | ( | const DPOINT2D * | p1, | |
| const DPOINT2D * | p2, | |||
| double * | cx, | |||
| double * | cy, | |||
| double * | r | |||
| ) |
Compute circle from 2 points defining the diameter.
| GEOMLIBEXPORT int CircleFrom3Pts | ( | const DPOINT2D * | T1, | |
| const DPOINT2D * | T2, | |||
| const DPOINT2D * | T3, | |||
| double * | center_x, | |||
| double * | center_y, | |||
| double * | radius | |||
| ) |
Compute circle from 3 points on the circumference.
Clip line to rectangle (double coordinates).
| cliprect | Rectangle to clip to |
| start | Starting point of segment, modified if necessary |
| end | Ending point of segment, modified if necessary |
| int ComputeDPolygonsFromSelectedVoronoi | ( | DPOLYGON ** | Dpolys, | |
| INT32 * | NumDpolys, | |||
| VORONOI_DIAGRAM * | vdiagram | |||
| ) |
| ERRVALUE ComputeSimpleBufferL | ( | const LPOINT2D * | ipointlist, | |
| int | inumpoints, | |||
| double | bufdist, | |||
| int | joinstyle, | |||
| LPOINT2D ** | rpointlist, | |||
| int * | rnumpoints | |||
| ) |
Compute buffer on one side of a polyline.
Note: Consecutive points in the input point list MUST be different. Positive buffer distances will result in a buffer to the right of the line assuming Cartesian coordinates (+ right/up, - left/down).
| rpointlist | Allocated point list returned |
| rnumpoints | Number of points returned |
| GEOMLIBEXPORT double DistPointLineSegD | ( | const DPOINT2D * | start, | |
| const DPOINT2D * | end, | |||
| const DPOINT2D * | point, | |||
| DPOINT2D * | closest | |||
| ) |
Determine distance between point and line segment (double coordinates).
| start | Starting point of line segment |
| end | Ending point of line segment |
| point | Point to test |
| closest | Closest point on segment returned (NULL if not needed) |
| double DistPointLineSegW | ( | const WPOINT2D * | start, | |
| const WPOINT2D * | end, | |||
| const WPOINT2D * | point, | |||
| DPOINT2D * | closest | |||
| ) |
Determine distance between point and line segment (WORD coordinates).
| start | Starting point of line segment |
| end | Ending point of line segment |
| point | Point to test |
| closest | Closest point on segment returned (NULL if not needed, DPOINT2D) |
| GEOMLIBEXPORT double DistPointRectD | ( | const DRECT2D * | rect, | |
| const DPOINT2D * | point, | |||
| DPOINT2D * | closest | |||
| ) |
Determine distance between point and rectangle (double coordinates).
| rect | Rectangle to compute distance to |
| point | Point to test |
| closest | Closest point on rectangle returned (NULL if not needed) |
| void DoneVoronoiDiagram | ( | VORONOI_DIAGRAM * | vdiagram | ) |
| int ExtendLineToRectD | ( | DPOINT2D * | ip1, | |
| DPOINT2D * | ip2, | |||
| DRECT2D * | rect, | |||
| DPOINT2D * | op1, | |||
| DPOINT2D * | op2 | |||
| ) |
Extend line to rectangle boundaries.
Compute the distance from a point to an arc.
| arc | Structure containing arc info |
| point | The point to get distance to |
| type | Type of arc to check |
| double FindDistToEArc | ( | const CONICEARC * | earc, | |
| double | x, | |||
| double | y, | |||
| int | type | |||
| ) |
Compute the distance from a point to an elliptical arc.
| earc | Structure containing elliptical arc info |
| x | X coordinate of point |
| y | Y coordinate of point |
| type | Type of arc to check |
| double FindDistToEllipse | ( | const CONICELLIPSE * | elp, | |
| double | x, | |||
| double | y | |||
| ) |
Compute the distance from a point to an ellipse.
| elp | Structure containing ellipse info |
| x | X coordinate of point |
| y | Y coordinate of point |
| GEOMLIBEXPORT int FindLineInt | ( | const DPOINT2D * | line1pt1, | |
| const DPOINT2D * | line1pt2, | |||
| const DPOINT2D * | line2pt1, | |||
| const DPOINT2D * | line2pt2, | |||
| DPOINT2D * | intpoint | |||
| ) |
Determine if line segments intersect, where, and type of intersection.
| void InitVoronoiDiagram | ( | VORONOI_DIAGRAM * | vdiagram | ) |
Initialize VoronoiDiagram.
| GEOMLIBEXPORT ERRVALUE LineFromConic | ( | const CADEARC & | earc, | |
| SIMPLE_ARRAY< DPOINT2D > & | PointList, | |||
| TRANS2D_AFFINE * | ArcToPixel, | |||
| bool | IsChord, | |||
| bool | IsWedge | |||
| ) |
Generates a line based on a conic definition.
| earc | Conic to generate line from |
| PointList | Line points RETURNED |
| ArcToPixel | Determine density of line points to approximate arc |
| IsChord | Is ARC_CHORD |
| IsWedge | Is ARC_WEDGE |
| INT32 MfitBSplineMovePoint | ( | DPOINT2D * | In, | |
| DPOINT2D ** | Out, | |||
| INT32 | NumPts, | |||
| INT32 | EditPoint, | |||
| int | F, | |||
| double | Tolerance, | |||
| UINT32 | Flags | |||
| ) |
Compute cubic B - spline for 4 segments arround one point (2 on left and 2 on right side) in the given point list / 2D - line.
| In | Input array of points - passed |
| Out | Pointer to output array - returned |
| NumPts | Number of points in input array |
| EditPoint | Point that you want to move (will be center point of 7-point chain) |
| F | Number of additional knots between input points |
| Tolerance | Currently used only with SPLINE_UseMinDistance flag minimal allowed distance between points in spline |
| Flags | Processing flags |
| INT32 MfitPointsBezier | ( | DPOINT2D * | In, | |
| DPOINT2D ** | Out, | |||
| INT32 | NumPts, | |||
| INT32 | NumOut, | |||
| double | Tolerance, | |||
| UINT32 | Flags | |||
| ) |
Compute Bezier for given point list / 2D - line.
| In | Input array of points - passed |
| Out | Pointer to output array - returned |
| NumPts | Number of points in input array |
| NumOut | Number of output points |
| Tolerance | Currently used only with SPLINE_UseMinDistance flag minimal allowed distance between points in spline |
| Flags | Processing flags: SPLINE_UseMinDistance - use Tolerance parameter |
| INT32 MfitPointsBSpline | ( | DPOINT2D * | In, | |
| DPOINT2D ** | Out, | |||
| INT32 | NumPts, | |||
| int | F, | |||
| double | Tolerance, | |||
| UINT32 | Flags | |||
| ) |
Compute cubic B - spline for given point list / 2D - line.
| In | Input array of points - passed |
| Out | Pointer to output array - returned |
| NumPts | Number of points in input array |
| F | Number of additional knots between input points |
| Tolerance | Currently used only with SPLINE_UseMinDistance flag minimal allowed distance between points in spline |
| Flags | Flags |
| INT32 MfitPointsBSplineQuadratic | ( | DPOINT2D * | In, | |
| DPOINT2D ** | Out, | |||
| INT32 | NumPts, | |||
| int | F, | |||
| double | Tolerance, | |||
| UINT32 | Flags | |||
| ) |
Compute quadratic B - spline for given point list / 2D - line.
| In | Input array of points - passed |
| Out | Pointer to output array - returned |
| NumPts | Number of points in input array |
| F | Number of additional knots between input points. |
| Tolerance | Currently used only with SPLINE_UseMinDistance flag minimal allowed distance between points in spline. |
| Flags | Flags |
| INT32 MfitPointsSpline3D | ( | DPOINT3D * | In, | |
| DPOINT3D ** | Out, | |||
| INT32 | NumPts, | |||
| INT32 | F, | |||
| double | Tolerance, | |||
| int | SplineType, | |||
| UINT32 | Flags | |||
| ) |
Compute spline for given point list / 3D - line.
| In | Input array of points - passed |
| Out | Pointer to output array - returned |
| NumPts | Number of points in input array |
| F | Number of additional knots between input points or desired number of points in output (for Bezier) |
| Tolerance | Currently used only with SPLINE_UseMinDistance flag minimal allowed distance between points in spline |
| SplineType | Spline type |
| Flags | Flags |
Determine if a point is inside a polygon (double coordinates).
| polygon | Polygon to use |
| point | Point to test |
Determine if a point is inside a polygon (LONG coordinates).
| polygon | Polygon to use |
| point | Point to test |
| GEOMLIBEXPORT int PolyStatsD | ( | const DPOLYGON * | polygon, | |
| double * | area, | |||
| double * | centx, | |||
| double * | centy, | |||
| int * | orient | |||
| ) |
Compute polygon area, centroid, perimeter, orientation (double coordinates).
| polygon | Polygon to compute attributes of |
| area | Polygon area returned (NULL if don't care) |
| centx | X centroid returned (NULL if don't care) |
| centy | Y centroid returned (NULL if don't care) |
| orient | Polygon orientation (1=clockwise, 0=anticlockwise) returned (NULL ok) |
Remove duplicate and colinear points from a point buffer.
| pts | Point buffer |
| num | Number of points in point buffer |
Check and remove duplicate and colinear points in a line within a threshold.
| pts | Point buffer |
| num | Number of points in point buffer |
| thresh | Threshold |
| GEOMLIBEXPORT int SolveLinear | ( | int | n, | |
| double * | A, | |||
| double * | b, | |||
| double * | x | |||
| ) |
Solve general set of linear equations.
Notes: Solve the matrix equation: A * X = B for X Where: A is an NxN matrix, X is a 1xN matrix, B is an Nx1 matrix
| n | Number of equations |
| A | NxN coefficient matrix "A" |
| b | Nx1 result matrix "B" |
| x | 1xN unknown matrix returned "X" |
| int SolveLinearSVD | ( | int | n, | |
| double * | A, | |||
| double * | B, | |||
| double * | X | |||
| ) |
Solve general set of linear equations, using MatSolveSVD().
Notes: Solve the matrix equation: A * X = B for X Where: A is an NxN matrix X is a 1xN matrix B is an Nx1 matrix
| n | Number of equations |
| A | NxN coefficient matrix "A" |
| B | Nx1 result matrix "B" |
| X | 1xN unknown matrix returned "X" |
| int VoronoiProc | ( | DPOINT3D ** | Points, | |
| INT32 * | NumPoints, | |||
| VORONOI_DIAGRAM * | vdiagram, | |||
| double | ExtFactor | |||
| ) |
1.5.2