00001
00019 #ifndef INC_MI32_GEOM2D_H
00020 #define INC_MI32_GEOM2D_H
00021
00022 #ifndef INC_MI32_POINT_H
00023 #include <mi32/point.h>
00024 #endif
00025
00026 #ifdef GEOMDLL
00027 #define GEOMLIBEXPORT MI_DLLEXPORT
00028 #else
00029 #define GEOMLIBEXPORT MI_DLLIMPORT
00030 #endif
00031
00032 struct DRECT2D;
00033
00034 #if defined(__cplusplus)
00035 extern "C" {
00036 #endif
00037
00038
00040
00041
00042 #define SPLINE_UseMinDistance 0x0001
00043 #define SPLINE_TreatAsClosed 0x0002
00044 #define SPLINE_DontMoveEnds 0x0004
00045
00046 #define SPLINETYPE_None 0
00047 #define SPLINETYPE_Cubic 1
00048 #define SPLINETYPE_Quad 2
00049 #define SPLINETYPE_Bezier 3
00050
00054
00060 GEOMLIBEXPORT int CheckPointD (
00061 const DPOINT2D *start,
00062 const DPOINT2D *end,
00063 const DPOINT2D *point
00064 );
00065
00071 GEOMLIBEXPORT int CheckPointL (
00072 const LPOINT2D *start,
00073 const LPOINT2D *end,
00074 const LPOINT2D *point
00075 );
00076
00081 int ClipLineD (
00082 const DRECT2D *cliprect,
00083 DPOINT2D *start,
00084 DPOINT2D *end
00085 );
00086
00092 ERRVALUE ComputeSimpleBufferL (
00093 const LPOINT2D *ipointlist,
00094 int inumpoints,
00095 double bufdist,
00096 int joinstyle,
00097 LPOINT2D **rpointlist,
00098 int *rnumpoints
00099 );
00100
00104 GEOMLIBEXPORT double DistPointLineSegD (
00105 const DPOINT2D *start,
00106 const DPOINT2D *end,
00107 const DPOINT2D *point,
00108 DPOINT2D *closest
00109 );
00110
00114 GEOMLIBEXPORT double DistPointLineSegW (
00115 const WPOINT2D *start,
00116 const WPOINT2D *end,
00117 const WPOINT2D *point,
00118 DPOINT2D *closest
00119 );
00120
00124 GEOMLIBEXPORT double DistPointRectD (
00125 const DRECT2D *rect,
00126 const DPOINT2D *point,
00127 DPOINT2D *closest
00128 );
00129
00132 GEOMLIBEXPORT int FindLineInt (
00133 const DPOINT2D *line1pt1,
00134 const DPOINT2D *line1pt2,
00135 const DPOINT2D *line2pt1,
00136 const DPOINT2D *line2pt2,
00137 DPOINT2D *intpoint
00138 );
00139
00149 INT32 MfitPointsBSpline (
00150 DPOINT2D *In,
00151 DPOINT2D **Out,
00152 INT32 NumPts,
00153 int F,
00154 double Tolerance,
00155 UINT32 Flags
00156 );
00157
00167 INT32 MfitPointsBSplineQuadratic (
00168 DPOINT2D *In,
00169 DPOINT2D **Out,
00170 INT32 NumPts,
00171 int F,
00172 double Tolerance,
00173 UINT32 Flags
00174 );
00175
00182 INT32 MfitPointsBezier (
00183 DPOINT2D *In,
00184 DPOINT2D **Out,
00185 INT32 NumPts,
00186 INT32 NumOut,
00187 double Tolerance,
00188 UINT32 Flags
00189 );
00190
00206 INT32 MfitPointsSpline3D (
00207 DPOINT3D *In,
00208 DPOINT3D **Out,
00209 INT32 NumPts,
00210 INT32 F,
00211 double Tolerance,
00212 int SplineType,
00213 UINT32 Flags
00214 );
00215
00219 GEOMLIBEXPORT int PointInPolyD (
00220 const DPOLYGON *polygon,
00221 const DPOINT2D *point
00222 );
00223
00227 GEOMLIBEXPORT int PointInPolyL (
00228 const LPOLYGON *polygon,
00229 const LPOINT2D *point
00230 );
00231
00236 GEOMLIBEXPORT int SolveLinear (
00237 int n,
00238 double *A,
00239 double *b,
00240 double *x
00241 );
00242
00249 int SolveLinearSVD (
00250 int n,
00251 double *A,
00252 double *B,
00253 double *X
00254 );
00255
00256 #if defined(__cplusplus)
00257 }
00258 #endif
00259
00261
00262 #endif