ut_geo.h File Reference


Detailed Description

Basic geometry definitions.

Go to the source code of this file.

Data Structures

struct  Quat
 quaternion More...
struct  dcomplex
struct  polcoeff_d3
struct  polcoeff_d4
struct  polcoeff_d5
struct  polynom_d3
 Typ_polynom_d3 Typ_CVPSP3. More...
struct  Polynom1
 Typ_Polynom1. More...
struct  Polynom3
 Typ_Polynom3. More...
struct  Polynom_
 Typ_Polynom_. More...
struct  Point2
 2D-point, Typ_PT2 More...
struct  Point
 3D-point, Typ_PT More...
struct  Vector2
 2D-vector, Typ_VC2 More...
struct  Vector
 3D-vector, Typ_VC More...
struct  Ray
struct  Line2
 2D-line, Typ_LN2 More...
struct  Line
 3D-line, Typ_LN More...
struct  Triangle
 triangle, Typ_Tria More...
struct  Circ2
 2D-circle, Typ_CI2, Typ_AC2 More...
struct  Circ
 3D-circle, Typ_CI, Typ_AC More...
struct  CurvElli
 ellipse, Typ_CVELL More...
struct  Curv
 do not use; replaced by ObjGX More...
struct  CurvPoly
 Curve: polygon, Typ_CVPOL. More...
struct  CurvBSpl
 Curve: B-spline Typ_CVBSP. More...
struct  CurvRBSpl
 Rational B-Spline-curve; Typ_CVRBSP. More...
struct  CurvBez2
 2D-Bezier curve Typ_CVBEZ2 More...
struct  CurvBez
 Bezier curve Typ_CVBEZ. More...
struct  CurvRBez
 Rational Bezier curve Typ_CVRBEZ. More...
struct  CurvClot
 Clothoid curve Typ_CVCLOT. More...
struct  Plane
 3D-plane, Typ_PLN More...
struct  SurHat
 Hatch Typ_SURHAT. More...
struct  SurRev
 RevolvedSurf Typ_SURRV. More...
struct  SurStd
 StandardSurf (planar, conic, toroid) Typ_SUR. More...
struct  SurStripe
 surface from group of stripes; stripe from 2 polygons. More...
struct  SurBSpl
 Area: B-Spline-Surf Typ_SURBSP. More...
struct  SurRBSpl
 Area: Rat.B-Spline-Surf Typ_SURRBSP. More...
struct  ColRGB
 color, Typ_Color More...
struct  AText
 text or image or label; Typ_ATXT, Typ_Tag .. More...
struct  TexBas
 basic texture description; Typ_TEXB More...
struct  TexRef
 texture reference; Typ_TEXR More...
struct  GText
 grafic text; Typ_GTXT More...
struct  Ditto
 internal submodel (block); Typ_Ditto More...
struct  ModelMock
 internal submodel reference; Typ_Mock More...
struct  ModelBas
 basic model description; Typ_SubModel More...
struct  ModelRef
 model reference; Typ_Model More...
struct  ModelNode
 Typ_ModelNode. More...
struct  Sphere
 sphere; Typ_SPH More...
struct  Conus
 cone; Typ_CON More...
struct  Torus
 torus; Typ_TOR More...
struct  Dimen
 dimension; Typ_Dimen More...
struct  Dim3
 3D-dimension; Typ_Dim3 More...
struct  GR_Att
struct  ObjAtt
 PermanentAttributRecord. More...
struct  DL_Att
 DisplayListRecord. More...
struct  TraRot
 Typ_TraRot:. More...
struct  Activity
 Typ_Activ ("I"). More...
struct  Verts
struct  Face
struct  Fac3
struct  Faces
struct  FacNf
 Face with NeigbourFaces. More...
struct  Edge
 ipt: index points; More...
struct  Edg3
 i1, i2 index to points More...
struct  EdgeLine
 Typ_EdgeLine. More...
struct  Edges
struct  Mesh
 Typ_SURMSH 2007-03-24 TB. More...
struct  BTool
struct  ObjGX
 Typ_ObjGX. More...
struct  ObjGrp
 Typ_Group. More...
struct  ObjG2
struct  ObjG
 do not use; replaced by ObjGX. More...
union  ObjX
 do not use; replaced by ObjGX. More...
union  ObjUX
 do not use; replaced by ObjGX. More...
struct  ContTab
 ContourCurve. More...
struct  ObjRange
 group of consecutive objects More...
struct  Memspc
 Typ_Memspc. More...
union  uni_i4i2
 union long / short[2] More...
struct  stru_2i2
 int = short + short More...
struct  stru_c3c1
 int = char[4] + char More...

Defines

#define RAD_360   6.2831853071795862319
 360 Grad
#define RAD_270   4.7123889803846896739
 270 Grad
#define RAD_225   3.92699081698724151736
 225 Grad
#define RAD_180   3.14159265358979323846
 180 Grad
#define RAD_135   2.3561944901923448368
 135 Grad
#define RAD_90   1.5707963267948965579
 90 Grad
#define RAD_60   1.0471975511965976313
 60 Grad
#define RAD_45   0.7853981633974482789
 45 Grad
#define RAD_30   0.5235987755982988156
 30 Grad
#define RAD_10   0.174532925199432954
 10 Grad
#define RAD_1   0.0174532925199432954
 1 Grad
#define RAD_01   0.0017453292519943295
 0.1 Grad
#define SR_3   1.7320508075688772
 SQRT(3).
#define SR_2   1.4142135623730951
 SQRT(2).
#define SR_PI   1.7724538509055159
 SQRT(PI) = SQRT(RAD_180).
#define CCW   1
 counterclockwise
#define CW   -1
 clockwise
#define YES   0
 FALSE.
#define NO   1
 TRUE.
#define ON   0
 FALSE.
#define OFF   1
 TRUE.
#define Typ_Error   0
 U0 = undefined.
#define Typ_VAR   1
 V numer. variable.
#define Typ_PT   2
 P Point.
#define Typ_LN   3
 L Line.
#define Typ_CI   4
 C do not use; use Typ_AC.
#define Typ_AC   5
 C Circ.
#define Typ_VC   6
 D Vector.
#define Typ_CV   7
 S all curves.
#define Typ_CVPOL   8
 S CurvPoly.
#define Typ_CVPSP3   9
 S polynom_d3.
#define Typ_CVBSP   10
 S CurvBSpl.
#define Typ_CVRBSP   11
 S CurvRBSpl.
#define Typ_CVCCV   12
 S.
#define Typ_CVELL   13
 S CurvElli.
#define Typ_CVBEZ   14
 S CurvBez.
#define Typ_CVRBEZ   15
 S CurvRBez.
#define Typ_CVCLOT   16
 S ClothoidCurve.
#define Typ_APPOBJ   20
#define Typ_PT2   22
 P Point2.
#define Typ_LN2   23
 L Line2.
#define Typ_AC2   24
 C Circ2.
#define Typ_CI2   25
 C do not use; use Typ_AC2.
#define Typ_VC2   26
 D Vector2.
#define Typ_CV2   27
 S all 2D-curves.
#define Typ_CVPOL2   28
 S CurvPoly-2D.
#define Typ_CVPSP2   29
 S polynom_?
#define Typ_CVBSP2   30
 S CurvBSpl-2D.
#define Typ_CVRBSP2   31
 S CurvRBSpl-2D.
#define Typ_CVCCV2   32
#define Typ_CVELL2   33
 S CurvElli-2D.
#define Typ_CVBEZ2   34
 S CurvBez2.
#define Typ_PLN   70
 R plane/Refsys.
#define Typ_SOL   71
 B body (CON, TOR, ..).
#define Typ_SPH   72
 B sphere.
#define Typ_CON   73
 B Conus.
#define Typ_TOR   74
 B Torus.
#define Typ_CYL   75
 B Conus.
#define Typ_EdgeLine   169
#define Typ_Fac3   215
 Triangle; Form = Fac3.
#define Typ_QFac   163
 Triangle;.
#define Typ_Tria   164
 Triangle; Form = Triangle (unused).
#define Typ_SURBSP   158
 A B_Spline_Surf SurBSpl.
#define Typ_SURRBSP   159
 A Rat.B_Spline Surf SurRBSpl.
#define Typ_SURRU   153
 A Ruled Sur.
#define Typ_SURRV   154
 A Revolved Sur.
#define Typ_SURPLN   155
 A Planar surf.
#define Typ_SURPTAB   149
 A surf from PTAB.
#define Typ_SURCON   156
 Conus (unused).
#define Typ_SURTOR   157
 Torus (unused).
#define Typ_SURCIR   151
 tesselated fan
#define Typ_SURSTRIP   152
 tesselated strip
#define Typ_SURTPS   162
 A surface-trimmed-perforated-supported.
#define Typ_SURMSH   160
 A Mesh.
#define Typ_SURHAT   161
 A Hatch.
#define Typ_SUR   150
 A all surfaces.
#define Typ_GL_Sur   210
 tesselated surface
#define Typ_GL_PP   211
 tesselated planar patch
#define Typ_GL_CV   212
 Polygon.
#define Typ_ATXT   40
#define Typ_GTXT   41
 N Note N20=... GroupCode f ATXT Dimen.
#define Typ_Dimen   42
 f. N20=...
#define Typ_Dim3   53
 f. N20=...
#define Typ_Txt   43
 $ ohne ", normal mit , begrenzt f. $20=
#define Typ_String   44
 durch " begrenzt
#define Typ_SymB   45
 bitmap symbols: SYM_TRI_S SYM_STAR_S ..
#define Typ_SymV   46
 Vektorymbole: SYM_PLANE SYM_ARROW ..
#define Typ_StrDel   47
 StringDelimiter "\" Fortsetzungszeile.
#define Typ_StrDel1   48
 StringDelimiter 1 "|".
#define Typ_Tag   49
 Bitmap (Blocknote, Image ..).
#define Typ_Box   50
#define Typ_TmpPT   51
 temporary Point
#define Typ_TmpLN   52
 temporary Line
#define Typ_TmpVC   54
 temporary Vector
#define Typ_TmpSym   55
 temporary Symbol
#define Typ_EyePT   56
#define Typ_TmpTRI   61
 temporary triangle
#define Typ_TmpPLN   62
 temporary Plane
#define Typ_goGeom   80
 alle
#define Typ_goPrim   81
 PT/LN/CI/Spline; nicht Plg,CCV.
#define Typ_lFig   82
 geom. Obj. Linear LN/CI/CV
#define Typ_goGeo1   86
 geom. Obj. LN/CI/CV/PL/Sur/Sol (nicht PT)
#define Typ_goGeo2   87
 geom. Obj. CI/ELL (prj -> PLN)
#define Typ_goGeo3   88
 geom. Obj. PT/LN/CI/CV CW CCW MOD (Contour)
#define Typ_goGeo4   89
 geom. Obj. VC/LN/PLN
#define Typ_goGeo5   83
 geom. Obj. CIR/ELL/CCV (closed cont.)
#define Typ_goGeoSUSU   84
 Supporting Surface (CON/TOR/SRU/SRV/SBS).
#define Typ_goGeo6   85
 geom. Obj. PT/VC/LN
#define Typ_goGeo7   79
 ANG/PT angle (0-360) od angle from point.
#define Typ_goGeo8   78
 Val/PT parameter (0-1) od par. from point.
#define Typ_goAxis   77
 RotAxis LN/PT+PT/PT+LN/PT+VC/PLN.
#define Typ_goRadius   76
 Radius Val/PT/AC.
#define Typ_Ditto   90
#define Typ_Group   91
 U ObjGX.
#define Typ_Layer   92
#define Typ_apDat   93
 application-data
#define Typ_TEXB   94
 Base-Texture.
#define Typ_TEXR   57
 Ref-Texture.
#define Typ_Part   98
#define Typ_SubModel   97
 M - basicModel.
#define Typ_Model   99
 M - ModelReference.
#define Typ_Mock   95
#define Typ_Typ   106
 form of ObjGX-Record defines Typ
#define Typ_Address   107
 form of ObjGX-Record defines dataPosition
#define Typ_Size   96
 recordSize for following record
#define Typ_Index   100
 int or long
#define Typ_Name   101
#define Typ_Color   102
 ColRGB.
#define Typ_Ltyp   103
 line type
#define Typ_Thick   104
 line thickness
#define Typ_G_Att   105
 G.
#define Typ_Tool   108
#define Typ_Activ   109
 I = Interactivity.
#define Typ_Val   110
 double-Value
#define Typ_ValX   124
 X-coord.
#define Typ_ValY   125
 Y-coord.
#define Typ_ValZ   126
 Z-coord.
#define Typ_XVal   111
 X-distance.
#define Typ_YVal   112
 Y-distance.
#define Typ_ZVal   113
 Z-distance.
#define Typ_Angle   114
 Angle (in degree).
#define Typ_Rad   115
 Radius.
#define Typ_Dist   116
 distance
#define Typ_Par1   127
 Parameter 0-1; for knotvals use Typ_Val.
#define Typ_UVal   128
#define Typ_VVal   129
#define Typ_AngN   117
#define Typ_AngP   118
#define Typ_RadISO   119
#define Typ_Conic   120
#define Typ_DirS   123
 X / Y / Z / P.
#define Typ_Int1   135
 8 bit (char)
#define Typ_Int2   136
 16 bit
#define Typ_Int4   137
 32 bit-int
#define Typ_Float4   138
 32 bit-float
#define Typ_Float8   139
 64 bit-float
#define Typ_Polynom1   165
 Polynom1.
#define Typ_Polynom3   166
 Polynom3.
#define Typ_Polynom_   167
#define Typ_polynom_d3   168
#define Typ_M3x2   145
 Mat_3x2.
#define Typ_M3x3   146
 Mat_3x3.
#define Typ_M4x3   147
 Mat_4x3.
#define Typ_M4x4   148
 Mat_4x4.
#define Typ_Memspc   140
 Memspc.
#define Typ_MemTab   144
#define Typ_ObjG2   141
 deprec
#define Typ_ObjG   142
 deprec
#define Typ_ObjGX   143
 ObjGX.
#define Typ_ObjRange   250
 ObjRange.
#define Typ_Tra   130
 all transformations
#define Typ_TraTra   131
 Translation dzt unused; Typ_VC used.
#define Typ_TraRot   132
 Rotation TraRot.
#define Typ_TraMat   133
 Matrixtransformation.
#define Typ_ope_eq   221
 operator =
#define Typ_ope_ne   222
 operator !=
#define Typ_ope_lt   223
 operator <
#define Typ_ope_gt   224
 operator >
#define Typ_ope_ge   225
 operator >=
#define Typ_ope_le   226
 operator <=
#define Typ_cmdNCsub   170
#define Typ_Subtyp   172
#define Typ_modif   175
 Modifier.
#define Typ_modCoord   176
 Modifier; HIX LOX HIY LOY HIZ LOZ.
#define Typ_modCWCCW   177
 Modifier; CW CCW.
#define Typ_modAux   178
 Modifier; Value depends.
#define Typ_modREV   179
 Modifier; Reverse.
#define Typ_modCX   173
 Modifier ACROSS (Default = Along).
#define Typ_modCTRL   174
#define Typ_modHIX   180
#define Typ_modLOX   181
#define Typ_modHIY   182
#define Typ_modLOY   183
#define Typ_modHIZ   184
#define Typ_modLOZ   185
#define Typ_modCCW   186
#define Typ_modCW   187
#define Typ_modIN   188
#define Typ_modOUT   189
#define TYP_FuncInit   190
 function init
#define TYP_FuncInit1   191
 function
#define TYP_FuncMod   192
 function modify
#define TYP_FuncAdd   193
 function add
#define TYP_FuncDel   194
 function delete
#define TYP_FuncEnd   200
 function end
#define TYP_FuncExit   201
 function exit
#define TYP_EvMouseL   230
 event left mousebutton
#define TYP_EvMouseM   231
 event mid mousebutton
#define TYP_EvMouseR   232
 event right mousebutton
#define TYP_EvMouse2L   233
 event doubleclick
#define TYP_FilNam   238
 filename
#define Typ_CtlgPart   239
 catalogpart
#define Typ_ALL   240
#define Typ_Done   241
#define Typ_NULL   241
 nothing, empty
#define BCKPLN_XY   2
 Z-Vec BCKVEC_Z.
#define BCKPLN_XZ   1
 Y-Vec BCKVEC_Y.
#define BCKPLN_YZ   0
 X-Vec BCKVEC_X.
#define BCKVEC_Z   2
 Z-Vec BCKPLN_XY.
#define BCKVEC_Y   1
 Y-Vec BCKPLN_XZ.
#define BCKVEC_X   0
 X-Vec BCKPLN_YZ.
#define GL_TRIANGLE_NPFAN   16
 non planar fan (GL_TRIANGLE_FAN = planar)
#define Mtyp_Gcad   0
#define Mtyp_DXF   1
#define Mtyp_Iges   2
#define Mtyp_Step   3
#define Mtyp_3DS   4
#define Mtyp_LWO   5
#define Mtyp_XML   6
#define Mtyp_WRL   10
 VRML1 10-19 tess-Formate.
#define Mtyp_WRL2   110
 VRML2.
#define Mtyp_OBJ   11
#define Mtyp_STL   12
#define Mtyp_TESS   13
#define Mtyp_BMP   20
 20-29 PixelImages
#define Mtyp_JPG   21
#define TimeStamp   float
#define OBJ_SIZ_MAX   160
 160 = 5 * 32
#define UT_BEZDEG_MAX   50
 maximal degree of Bezier curve
#define ATT_BIT_ABS   1
 das Absolut-Bit; Achtung: 0=ON=absolut, 1=relativ.
#define ATT_BIT_LIM   2
 Limited; 0=On; 2=unbegrenzte Linie/Vollkreis.
#define IABS(i)   (((i)<0)?-(i):(i))
 abs(int); always positive
#define ISIGN(i)   ((i>=0)?(1):(-1))
 sign of int; +1 or -1
#define ICHG01(i)   (((i)>0)?(0):(1))
 change 0 -> 1, 1 -> 0.
#define IMIN(x, y)   (((x)<(y))?(x):(y))
#define IMAX(x, y)   (((x)>(y))?(x):(y))
#define ILIM2(x, lo, hi)   (((x)>(hi))?(hi):(((x)<(lo))?(lo):(x)))
 ILIM2 returns x = between lo and hi.
#define ICHAR(x)   ((x) & 15)
#define UTI_iNr_chrNr(i1)   (((i1) >> 2) + 1)
 UTI_iNr_chrNr give nr of ints for n characters (not including ).
#define DMIN(x, y)   (((x)<(y))?(x):(y))
#define DMAX(x, y)   (((x)>(y))?(x):(y))
#define DLIM2(x, lo, hi)   (((x)>(hi))?(hi):(((x)<(lo))?(lo):(x)))
 DLIM2 returns x = between lo and hi.
#define DSIGN(d)   ((d>=0.)?(1):(-1))
 sign of double; +1 or -1
#define DSIGTOL(d, t)   ((d>t)?(1):((d<-(t))?(-1):(0)))
 d>t=1; d<-t=-1; else 0
#define ACOS(dCos)   ((dCos>=1.)?(0.):((dCos<=-1.)?(RAD_180):acos(dCos)))
#define UT_RADIANS(angle)   ((angle)*(RAD_1))
#define UT_DEGREES(angle)   ((angle)/(RAD_1))
#define UT3D_vc_crossprod2vc   UT3D_vc_perp2vc
#define UT2D_acos_innerprod2vc   UT2D_acos_2vc
#define UTP_comp_0(db)   (fabs(db) < UT_TOL_min1)
 UTP_comp_0 compare double (double == 0.0 + - UT_TOL_min1).
#define UTP_comp2db(d1, d2, tol)   (fabs(d2-d1) < (tol))
 UTP_comp2db compare 2 doubles (with tolerance).
#define UTP_px_paramp0p1px(p0, p1, par)   ((p1) - (p0)) * (par) + (p0);
 UTP_px_paramp0p1px Zahl aus p0, p1 und Parameterwert.
#define BIT_SET(i, b)   (i)|=(b)
 BIT_SET set bits; BITSET(i1,2); set bit 1.
#define BIT_CLR(i, b)   (i)&=~(b)
 BIT_CLR clear bits; BITCLR(i1,3); clear bit 0 and 1.
#define BIT_GET(i, b)   ((i)&(b))
 BIT_GET filter bits if(BITGET(i1,2)) gives 0=clear >0=set.
#define UT2D_irot_r(rd)   (((rd) > 0.) ? CCW : CW)
 Direction from Radius; if(rd > 0.) irc=CCW(1) else irc=CW(-1).
#define UT2D_lenq_vc(vc)   ((vc)->dx*(vc)->dx + (vc)->dy*(vc)->dy)
 UT2D_lenq_vc quadr.length of 2D-vector.
#define UT2D_len_vc(vc)   (sqrt((vc)->dx*(vc)->dx + (vc)->dy*(vc)->dy))
 UT2D_len_vc length of 2D-vector.
#define UT2D_lenq_2pt(lq, p1, p2)
 UT2D_lenq_2pt quadr. distance pt - pt.
#define UT2D_comp2pt(p1, p2, tol)
 UT2D_comp2pt compare 2 points.
#define UT2D_swap2pt(p1, p2)
 UT2D_swap2pt swap 2 2D-points.
#define UT2D_pt_2db(pt2, dx, dy)
 UT2D_pt_2db 2D-Point < 2 doubles (x, y).
#define UT2D_pt_pt3(pt3)   (*(Point2*)pt3)
 UT2D_pt_pt3 2D-Point = 3D-Point.
#define UT2D_pt_pt(pt2, pt3)   (memcpy((pt2), (pt3), sizeof(Point2)))
 UT2D_pt_pt 2D-Point = 3D-Point.
#define UT2D_pt_pt3bp(p2o, p3i, bpi)
 UT2D_pt_pt3bp 2D-Point = 3D-Point on Backplane.
#define UT2D_pt_addpt(po, p1)
 UT2D_pt_addpt Add two points: po += p1.
#define UT2D_pt_opp2pt(po, p1, p2)
 UT2D_pt_opp2pt opposite point (p1 = center).
#define UT2D_pt_mid2pt(po, p1, p2)
 UT2D_pt_mid2pt midpoint between 2 points.
#define UT2D_pt_traptvc(po, pi, vc)
 UT2D_pt_traptvc 2D Point = Point + Vector.
#define UT2D_acos_2vc   UT2D_skp_2vc
 UT2D_skp_2vc cos of opening angle of 2 vecs (dot=scalarprod) DOT.
#define UT2D_skp_2vc(v1, v2)   ((v1)->dx*(v2)->dx + (v1)->dy*(v2)->dy)
#define UT2D_sar_2vc(v1, v2)   ((v1)->dx*(v2)->dy - (v1)->dy*(v2)->dx)
 UT2D_sar_2vc signed area of 2 vectors (scalarprod).
#define UT2D_acos_vc2pt   UT2D_skp_vc2pt
 UT3D_acos_vc2pt cos of opening angle of vec-(pt-pt) (dot=scalarprod) DOT.
#define UT2D_skp_vc2pt(v1, p1, p2)
#define UT2D_crossprod_2vc(vc1, vc2)   (((vc1)->dx * (vc2)->dy) - ((vc2)->dx * (vc1)->dy))
 UT2D_crossprod_2vc crossprod of 2 2D-Vectors.
#define UT2D_vc_2db(vc, dx, dy)
 UT2D_vc_2db 2D-Vector < 2 doubles (x, y).
#define UT2D_vc_invert(vo, vi)
 UT2D_vc_invert 2D-Vector invert (change direction).
#define UT2D_vc_add2vc(v3, v1, v2)
 UT2D_vc_add2vc v3 = v1 + v2 ADD.
#define UT2D_vc_sub2vc(v3, v1, v2)
 UT2D_vc_sub2vc v3 = v1 - v2 SUB.
#define UT2D_vc_multvc(vo, vi, d)
 UT2D_vc_multvc vo = vi * d MULT.
#define UT2D_vc_perpvc(vo, vi)
 UT2D_vc_perpvc vector = perpendic. to vector ( + 90 degrees).
#define UT2D_vc_perp2pt(vo, p1, p2)
 UT2D_vc_perp2pt vector = perpendic. to Line ( + 90 degrees).
#define UT2D_vc_angr(vc, angr)
 UT2D_vc_angr 2DVector = angle (radians).
#define UT2D_vc_vc3bp(v2o, v3i, bpi)
 UT2D_vc_vc3bp 2D-Vector = 3D-Vector on Backplane.
#define UT2D_vc_2pt(vc, p1, p2)
 UT2D_vc_2pt 2D-Vector = 2D-Point -> 2D-Point.
#define UT2D_vc_ln(vc, ln)
 UT2D_vc_ln 2D-Vector from 2D-Line.
#define UT2D_ln_ptpt(ln1, pt1, pt2)
#define UT2D_ln_ptvc(ln, pt, vc)
 UT2D_ln_ptvc 2D-Line from 2D-point and 2D-vector.
#define UT2D_ln_ln3(ln2, ln3)
 UT2D_ln_ln3 2D-Line = 3D-Line.
#define UT2D_len_cia(radius, ango)   (fabs((radius)*(ango)))
 UT2D_len_cia length arc (from rad & angle).
#define UT2D_ln_inv(ln)
 UT2D_ln_inv Invert 2D-Line.
#define UT3D_lenq_vc(vc)   ((vc)->dx*(vc)->dx + (vc)->dy*(vc)->dy + (vc)->dz*(vc)->dz)
 UT3D_lenq_vc quadr.length of 3D-vector.
#define UT3D_len_vc(vc)   (sqrt((vc)->dx*(vc)->dx + (vc)->dy*(vc)->dy + (vc)->dz*(vc)->dz))
 UT3D_len_vc length of 3D-vector.
#define UT3D_skp_2vc(v1, v2)   ((v1)->dx*(v2)->dx + (v1)->dy*(v2)->dy + (v1)->dz*(v2)->dz)
 UT3D_skp_2vc scalarprod of 2 vecs (dotprod,Skalarprod).
#define UT3D_skp_vc2pt(v1, p1, p2)
#define UT3D_acos_2vc   UT3D_skp_2vc
 UT3D_acos_vc2pt cos of opening angle of vec-(pt-pt) (dot=scalarprod) DOT.
#define UT3D_acos_vc2pt   UT3D_skp_vc2pt
#define UT3D_pt_pt(pt3, pt2, zVal)
 UT3D_pt_ptz 3D-Point = 2D-Point + Z-Val.
#define UT3D_pt_multpt(po, pi, d)
 UT3D_pt_multpt po = pi * d.
#define UT3D_pt_LinComb2Pts(po, a1, p1, a2, p2)
 UT3D_pt_LinComb2Pts Linear combination of two points:.
#define UT3D_pt_addpt(po, p1)
 UT3D_pt_addpt Add two points: po += p1.
#define UT3D_pt_add2pt(po, p1, p2)
 UT3D_pt_add2pt Add two points: po = p1 + p2.
#define UT3D_swap2pt(p1, p2)
 UT3D_swap2pt swap 2 3D-points.
#define UT3D_pt_vc(pt, vc)   (memcpy((pt), (vc), sizeof(Point)))
 UT3D_pt_vc Point = Vector.
#define UT3D_pt_traptvc(po, pi, vc)
 UT3D_pt_traptvc Point = Point + Vector.
#define UT3D_pt_traptivc(po, pi, vc)
 UT3D_pt_traptivc Point = Point - Vector.
#define UT3D_pt_evparptcv(pto, par, ptl, vcl)
 UT3D_pt_evparptcv evaluate param.point on line from point+vector.
#define u3d_LinComb2Pts(po, a1, p1, a2, p2)
 u3d_LinComb2Pts Linear combination of two points:
#define UT3D_vc_vc2(v3o, v2i)
 UT3D_vc_vc2 3D-vector = 2D-vector.
#define UT3D_vc_3db(vc, x, y, z)
 UT3D_vc_3db Vector < 3 doubles (x, y, z).
#define UT3D_vc_pt(vc, pt)   (memcpy((vc), (pt), sizeof(Point)))
 UT3D_vc_pt Vector = Point.
#define UT3D_vc_2pt(vc, p1, p2)
 UT3D_vc_2pt Vector = Point -> Point.
#define UT3D_vc_perpTria(vn, tri)   UT3D_vc_perp3pt ((vn),(tri)->pa[0],(tri)->pa[1],(tri)->pa[2])
 UT3D_vc_perpTria vector = perpendic. to Triangle (crossprod).
#define UT3D_vc_invert(vio, vii)
 UT3D_vc_invert invert Vector.
#define UT3D_vc_addvc(vo, vi)
 UT3D_vc_addvc vo += vi.
#define UT3D_vc_add2vc(v3, v1, v2)
 UT3D_vc_add2vc v3 = v1 + v2 ADD.
#define UT3D_vc_addvc2pt(v3, v1, p1, p2)
 UT3D_vc_addvc2pt v3 = v1 + (p2-p1) Vector + (Vector from 2 points).
#define UT3D_vc_add3vc(vo, v1, v2, v3)
 UT3D_vc_add3vc vo = v1 + v2 + v3.
#define UT3D_vc_sub2vc(v3, v1, v2)
 UT3D_vc_sub2vc v3 = v1 - v2 SUB.
#define UT3D_vc_multvc(vo, vi, d)
 UT3D_vc_multvc vo = vi * d MULT.
#define UT3D_vc_merge2vc(vo, v1, v2)
 UT3D_vc_merge2vc merge 2 vectors vo = (v1 + v2) / 2.
#define UT3D_comp2pt(p1, p2, tol)
 UT3D_comp2pt compare 2 points with tolerance.
#define UT3D_ln_inv(ln)   {Point _pt = (ln)->p1; (ln)->p1 = (ln)->p2; (ln)->p2 = _pt;}
 UT3D_ln_inv Invert 3D-Line.
#define UT3D_ln_ptpt(ln1, pt1, pt2)
 UT3D_ln_ptpt Line = Point, Point.
#define UT3D_ln_ptvc(ln, pt, vc)
 UT3D_ln_ptvc Line = Point, Vector.
#define UT3D_ln_ln2(ln3, ln2)
 UT3D_ln_ln2 3D-Line from 2D-Line (Z=0).
#define UT3D_ck_triaOrientI(i0, i1)   (((((i0)==0)&&((i1)==1))||(((i0)==1)&&((i1)==2))||(((i0)==2)&&((i1)==0))) ? CCW : CW)
 UT3D_ck_triaOrientI get orientation from indices.
#define UT3D_ck_triaOrientV(i0, i1)   (((((i0)==1)&&((i1)==2))||(((i0)==2)&&((i1)==4))||(((i0)==4)&&((i1)==1))) ? CCW : CW)
 UT3D_ck_triaOrientV get orientation from indices.
#define UT3D_ind3Tria_2ind(i1, i2)   (IABS((i1)+(i2)-3))
#define UT3D_tria_pta_fac(tri, fac, pTab)
#define OGX_SET_OBJ(ox, oTyp, oForm, oSiz, oDat)
#define OGX_SET_INDEX(dbTyp, dbInd, ox)
 UT3D_ind3Tria_2ind give index of 3.point of triangle (0/1/2).
#define OGX_GET_INDEX(ox)   (long)(ox)->data
 OGX_GET_INDEX get index out of complex-object.
#define MEM_swap_int(i1, i2)
#define MEM_swap_2vp(v1, v2)
#define MEM_swap_2db(d1, d2)

Typedefs

typedef double Mat_3x2 [2][3]
typedef double Mat_3x3 [3][3]
typedef double Mat_4x3 [3][4]
 size 96
typedef double Mat_4x4 [4][4]

Functions

int MEM_swap__ (void *stru1, void *stru2, long strSiz)
int MEM_swap_int (int *i1, int *i2)
int MEM_swap_2db (double *d1, double *d2)
int MEM_ins_rec (void *insPos, long movSiz, void *insDat, long insSiz)
int MEM_chg_rec (void *datStart, long *datSiz, void *insDat, long insSiz, void *delPos, long delSiz)
int MEM_ins_nrec (int *recNr, void *recTab, int ipos, void *insDat, int insRecNr, int sizRec)
int MEM_del_nrec (int *recNr, void *recTab, int ipos, int delRecNr, int sizRec)
int MEM_del_IndRec (int *recNr, void *recTab, int ipos)
int MEM_del_DbRec (int *recNr, void *recTab, int ipos)
int UTP_comp_0 (double)
int UTP_compdb0 (double, double)
 ======================================================================
int UTP_comp2db (double, double, double)
int UTP_comp2x2db (double d11, double d12, double d21, double d22, double tol)
 ================================================================
int UTP_db_ck_in2db (double v, double v1, double v2)
 ======================================================================
int UTP_db_ck_in2dbTol (double v, double v1, double v2, double tol)
 ======================================================================
int UTP_db_cknear_2db (double *db, double *d1, double *d2)
 =======================================================================
int UTP_db_cknear_ndb (double db1, int dbNr, double *dbTab)
 =======================================================================
double UTP_db_rnd1sig (double)
double UTP_db_rnd2sig (double)
int UT1D_ndb_npt_bp (double *da, Point *pa, int pNr, int bp)
double UT_DEGREES (double)
double UT_RADIANS (double)
int UT2D_sidPerp_3pt (Point2 *p1, Point2 *p2, Point2 *p3)
int UT2D_angr_set (double *angr)
int UT2D_2angr_set (double *ang1, double *ang2, int irot)
double UT2D_angr_2angr (double ang1, double ang2, int irot)
int UT2D_ptNr_ci (double rdc, double ao, double tol)
int UT2D_solvtriri_a (double *a, double b, double c)
int UT2D_solvtriri_ac (double *, double *, double, double)
int UT2D_solvtri_abc (double *, double *, double, double, double)
int UT2D_ckBoxinBox1 (Point2 *p1, Point2 *p2, Point2 *p3, Point2 *p4)
int UT2D_ckBoxinBox2 (Point2 *, Point2 *, Point2 *, Point2 *, double)
double UT2D_skp_2vc (Vector2 *, Vector2 *)
double UT2D_skp_vc2pt (Vector2 *, Point2 *, Point2 *)
double UT2D_acos_2vc (Vector2 *, Vector2 *)
double UT2D_sar_2vc (Vector2 *, Vector2 *)
double UT2D_acos_vc2pt (Vector2 *, Point2 *, Point2 *)
double UT2D_crossprod_2vc (Vector2 *, Vector2 *)
double UT2D_angd_angr (double)
double UT2D_angd_invert (double *andi)
double UT2D_angr_angd (double)
double UT2D_angr_triri_ab (double, double)
double UT2D_angr_ptpt (Point2 *, Point2 *)
double UT2D_angr_vc (Vector2 *)
double UT2D_angr_2ln (Line2 *, Line2 *)
double UT3D_angr_vc2pt (Point *pz, Vector *vz, Point *p1, Point *p2)
double UT3D_angr_vcpl (Plane *pl1, Vector *vc1)
double UT3D_angr_2pl (Plane *pl1, Plane *pl2)
double UT2D_angr_2vc (Vector2 *, Vector2 *)
double UT2D_angr_3ptdr (Point2 *, Point2 *, Point2 *, int)
double UT3D_angr_4pt (Point *p11, Point *p12, Point *p21, Point *p22)
double UT2D_angr_ci (Point2 *pa, Point2 *pe, Point2 *pc, double rad_in)
double UT3D_angr_cipt (Circ *ci1, Point *pti)
double UT2D_angr_perpangr (double *)
double UT2D_len_vc (Vector2 *)
double UT2D_lenq_vc (Vector2 *)
void UT2D_lenq_2pt (double *lq, Point2 *p1, Point2 *p2)
double UT2D_len_2pt (Point2 *, Point2 *)
double UT2D_lenB_2pt (Point2 *p1, Point2 *p2)
int UT2D_minLenB_4pt (double *dp, Point2 *, Point2 *, Point2 *, Point2 *)
int UT3D_minLen_3pt (double *, Point *, Point *, Point *)
int UT3D_minLen_4pt (double *, Point *, Point *, Point *, Point *)
double UT2D_len_ptln (Point2 *pt, Point2 *pa, Point2 *pe)
int UT2D_3len_ptln (double *, double *, double *, Point2 *, Point2 *, Point2 *)
int UT2D_slenq_ptptvc (double *qlen, Point2 *pa, Point2 *pb, Point2 *pc)
double UT2D_slen_nor3pt (Point2 *p1, Point2 *p2, Point2 *p3)
double UT2D_slen_norvc2pt (Vector2 *v1, Point2 *p1, Point2 *p2)
double UT2D_len_ptlnX (Point2 *pt, Point2 *pl, Vector2 *vl)
double UT2D_len_ptlnY (Point2 *pt, Point2 *pl, Vector2 *vl)
void UT2D_2len_ptvc (double *, double *, Point2 *, Point2 *, Vector2 *)
int UT2D_irot_r (double r)
int UT2D_sid_2vc (Vector *v1, Vector *v2)
int UT2D_sidPerp_2vc (Vector *v1, Vector *v2)
int UT2D_sid_3pt (Point2 *pt, Point2 *p1, Point2 *p2)
int UT2D_sid_ptvc (Point2 *, Point2 *, Vector2 *)
int UT2D_sidPerp_ptvc (Point2 *pt, Point2 *pl, Vector2 *vl)
int UT3D_sid_2vc (Vector *v1, Vector *v2)
int UT3D_sid_3pt (Point *p1, Point *p2, Point *p3)
int UT3D_sid_ptpl (Point *pt, Plane *pl)
int UT3D_sid_ptptvc (Point *ptx, Point *pto, Vector *vz)
int UT2D_parLn_pt2pt (double *d1, Point2 *p1, Point2 *p2, Point2 *px)
double UT2D_ar_3pt (Point2 *p1, Point2 *p2, Point2 *p3)
int UT2D_comp2pt (Point2 *, Point2 *, double)
int UT2D_comp4pt (Point2 *, Point2 *, Point2 *, Point2 *, double)
int UT2D_pt_ck_int4pt (Point2 *, Point2 *, Point2 *, Point2 *)
int UT2D_pt_ck_onLine (Point2 *po, Point2 *p1, Point2 *p2, Point2 *p3)
int UT2D_pt_ck_inLine (Point2 *p1, Point2 *p2, Point2 *p3, double tol)
int UT2D_pt_ck_inplg (Point2 *pTab, int pNr, Point2 *ptx)
int UT2D_pt_ck_linear (int np, Point2 *ptab, double tol)
int UT2D_pt_ck_inBox (Point2 *p1, Point2 *p2, Point2 *p)
int UT2D_pt_ck_inBoxTol (Point2 *p1, Point2 *p2, Point2 *p, double tol)
int UT2D_pt_ck_inAc (Point2 *pt, Circ2 *ci)
int UT2D_pt_ck_inTriangle (Point2 *p1, Point2 *p2, Point2 *p3, Point2 *p)
int UT2D_pt_ck_inCv3 (Point *ptx, int pNr, Point *pTab)
int UT2D_pt_cknear_npt (Point2 *p0, Point2 *ptTab, int ptNr)
void UT2D_swap2pt (Point2 *p1, Point2 *p2)
Point2 UT2D_pt_pt3 (Point *)
void UT2D_pt_2db (Point2 *, double, double)
int UT3D_pt_pt2bp (Point *p3, Point2 *p2, int bp)
void UT2D_pt_addpt (Point2 *, Point2 *)
void UT2D_pt_opp2pt (Point2 *, Point2 *, Point2 *)
void UT2D_pt_mid2pt (Point2 *, Point2 *, Point2 *)
void UT2D_pt_tra2ptlen (Point2 *, Point2 *, Point2 *, double)
void UT2D_pt_traPtPtPar (Point2 *po, Point2 *p1, Point2 *p2, double d1)
void UT2D_pt_tra3ptlen (Point2 *, Point2 *, Point2 *, Point2 *, double)
void UT2D_pt_tra2pt2len (Point2 *, Point2 *, Point2 *, double, double)
void UT2D_pt_tra2pt3len (Point2 *, Point2 *, Point2 *, double, double, double)
void UT2D_pt_traptvclen (Point2 *, Point2 *, Vector2 *, double)
void UT2D_pt_traptangrlen (Point2 *, Point2 *, double, double)
void UT2D_pt_tranor2ptlen (Point2 *, Point2 *, Point2 *, double)
void UT2D_pt_tranorptvclen (Point2 *, Point2 *, Vector2 *, double)
void UT2D_pt_traptvc2len (Point2 *, Point2 *, Vector2 *, double, double)
void UT2D_pt_tracirlen (Point2 *, Point2 *, Point2 *, double, double)
void UT2D_pt_rotptangr (Point2 *, Point2 *, Point2 *, double)
int UT2D_pt_projptptvc (Point2 *, Point2 *, Point2 *, Vector2 *)
int UT2D_pt_projpt2pt (Point2 *pp, double *len, Point2 *pt, Point2 *p1, Point2 *p2)
int UT2D_pt_projptln (Point2 *, Point2 *, Line2 *)
void UT2D_2pt_projptci (Point2 *, Point2 *, Point2 *, Point2 *, double)
int UT2D_pt_projptci (Point2 *pp, Point2 *pt, Circ2 *ci1)
int UT3D_ptDi_intptvcptvc (Point *ip, double *dist, Point *ptl, Vector *vcl, Point *ptp, Vector *vcp)
int UT3D_ptDi_intptvcpln (Point *ip, double *dist, Plane *pl, Point *pt, Vector *vln)
int UT2D_pt_int4pt (Point2 *, double *, double *, Point2 *, Point2 *, Point2 *, Point2 *)
int UT2D_pt_int2ln (Point2 *, Line2 *, Line2 *)
int UT2D_pt_intptvcy (Point2 *pto, Point2 *ptl, Vector2 *vcl, double yVal)
int UT2D_pt_intlny (Point2 *pto, Point2 *lp1, Point2 *lp2, double yVal)
int UT2D_pt_int2pt2vc (Point2 *ip, Point2 *pt1, Vector2 *vc1, Point2 *pt2, Vector2 *vc2)
int UT2D_pt_int2vc2pt (Point2 *, Point2 *, Vector2 *, Point2 *, Vector2 *)
int UT2D_2pt_intciptvc (Point2 *, Point2 *, Point2 *, double, Point2 *, Vector2 *)
int UT2D_2pt_intlnci (Point2 *ip1, Point2 *ip2, Line2 *ln, int lnMode, Circ2 *ci, int ciMode)
int UT2D_2pt_intcici (Point2 *, Point2 *, Point2 *, double, Point2 *, double)
int UT2D_2pt_int2ci (Point2 *ip1, Point2 *ip2, Circ2 *ci1, int ci1Mode, Circ2 *ci2, int ci2Mode)
void UT2D_pt_traptm2 (Point2 *, Mat_3x2, Point2 *)
Point2 UT2D_pt_obj2 (ObjG2 *obj1)
void UT2D_ln_ptpt (Line2 *, Point2 *, Point2 *)
void UT2D_ln_ptvc (Line2 *, Point2 *, Vector2 *)
void UT2D_ln_ln3 (Line2 *ln2, Line *ln3)
void UT2D_ln_inv (Line2 *ln1)
void UT2D_ln_4db (Line2 *ln2, double xs, double ys, double xe, double ye)
Line2 UT2D_ln_obj2 (ObjG2 *)
int UT2D_lncoe_ln (double *k, double *d, Line2 *ln)
int UT2D_ln_pts_dmax (Line2 *ln, int np, Point2 *ptab, double tol)
int UT2D_comp2vc (Vector2 *, Vector2 *, double)
int UT2D_comp2vc_p (Vector2 *, Vector2 *, double)
int UT2D_ckvc_in2vc (Vector *v1, Vector *v2, Vector *v3)
int UT2D_2parvc_3vc (double *, double *, Vector2 *, Vector2 *, Vector2 *)
void UT2D_vc_2db (Vector2 *, double, double)
void UT2D_vc_angr (Vector2 *, double)
void UT2D_vc_angrlen (Vector2 *, double, double)
void UT2D_vc_2pt (Vector2 *, Point2 *, Point2 *)
void UT2D_vc_2pt3 (Vector2 *vc, Point *p1, Point *p2)
int UT2D_vc_2pt3_bp (Vector2 *vo, Point *p1, Point *p2, int bp)
void UT2D_vc_2ptlen (Vector2 *, Point2 *, Point2 *, double)
void UT2D_vc_ln (Vector2 *, Line2 *)
void UT2D_vc_invert (Vector2 *, Vector2 *)
int UT3D_vc_Zup (Vector *v2, Vector *v1)
void UT2D_vc_perpvc (Vector2 *, Vector2 *)
void UT2D_vc_perp2pt (Vector2 *, Point2 *, Point2 *)
void UT2D_vc_normalize (Vector2 *, Vector2 *)
void UT2D_vc_setLength (Vector2 *, Vector2 *, double)
void UT2D_vc_mid2vc (Vector2 *, Vector2 *, Vector2 *)
void UT2D_vc_merge2vc (Vector2 *vm, Vector2 *v1, Vector2 *v2)
void UT2D_vc_rotangr (Vector2 *, Vector2 *, double)
void UT2D_vc_travcm2 (Vector2 *vo, Mat_3x2 mata, Vector2 *vi)
double UT2D_angr_ciSec (double hc, double radc)
double UT2D_len_ciSec (double hSec, double rCi)
double UT2D_len_cia (double rad, double ango)
double UT2D_len_cir (double *angOpe, Point2 *pa, Point2 *pe, Point2 *pc, double rad_in)
int UT2D_compPtOnAc (double, double, double, int)
Circ2 UT2D_ci_obj2 (ObjG2 *)
int UT2D_ci_ptrd (Circ2 *ci, Point2 *ptc, double rdc)
int UT2D_ci_ci3 (Circ2 *ci2, Circ *ci3)
int UT2D_ci_2vc2ptrd (Point2 *, Point2 *, Vector2 *, Point2 *, Vector2 *, double)
int UT2D_ci_ciptvcrd (Point2 *, Point2 *, double, int, Point2 *, Vector2 *, double)
int UT2D_ci_ptvcpt (Point2 *, double *, Point2 *, Vector2 *, Point2 *)
int UT2D_obj_obj3 (ObjGX *oo, ObjGX *oi, Memspc *memSeg)
ObjG2 UT2D_obj_pt3 (Point *)
ObjG2 UT2D_obj_ln3 (Line *)
ObjG2 UT2D_obj_ci2 (Circ2 *)
ObjG2 UT2D_obj_ci3 (Circ *)
ObjG2 UT2D_obj_cv3 (Curv *)
int UT2D_void_obj2 (void *memObj, unsigned long *oSiz, ObjG2 *og2)
void UT2D_cv_ci360 (Point2 *cv, int ptNr, double rd, Point2 *ptCen)
int UT2D_cv_ln (Point2 *cv, int ptAnz, Point2 *p1, Point2 *p2)
int UT2D_npt_ci (Point2 *pa, int pNr, Circ2 *ci1)
int UT2D_cv_ci (Point2[], int *, Point2 *, Point2 *, Point2 *, int)
int UT2D_cv3_linear (int *pNr, Point *pTab, double tol)
int UT2D_srar_polc (double *aro, int ptNr, Point2 *pa)
void UT2D_m2_load (Mat_3x2, Vector2 *, Point2 *)
void UT2D_m2_loadtravcm2 (Mat_3x2 ma, Vector2 *vx, Vector2 *vy, Vector2 *vt)
int UT2D_m2_invtravcm2 (Mat_3x2 im1, Mat_3x2 m1)
void UT2D_m2_init_rot (Mat_3x2 ma, double angle)
int UT3D_stru_dump (int typ, void *data, char *txt,...)
double UT3D_len_vc (Vector *)
double UT3D_lenq_vc (Vector *)
int UT3D_bplen_vc (double *lnv, Vector *vc1)
double UT3D_lenB_2pt (Point *p1, Point *p2)
double UT3D_len_2pt (Point *, Point *)
double UT3D_lenq_PtPt (Point *p1, Point *p2)
int UT3D_lenq_PtLn (double *lenq, Point *p, Point *p1, Point *p2)
double UT3D_len_ln (Line *)
double UT3D_len_ci (Circ *ci1)
double UT3D_slen_3pt (Point *pt, Point *p1, Point *p2)
double UT3D_slen_projvcvc (Vector *vc1, Vector *vc2)
double UT3D_slenq_projvcvc (Vector *vc1, Vector *vc2)
double UT3D_slenq_2ptvc (Point *p1, Point *p2, Vector *vc)
double UT3D_nlen_projvcvc (Vector *vc1, Vector *vc2)
double UT3D_slen_2ptvc (Point *p1, Point *p2, Vector *vc)
double UT3D_slen_ptpl (Point *pt, Plane *pl)
double UT3D_nlen_2ptvc (Point *p1, Point *pv, Vector *vc)
double UT3D_nlen_3pt (Point *p1, Point *p2, Point *p3)
int UT3D_parpt_objpt (double *po, Point *pti, int oTyp, void *oDat)
int UT3D_parpt_3pt (double *pl, Point *ptx, Point *pl1, Point *pl2)
int UT3D_parpt_ptvc (double *pl, Point *ptx, Point *pt1, Vector *vc1)
double UT3D_parpt_lnbp (Point *pti, Line *ln1, int bp)
double UT3D_parpt_cipt (Point *pti, Circ *ci1)
int UT3D_pt_ck_npt (Point *p0, Point *pTab, int pNr, double tol)
int UT3D_ipt_cknear_npt (Point *p0, Point *ptTab, int ptNr)
int UT3D_ipt_ckfar_npt (Point *p0, Point *ptTab, int ptNr)
int UT3D_ipt_cknearn_npt (Point *p0, Point *ptTab, int ptNr, int distNr)
int UT3D_ipt2_nptvc (Point *pt1, Point *pt2, int mode, Point *pta, int iNr, Vector *vc)
int UT3D_pt_ck_onel (Point *pt, CurvElli *el)
int UT3D_pt_ck_ptvc (Point *pt, Point *pl, Vector *vl, double tol)
int UT3D_pt_ck_2pt (Point *pt, Point *pl1, Point *pl2, double tol)
int UT3D_pt_ck_onLine (Point *p1, Point *p2, Point *p3, double tol)
int UT3D_pt_ck_inLine (Point *p1, Point *p2, Point *p3, double tol)
int UT3D_pt_ck_on_pta (Point *pTab, int ptNr, Point *pt1, double tol)
int UT3D_pt_ck_in2pt (Point *p1, Point *p2, Point *p3, double tol)
int UT3D_pt_ck_inCirc (Circ *ci1, Point *pt1, double tol)
int UT3D_pt_ck_inSph (Point *pt, Point *ps, double rs)
void UT3D_swap2pt (Point *p1, Point *p2)
int UT3D_comp4pt (Point *p1a, Point *p1e, Point *p2a, Point *p2e, double tol)
int UT3D_compptpl (Point *, Plane *)
Point UT3D_pt_pt2 (Point2 *)
Point UT3D_pt_pt2z (Point2 *pt20, double zVal)
void UT3D_pt_3db (Point *, double, double, double)
void UT3D_pt_txt (Point *, char *)
void UT3D_pt_mid2pt (Point *, Point *, Point *)
int UT3D_pt_mid_pta (Point *pto, Point *pTab, int ptNr)
void UT3D_pt_midci (Point *, Circ *)
void UT3D_pt_opp2pt (Point *, Point *, Point *)
int UT3D_pt_oppptptvc (Point *po, Point *pi, Point *pl, Vector *vl)
int UT3D_2pt_oppptvclen (Point *, Point *, Point *, Vector *, double)
void UT3D_pt_addpt (Point *, Point *)
void UT3D_pt_add2pt (Point *, Point *, Point *)
void UT3D_pt_traptvclen (Point *po, Point *pi, Vector *vc, double dist)
void UT3D_pt_traptvc1len (Point *po, Point *pi, Vector *vc, double dist)
void UT3D_pt_trapt2vc (Point *po, Point *pi, Vector *vc1, Vector *vc2)
void UT3D_pt_trapt2vc2len (Point *, Point *, Vector *, double, Vector *, double)
void UT3D_pt_trapt3vc3len (Point *po, Point *pi, Vector *vx, double dx, Vector *vy, double dy, Vector *vz, double dz)
void UT3D_pt_traptptlen (Point *po, Point *pi, Point *pDir, double lenv)
void UT3D_pt_trapt2pt (Point *po, Point *pi, Point *p1, Point *p2)
int UT3D_pt_tracirlen (Point *pto, Point *pti, Circ *cii, double clen)
int UT3D_pt_rotptptangr (Point *pto, Point *ptc, Point *pti, double *ar)
void UT3D_pt_rotptptvcangr (Point *pto, Point *pti, Point *ptc, Vector *vz, double angr)
int UT3D_pt_rotptm3 (Point *p2, Point *p1, Mat_4x3 ma)
int UT3D_pt_rotciangr (Point *pto, double angr, Circ *ci1)
int UT3D_pt_projpt2pt (Point *pp, double *len, Point *pt, Point *p1, Point *p2)
int UT3D_pt_projptln (Point *, double *, Point *, Line *)
int UT3D_pt_projptci (Point *pto, Point *pt1, Circ *ci1)
int UT3D_pt_projptptvc (Point *pp, double *len, Point *pt, Point *pl, Vector *vl)
int UT3D_pt_projptel (int *numpe, Point *pe, CurvElli *ell, Point *pt)
int UT3D_pt_projptbspl (int *nxp, Point *ptab, double *ttab, Memspc *memSeg1, CurvBSpl *bspl, Point *pt)
int UT3D_pt_projptptnvc (Point *po, Point *pi, Point *plo, Vector *plz)
void UT3D_pt_projptpl (Point *, Plane *, Point *)
int UT3D_pt_int2pt2vc (Point *ip1, Point *ip2, double *dist, Point *ptu, Vector *vcu, Point *ptv, Vector *vcv)
int UT3D_pt_intptvcplx (Point *px, Point *pl, Vector *vl, double plx)
int UT3D_pt_intptvcply (Point *px, Point *pl, Vector *vl, double ply)
int UT3D_pt_intptvcplz (Point *px, Point *pl, Vector *vl, double plz)
int UT3D_pt_intptvcln (Point *ip1, Point *ip2, double *dist, Point *pt1, Vector *vc1, Line *ln2)
int UT3D_pt_intptvcxpln (Point *pti, Point *ptl, Point *ptpl, Vector *vcpl)
int UT3D_pt_intptvcypln (Point *pti, Point *ptl, Point *ptpl, Vector *vcpl)
int UT3D_pt_intptvczpln (Point *pti, Point *ptl, Point *ptpl, Vector *vcpl)
int UT3D_pt_intptvcsph (Point *pa, Point *pl, Vector *vl, Point *ps, double rs)
int UT3D_pt_int2ln (Point *, Point *, double *, Line *, Line *)
int UT3D_pt_intperp2ln (Point *po, Point *p1, Vector *v1, Point *p2, Vector *v2)
int UT3D_pt_intlnci__ (int *np, Point xp[], Line *ln, Circ *ci1)
int UT3D_pt_intlnci_p (int *np, Point xp[], Line *ln, Circ *ci1)
int UT3D_pt_intlnsph (Line *ln1, Point *ps, double rs)
int UT3D_pt_intcici (int *np, Point xp[], Circ *ci1, Circ *ci2)
int UT3D_pt_intplnln (Point *ip, double *dist, Plane *pl, Line *ln)
int UT3D_pt_intlnpl (Point *, Plane *, Line *)
int UT3D_pt_intlnpl1 (Point *, double *, Point *, Point *, double, double)
int UT3D_pt_intptvcpln (Point *pti, Point *ptl, Vector *vcl, Point *ptpl, Vector *vcpl)
int UT3D_pt_intplci (int *np, Point xp[], Plane *pl, Circ *ci)
int UT3D_pt_intcidpln (int *np, Point xp[], Point *pc, Point *p1, Vector *vz, double dx)
int UT3D_pt_intptvcpl_ (Point *, Plane *, Point *, Vector *)
int UT3D_pt_intlnel__ (int *np, Point xp[], Line *ln, CurvElli *el)
int UT3D_pt_intlnel_p (int *np, Point xp[], Line *ln, CurvElli *el)
int UT3D_pt_ipl_2ptpt2 (Point *pi3, Point *p1, Point *p2, Point2 *pi2)
int UT3D_pt_mirptpl (Point *pto, Point *pti, Plane *pln)
int UT3D_pt_tangptci (Point *po1, Point *po2, Point *pt1, Circ *ci1)
int UT3D_pt_elfoc (Point *fp1, Point *fp2, CurvElli *el)
int UT3D_pt_evparln (Point *pto, double lpar, Line *ln1)
int UT3D_pt_evparci (Point *pto, double lpar, Circ *ci1)
int UT3D_pt_m3 (Point *pto, Mat_4x3 ma)
void UT2D_pt_traptm3 (Point2 *p2, Mat_4x3 mata, Point2 *p1)
void UT3D_pt_traptm3 (Point *, Mat_4x3, Point *)
void UT3D_pt_traptm4 (Point *p2, Mat_4x4 ma, Point *p1)
int UT2D_ptvc_ck_int2pt (int mode, Point2 *p1s, Vector2 *v1, Point2 *p2s, Point2 *p2e)
int UT3D_ptvc_int2pl (Point *pt, Vector *vc, Plane *pl1, Plane *pl2)
int UT3D_ptvc_int2pln (Point *pti, Vector *vci, Point *pl1pt, Vector *pl1vz, Point *pl2pt, Vector *pl2vz)
int UT3D_ptvc_ox (Point *pta, Vector *vca, ObjGX *oxi)
double UT3D_angr_3pt (Point *p1, Point *pc, Point *p2)
double UT3D_angr_2vc (Vector *, Vector *)
double UT3D_angr_3vc (Vector *vz, Vector *v1, Vector *v2)
double UT3D_angr_ci (Circ *ci1)
int UT3D_2angr_vc (double *az, double *ay, Vector *vc1)
int UT3D_atan_vcpl (double *kvc, Vector *vci, Plane *pli)
int UT3D_compvc0 (Vector *v1, double tol)
int UT3D_comp2vc_d (Vector *, Vector *, double)
int UT3D_comp2vc_p (Vector *, Vector *, double)
int UT3D_vc_ck_parpl (Vector *vci, Plane *pli, double tol)
int UT3D_vc_ckperp_2vc1 (Vector *vc1, Vector *vc2, double tol)
int UT3D_parvc_2vcbp (double *dl, int mainPln, Vector *v1, Vector *v2)
int UT3D_2parvc_3vcbp (double *, double *, int, Vector *, Vector *, Vector *)
void UT3D_vc_txt (Vector *vc, char *txt)
void UT3D_vc_2ptlen (Vector *, Point *, Point *, double)
void UT3D_vc_angr (Vector *vc, double angr)
void UT3D_vc_2angr (Vector *, double, double)
void UT3D_vc_2vc (Vector *, Vector *, Vector *)
void UT3D_vc_ln (Vector *, Line *)
int UT3D_vc_bp (Vector *vn, int bp)
void UT3D_vc_invert (Vector *, Vector *)
void UT3D_vc_perp1vc (Vector *vp, Vector *vi)
void UT3D_vc_perp2vc (Vector *, Vector *, Vector *)
int UT3D_vc_perpvc2pt (Vector *vp, Vector *vx, Point *pc, Point *py)
int UT3D_vc_perp3pt (Vector *vp, Point *ptc, Point *ptx, Point *pty)
int UT3D_vc_perp4pt (Vector *vp, Point *p1, Point *p2, Point *p3, Point *p4)
void UT3D_vc_perpTria (Vector *vn, Triangle *tri)
void UT3D_vc_perpvcplXY (Vector *, Vector *)
int UT3D_vc_perppta (Vector *vcn, int pNr, Point *pa)
void UT3D_vc_normalize (Vector *, Vector *)
void UT3D_vc_setLength (Vector *, Vector *, double)
int UT3D_vc_setLenLen (Vector *vco, Vector *vci, double newLen, double actLen)
void UT3D_vc_tangci (Vector *vs, Circ *ci1, double u)
int UT3D_vc_tangcipt (Vector *vt, Point *p1, Circ *ci)
int UT3D_vc_rotangr (Vector *vco, Vector *vci, double *ar)
void UT3D_vc_rot3angr (Vector *, Vector *, double, double, double)
int UT3D_vc_rotvcvcangr (Vector *vo, Vector *va, Vector *vi, double angr)
int UT3D_vc_projvcvc (Vector *v3, Vector *v1, Vector *v2)
int UT3D_vc_projvc2vc (Vector *vo, Vector *vi, Vector *v1, Vector *v2)
int UT3D_vc_projvcnvc (Vector *vo, Vector *vi, Vector *vz)
void UT3D_vc_projvcpl (Vector *, Plane *, Vector *)
int UT3D_vc_mirvcpl (Vector *vco, Vector *vci, Plane *pln)
void UT3D_vc_travcm3 (Vector *b, Mat_4x3 ma, Vector *a)
void UT3D_vc_travcm4 (Vector *b, Mat_4x4 ma, Vector *a)
int UT3D_comp2ln (Line *pa1, Line *pa2, double tol)
int UT3D_ln_ck_on_ln (Point *, Point *, Point *, Point *, Point *, Point *, double tol)
int UT3D_ln_ck_parpl (double *dist, Line *ln, Plane *pl, double tol)
void UT3D_ln_6db (Line *, double, double, double, double, double, double)
void UT3D_ln_2pt2 (Line *ln1, Point2 *pta, Point2 *pte)
int UT3D_ln_int2pl (Line *ln, Plane *pl1, Plane *pl2)
int UT3D_ln_tangcici (Line *ln1, Circ *ci1, Circ *ci2, int sNr)
int UT3D_ln_parl2ln (Point *, Point *, Point *, Point *, Point *, Point *)
int UT3D_ln_pts_dmax (Line *ln, int np, Point *ptab, double tol)
int UT3D_ln_setLen (Line *lno, Point *pc, double lnlg, Line *lni)
void UT3D_ln_inv (Line *ln1)
void UT3D_ln_ln2 (Line *, Line2 *)
int UT3D_rdc_3pt (double *rdc, Point *pp1, Point *pp2, Point *pp3)
int UT3D_ck_ci180 (Circ *ci1)
int UT3D_ck_ci360 (Circ *ci1)
int UT3D_ci_cip1 (Circ *ci1, Point *p1)
int UT3D_ci_ptvcr (Circ *ci1, Point *pc, Vector *vz, double rc)
int UT3D_ci_pt2vcr (Circ *ci1, Point *pc, Vector *vz, Vector *vx, double rc)
int UT3D_ci_cip2 (Circ *ci1, Point *p2)
int UT3D_ci_cip3 (Circ *ci1, Point *p1, Point *p2)
int UT3D_ci_ciangr (Circ *ci, double ao2)
void UT3D_ci_setangr (Circ *ci1)
int UT3D_ci_ptptvcangr (Circ *ci, Point *pc, Point *p1, Vector *vz, double ao)
int UT3D_ci_ptptvcrd (Circ *ci, Point *p1, Point *p2, double rd, Vector *vz, int siz)
int UT3D_ci_cipt180 (Circ *ci1, Point *p1)
int UT3D_ci_cipt360 (Circ *ci1, Point *p1)
int UT3D_ci_pcvzpt180 (Circ *ci1, Point *pc, Vector *vz, Point *p1, int dreh)
int UT3D_ptNr_ci (Circ *ci1, double tol)
int UT3D_ci_inv1 (Circ *ci1)
int UT3D_ci_inv2 (Circ *ci1)
int UT3D_ci_inv3 (Circ *ci1)
Circ UT3D_ci_ci2 (Circ2 *)
Circ UT3D_ci_obj2 (ObjG2 *)
Circ UT3D_ci_obj (ObjG *ci_in)
int UT3D_ci_ptvcrd (Circ *ci, Point *ps, Vector *vs, double rd, Vector *vz, double a1)
int UT3D_ci_2ptvcrd (Circ *cia, Point *pp1, Point *pp2, Vector *vz, double rdc)
int UT3D_ci_3pt (Circ *cpo, Point *pp1, Point *pp2, Point *pp3)
int UT3D_civz_ci (Circ *ci1)
int UT3D_ci_ptptrd (Circ ca[], Point *pt1, Point *pt2, double radi)
int UT3D_ci_lnptrd (Circ ca[], Line *ln1, Point *pt1, Vector *vz, double rdc)
int UT3D_ci_ciptrd (Circ ca[], Circ *ci1, Point *pt1, double rdc)
int UT3D_ci_2lnrd (Circ ca[], Line *ln1, Line *ln2, double rdc, int)
int UT3D_ci_cicird (Circ ca[], Circ *ci1, Circ *ci2, double rdc, int)
int UT3D_ci_lncird (Circ ca[], Line *ln1, Circ *ci1, double rdc, int)
int UT3D_ci_intplsph (Circ *cio, Plane *pli, Sphere *spi)
int UT3D_ci_ptrd2vc2angr (Circ *ci, Point *pc, double rd, Vector *vz, Vector *vx, double a1, double a2)
int UT3D_ci_ptvcpt2angr (Circ *ci, Point *pc, Point *p1, Vector *vz, double a1, double a2)
int UT3D_ck_el360 (CurvElli *el1)
int UT3D_el_elpt180 (CurvElli *el1, Point *p1)
double UT3D_angr_elpt (Point *pti, Point *ptc, Vector *va, Vector *vb)
int UT2D_pt_elangd (Point2 *pto, double lx, double ly, double angr)
int UT3D_pt_elangd (Point *pto, Point *ptc, Vector *va, Vector *vb, double angr)
int UT3D_el_pt2vc2a (CurvElli *el, Point *ptc, Vector *vcx, Vector *vcy, double a1, double a2, int idir)
int UT3D_el_projcipl (CurvElli *el, Plane *pl, Circ *ci)
int UT3D_el_projelpl (CurvElli *elo, Plane *pl, CurvElli *eli)
int UT3D_el_elcoe (CurvElli *, polcoeff_d5 *, Point2 *pa, Point2 *pe, double zt)
int UT3D_elcoe_el (polcoeff_d5 *, CurvElli *)
int UT3D_pta_ck_planar (int pNr, Point *pTab, Point *pPln, Vector *vc)
int UT3D_rMin_pta (double *rMin, int pNr, Point *pTab)
int UT3D_sr_polc (int ptNr, Point *pa, Vector *vcn, int plMain)
int UT3D_pta_dbo (Point **pTab, int *pNr, int typ, long ind, double tol)
Curv UT3D_cv_obj2 (ObjG2 *)
void UT3D_cv_ln (Point *cv, int *ptAnz, Point *p1, Point *p2)
int UT3D_npt_ci (Point *pa, int pNr, Circ *ci1)
void UT3D_cv_ci (Point cv[], int *ptanz, Circ *ci1, int ptmax, double tol)
int UT3D_cv_ell (Point cv[], int *numpt, CurvElli *el, int ptmax, double stol)
int UT3D_cv_delia (int *pNr, Point *pTab, char *ptStat)
int UT3D_cv3_linear (int *pNr, Point *pTab, double tol)
int UT3D_obj_dump (ObjG *el)
ObjG UT3D_obj_ln (Line *)
ObjG UT3D_obj_ci (Circ *)
int UT3D_bp_2pt (Point *pt1, Point *pt2)
int UT3D_bp_vc_ (Vector *)
int UT3D_bp_vcz (Vector *)
void UT3D_pl_XYZ (Plane *pl1)
int UT3D_pl_bpdb (Plane *plo, int bp, double dbc)
int UT3D_pl_3pt (Plane *, Point *, Point *, Point *)
void UT3D_pl_ptvcvc (Plane *pl1, Point *po, Vector *vx, Vector *vz)
void UT3D_pl_pt2vc (Plane *, Point *, Vector *, Vector *)
int UT3D_pl_ptvc (Plane *, Point *, Vector *)
void UT3D_pl_ptvcpt (Plane *pl1, Point *po, Vector *vz, Point *ptx)
int UT3D_pl_ln (Plane *pln, Line *lna)
void UT3D_pl_2ln (Plane *pl1, Line *ln1, Line *ln2)
int UT3D_pl_ci (Plane *pl1, Circ *ci1)
int UT3D_pl_nobj (Plane *pl1, int oNr, ObjGX *oTab)
void UT3D_pl_invert (Plane *pl)
int UT3D_pl_rotpt (Plane *plo, Plane *pli, Point *ptx)
void UT3D_pl_ptpl (Plane *pl, Point *pt1)
int UT3D_pl_plcoe (Plane *pl, polcoeff_d3 *co)
int UT3D_plcoe_pl (polcoeff_d3 *co, Plane *pl)
double UT3D_plg_lvTab (double *lvTab, Point *pta, int ptNr)
int UT3D_pta_plg (int *ptNr, Point *pta, CurvPoly *plg)
int UT2D_box_ini0 (Point2 *pt1, Point2 *pt2)
int UT2D_box_extend (Point2 *pb1, Point2 *pb2, Point2 *pt1)
int UT2D_rect_pts (Point2 *pmin, Point2 *pmax, int nump, Point2 *ptab)
int UT3D_cv_boxxy (Point *pb1, double x1, double x2, double y1, double y2)
int UT3D_box_extend (Point *pb1, Point *pb2, Point *pt1)
int UT3D_box_2pt (Point *pb1, Point *pb2, Point *pt1, Point *pt2)
int UT3D_box_2pttol (Point *pb1, Point *pb2, Point *pt1, Point *pt2, double tol)
int UT3D_box_pts (Point *pmin, Point *pmax, int nump, Point *ptab)
int UT3D_box_tria (Point *pb1, Point *pb2, Triangle *tr, double tol)
int UT3D_box_addTol (Point *pb1, Point *pb2, double tol)
int UT3D_ck_ptInBox (Point *p1, Point *p2, Point *px)
int UT3D_ckBoxinBox1 (Point *p1, Point *p2, Point *p3, Point *p4)
int UT3D_box_ck_intLn (Line *ln, Point *pmin, Point *pmax, double tol)
int UT3D_box_ck_intpl (Plane *pln, Point *p1, Point *p2, double tol)
int UT3D_rbox_loadxy (Point *pb1, double x1, double x2, double y1, double y2)
int UT3D_ptvc_intbox (Point *pl, Vector *vl, Point *bp1, Point *bp2)
int UT3D_ln_intbox (Line *ln1, Point *bp1, Point *bp2)
void UT3D_tria_pta_fac (Triangle *, Fac3 *, Point *)
int UT3D_m3_inirot (Mat_4x3 ma, Point *pa, Vector *va, double angr)
void UT3D_m3_loadpl (Mat_4x3, Plane *)
void UT3D_m3_load (Mat_4x3, Vector *, Vector *, Vector *)
void UT3D_m3_load_povxvy (Mat_4x3 ma, Point *ori, Vector *vx, Vector *vy)
void UT3D_m3_load_povxvz (Mat_4x3 ma, Point *ori, Vector *vx, Vector *vz)
void UT3D_m3_load_o (Mat_4x3, Point *)
int UT3D_m3_invm3 (Mat_4x3, Mat_4x3)
void UT3D_m3_multm3 (Mat_4x3 m3, Mat_4x3 m1, Mat_4x3 m2)
int UT3D_m3_tram3m3 (Mat_4x3 m3, Mat_4x3 m1, Mat_4x3 m2)
void UT3D_m4_init (Mat_4x4 ma)
void UT3D_m4_init_ori (Mat_4x4 ma, double px, double py, double pz)
void UT3D_m4_init_rot (Mat_4x4 ma, double angle, Vector *axis)
void UT3D_m4_loadpl (Mat_4x4 m1, Plane *pl1)
void UT3D_m4_addrot (Mat_4x4 mo, Mat_4x4 ma, Mat_4x4 mb)
void UT3D_m4_addtra (Mat_4x4 ma, double px, double py, double pz)
double UT3D_sbs_ck_planar (SurBSpl *su1)
double UT3D_sru_ck_planar (ObjGX *ru1)
void OGX_SET_OBJ (ObjGX *ox, int oTyp, int oForm, int oSiz, void *oDat)

Variables

double UT_TOL_pt
 identical Points-tolerence
double UT_TOL_cv
 max Abweichung Curve. (Tol. bei Umwandlung Curve -> Polygon).
double UT_TOL_ln
 Toleranz fuer die Behandlung einer Menge von Punkten als Gerade.
double UT_DISP_cv
 max. Abweichung bei der Darstellung von Kreisen, Kurven
double UT_TOL_min0
double UT_TOL_min1
double UT_TOL_min2
double UT_TOL_PAR
 tolerance for parallelism
double UT_TOL_Ang1
 tolerance for Angle 0.01 Grad
const double UT_VAL_MIN
const double UT_VAL_MAX
const double UT_DB_LEER
const double UT_DB_NULL
const int UT_INT_MAX
const int UT_I2_MAX
const char UT_CHR_NULL
const Point2 UT2D_PT_NUL
const Point UT3D_PT_NUL
const Vector2 UT2D_VECTOR_NUL
const Vector2 UT2D_VECTOR_X
const Vector2 UT2D_VECTOR_Y
const Vector UT3D_VECTOR_NUL
const Vector UT3D_VECTOR_X
const Vector UT3D_VECTOR_Y
const Vector UT3D_VECTOR_Z
const Vector UT3D_VECTOR_IX
const Vector UT3D_VECTOR_IY
const Vector UT3D_VECTOR_IZ
const Mat_3x3 UT3D_MAT_3x3
const Mat_4x3 UT3D_MAT_4x3
const Mat_4x4 UT3D_MAT_4x4


Define Documentation

#define RAD_360   6.2831853071795862319

360 Grad

#define RAD_270   4.7123889803846896739

270 Grad

#define RAD_225   3.92699081698724151736

225 Grad

#define RAD_180   3.14159265358979323846

180 Grad

#define RAD_135   2.3561944901923448368

135 Grad

#define RAD_90   1.5707963267948965579

90 Grad

#define RAD_60   1.0471975511965976313

60 Grad

#define RAD_45   0.7853981633974482789

45 Grad

#define RAD_30   0.5235987755982988156

30 Grad

#define RAD_10   0.174532925199432954

10 Grad

#define RAD_1   0.0174532925199432954

1 Grad

#define RAD_01   0.0017453292519943295

0.1 Grad

#define SR_3   1.7320508075688772

SQRT(3).

#define SR_2   1.4142135623730951

SQRT(2).

#define SR_PI   1.7724538509055159

SQRT(PI) = SQRT(RAD_180).

#define CCW   1

counterclockwise

#define CW   -1

clockwise

#define YES   0

FALSE.

#define NO   1

TRUE.

#define ON   0

FALSE.

#define OFF   1

TRUE.

#define Typ_Error   0

U0 = undefined.

#define Typ_VAR   1

V numer. variable.

#define Typ_PT   2

P Point.

#define Typ_LN   3

L Line.

#define Typ_CI   4

C do not use; use Typ_AC.

#define Typ_AC   5

C Circ.

#define Typ_VC   6

D Vector.

#define Typ_CV   7

S all curves.

#define Typ_CVPOL   8

#define Typ_CVPSP3   9

#define Typ_CVBSP   10

#define Typ_CVRBSP   11

#define Typ_CVCCV   12

S.

#define Typ_CVELL   13

#define Typ_CVBEZ   14

S CurvBez.

#define Typ_CVRBEZ   15

#define Typ_CVCLOT   16

S ClothoidCurve.

#define Typ_APPOBJ   20

#define Typ_PT2   22

P Point2.

#define Typ_LN2   23

L Line2.

#define Typ_AC2   24

C Circ2.

#define Typ_CI2   25

C do not use; use Typ_AC2.

#define Typ_VC2   26

D Vector2.

#define Typ_CV2   27

S all 2D-curves.

#define Typ_CVPOL2   28

S CurvPoly-2D.

#define Typ_CVPSP2   29

S polynom_?

#define Typ_CVBSP2   30

S CurvBSpl-2D.

#define Typ_CVRBSP2   31

S CurvRBSpl-2D.

#define Typ_CVCCV2   32

#define Typ_CVELL2   33

S CurvElli-2D.

#define Typ_CVBEZ2   34

#define Typ_PLN   70

R plane/Refsys.

#define Typ_SOL   71

B body (CON, TOR, ..).

#define Typ_SPH   72

B sphere.

#define Typ_CON   73

B Conus.

#define Typ_TOR   74

B Torus.

#define Typ_CYL   75

B Conus.

#define Typ_EdgeLine   169

#define Typ_Fac3   215

Triangle; Form = Fac3.

#define Typ_QFac   163

#define Typ_Tria   164

Triangle; Form = Triangle (unused).

#define Typ_SURBSP   158

A B_Spline_Surf SurBSpl.

#define Typ_SURRBSP   159

A Rat.B_Spline Surf SurRBSpl.

#define Typ_SURRU   153

A Ruled Sur.

#define Typ_SURRV   154

A Revolved Sur.

#define Typ_SURPLN   155

A Planar surf.

#define Typ_SURPTAB   149

A surf from PTAB.

#define Typ_SURCON   156

Conus (unused).

#define Typ_SURTOR   157

Torus (unused).

#define Typ_SURCIR   151

tesselated fan

#define Typ_SURSTRIP   152

tesselated strip

#define Typ_SURTPS   162

A surface-trimmed-perforated-supported.

#define Typ_SURMSH   160

A Mesh.

#define Typ_SURHAT   161

A Hatch.

#define Typ_SUR   150

A all surfaces.

#define Typ_GL_Sur   210

tesselated surface

#define Typ_GL_PP   211

tesselated planar patch

#define Typ_GL_CV   212

Polygon.

#define Typ_ATXT   40

#define Typ_GTXT   41

N Note N20=... GroupCode f ATXT Dimen.

#define Typ_Dimen   42

f. N20=...

#define Typ_Dim3   53

f. N20=...

#define Typ_Txt   43

$ ohne ", normal mit , begrenzt f. $20=

#define Typ_String   44

durch " begrenzt

#define Typ_SymB   45

bitmap symbols: SYM_TRI_S SYM_STAR_S ..

#define Typ_SymV   46

Vektorymbole: SYM_PLANE SYM_ARROW ..

#define Typ_StrDel   47

StringDelimiter "\" Fortsetzungszeile.

#define Typ_StrDel1   48

StringDelimiter 1 "|".

#define Typ_Tag   49

Bitmap (Blocknote, Image ..).

#define Typ_Box   50

#define Typ_TmpPT   51

temporary Point

#define Typ_TmpLN   52

temporary Line

#define Typ_TmpVC   54

temporary Vector

#define Typ_TmpSym   55

temporary Symbol

#define Typ_EyePT   56

#define Typ_TmpTRI   61

temporary triangle

#define Typ_TmpPLN   62

temporary Plane

#define Typ_goGeom   80

alle

#define Typ_goPrim   81

PT/LN/CI/Spline; nicht Plg,CCV.

#define Typ_lFig   82

geom. Obj. Linear LN/CI/CV

#define Typ_goGeo1   86

geom. Obj. LN/CI/CV/PL/Sur/Sol (nicht PT)

#define Typ_goGeo2   87

geom. Obj. CI/ELL (prj -> PLN)

#define Typ_goGeo3   88

geom. Obj. PT/LN/CI/CV CW CCW MOD (Contour)

#define Typ_goGeo4   89

geom. Obj. VC/LN/PLN

#define Typ_goGeo5   83

geom. Obj. CIR/ELL/CCV (closed cont.)

#define Typ_goGeoSUSU   84

Supporting Surface (CON/TOR/SRU/SRV/SBS).

#define Typ_goGeo6   85

geom. Obj. PT/VC/LN

#define Typ_goGeo7   79

ANG/PT angle (0-360) od angle from point.

#define Typ_goGeo8   78

Val/PT parameter (0-1) od par. from point.

#define Typ_goAxis   77

RotAxis LN/PT+PT/PT+LN/PT+VC/PLN.

#define Typ_goRadius   76

Radius Val/PT/AC.

#define Typ_Ditto   90

#define Typ_Group   91

U ObjGX.

#define Typ_Layer   92

#define Typ_apDat   93

application-data

#define Typ_TEXB   94

Base-Texture.

#define Typ_TEXR   57

Ref-Texture.

#define Typ_Part   98

#define Typ_SubModel   97

M - basicModel.

#define Typ_Model   99

M - ModelReference.

#define Typ_Mock   95

#define Typ_Typ   106

form of ObjGX-Record defines Typ

#define Typ_Address   107

form of ObjGX-Record defines dataPosition

#define Typ_Size   96

recordSize for following record

#define Typ_Index   100

int or long

#define Typ_Name   101

#define Typ_Color   102

#define Typ_Ltyp   103

line type

#define Typ_Thick   104

line thickness

#define Typ_G_Att   105

G.

#define Typ_Tool   108

#define Typ_Activ   109

I = Interactivity.

#define Typ_Val   110

double-Value

#define Typ_ValX   124

X-coord.

#define Typ_ValY   125

Y-coord.

#define Typ_ValZ   126

Z-coord.

#define Typ_XVal   111

X-distance.

#define Typ_YVal   112

Y-distance.

#define Typ_ZVal   113

Z-distance.

#define Typ_Angle   114

Angle (in degree).

#define Typ_Rad   115

Radius.

#define Typ_Dist   116

distance

#define Typ_Par1   127

Parameter 0-1; for knotvals use Typ_Val.

#define Typ_UVal   128

#define Typ_VVal   129

#define Typ_AngN   117

#define Typ_AngP   118

#define Typ_RadISO   119

#define Typ_Conic   120

#define Typ_DirS   123

X / Y / Z / P.

#define Typ_Int1   135

8 bit (char)

#define Typ_Int2   136

16 bit

#define Typ_Int4   137

32 bit-int

#define Typ_Float4   138

32 bit-float

#define Typ_Float8   139

64 bit-float

#define Typ_Polynom1   165

#define Typ_Polynom3   166

#define Typ_Polynom_   167

#define Typ_polynom_d3   168

#define Typ_M3x2   145

Mat_3x2.

#define Typ_M3x3   146

Mat_3x3.

#define Typ_M4x3   147

Mat_4x3.

#define Typ_M4x4   148

Mat_4x4.

#define Typ_Memspc   140

#define Typ_MemTab   144

#define Typ_ObjG2   141

deprec

#define Typ_ObjG   142

deprec

#define Typ_ObjGX   143

#define Typ_ObjRange   250

#define Typ_Tra   130

all transformations

#define Typ_TraTra   131

Translation dzt unused; Typ_VC used.

#define Typ_TraRot   132

Rotation TraRot.

#define Typ_TraMat   133

Matrixtransformation.

#define Typ_ope_eq   221

operator =

#define Typ_ope_ne   222

operator !=

#define Typ_ope_lt   223

operator <

#define Typ_ope_gt   224

operator >

#define Typ_ope_ge   225

operator >=

#define Typ_ope_le   226

operator <=

#define Typ_cmdNCsub   170

#define Typ_Subtyp   172

#define Typ_modif   175

Modifier.

#define Typ_modCoord   176

Modifier; HIX LOX HIY LOY HIZ LOZ.

#define Typ_modCWCCW   177

Modifier; CW CCW.

#define Typ_modAux   178

Modifier; Value depends.

#define Typ_modREV   179

Modifier; Reverse.

#define Typ_modCX   173

Modifier ACROSS (Default = Along).

#define Typ_modCTRL   174

#define Typ_modHIX   180

#define Typ_modLOX   181

#define Typ_modHIY   182

#define Typ_modLOY   183

#define Typ_modHIZ   184

#define Typ_modLOZ   185

#define Typ_modCCW   186

#define Typ_modCW   187

#define Typ_modIN   188

#define Typ_modOUT   189

#define TYP_FuncInit   190

function init

#define TYP_FuncInit1   191

function

#define TYP_FuncMod   192

function modify

#define TYP_FuncAdd   193

function add

#define TYP_FuncDel   194

function delete

#define TYP_FuncEnd   200

function end

#define TYP_FuncExit   201

function exit

#define TYP_EvMouseL   230

event left mousebutton

#define TYP_EvMouseM   231

event mid mousebutton

#define TYP_EvMouseR   232

event right mousebutton

#define TYP_EvMouse2L   233

event doubleclick

#define TYP_FilNam   238

filename

#define Typ_CtlgPart   239

catalogpart

#define Typ_ALL   240

#define Typ_Done   241

#define Typ_NULL   241

nothing, empty

#define BCKPLN_XY   2

Z-Vec BCKVEC_Z.

#define BCKPLN_XZ   1

Y-Vec BCKVEC_Y.

#define BCKPLN_YZ   0

X-Vec BCKVEC_X.

#define BCKVEC_Z   2

Z-Vec BCKPLN_XY.

#define BCKVEC_Y   1

Y-Vec BCKPLN_XZ.

#define BCKVEC_X   0

X-Vec BCKPLN_YZ.

#define GL_TRIANGLE_NPFAN   16

non planar fan (GL_TRIANGLE_FAN = planar)

#define Mtyp_Gcad   0

#define Mtyp_DXF   1

#define Mtyp_Iges   2

#define Mtyp_Step   3

#define Mtyp_3DS   4

#define Mtyp_LWO   5

#define Mtyp_XML   6

#define Mtyp_WRL   10

VRML1 10-19 tess-Formate.

#define Mtyp_WRL2   110

VRML2.

#define Mtyp_OBJ   11

#define Mtyp_STL   12

#define Mtyp_TESS   13

#define Mtyp_BMP   20

20-29 PixelImages

#define Mtyp_JPG   21

#define TimeStamp   float

#define OBJ_SIZ_MAX   160

160 = 5 * 32

max. obj-size (for get, copy ..)

#define UT_BEZDEG_MAX   50

maximal degree of Bezier curve

#define ATT_BIT_ABS   1

das Absolut-Bit; Achtung: 0=ON=absolut, 1=relativ.

#define ATT_BIT_LIM   2

Limited; 0=On; 2=unbegrenzte Linie/Vollkreis.

#define IABS (  )     (((i)<0)?-(i):(i))

abs(int); always positive

#define ISIGN (  )     ((i>=0)?(1):(-1))

sign of int; +1 or -1

#define ICHG01 (  )     (((i)>0)?(0):(1))

change 0 -> 1, 1 -> 0.

#define IMIN ( x,
 )     (((x)<(y))?(x):(y))

#define IMAX ( x,
 )     (((x)>(y))?(x):(y))

#define ILIM2 ( x,
lo,
hi   )     (((x)>(hi))?(hi):(((x)<(lo))?(lo):(x)))

ILIM2 returns x = between lo and hi.

#define ICHAR (  )     ((x) & 15)

#define UTI_iNr_chrNr ( i1   )     (((i1) >> 2) + 1)

UTI_iNr_chrNr give nr of ints for n characters (not including ).

   makes 2 from 4  (4 chars + \0 needs 2 ints to store in int-words)

#define DMIN ( x,
 )     (((x)<(y))?(x):(y))

#define DMAX ( x,
 )     (((x)>(y))?(x):(y))

#define DLIM2 ( x,
lo,
hi   )     (((x)>(hi))?(hi):(((x)<(lo))?(lo):(x)))

DLIM2 returns x = between lo and hi.

#define DSIGN (  )     ((d>=0.)?(1):(-1))

sign of double; +1 or -1

#define DSIGTOL ( d,
 )     ((d>t)?(1):((d<-(t))?(-1):(0)))

d>t=1; d<-t=-1; else 0

#define ACOS ( dCos   )     ((dCos>=1.)?(0.):((dCos<=-1.)?(RAD_180):acos(dCos)))

#define UT_RADIANS ( angle   )     ((angle)*(RAD_1))

#define UT_DEGREES ( angle   )     ((angle)/(RAD_1))

#define UT3D_vc_crossprod2vc   UT3D_vc_perp2vc

#define UT2D_acos_innerprod2vc   UT2D_acos_2vc

#define UTP_comp_0 ( db   )     (fabs(db) < UT_TOL_min1)

UTP_comp_0 compare double (double == 0.0 + - UT_TOL_min1).

 Retcode 0:   db <> 0.0
         1:   db = 0.0

#define UTP_comp2db ( d1,
d2,
tol   )     (fabs(d2-d1) < (tol))

UTP_comp2db compare 2 doubles (with tolerance).

 Retcode 0 = Differenz der Werte > tol   - different
 Retcode 1 = Differenz der Werte < tol   - ident

#define UTP_px_paramp0p1px ( p0,
p1,
par   )     ((p1) - (p0)) * (par) + (p0);

UTP_px_paramp0p1px Zahl aus p0, p1 und Parameterwert.

 see also UTP_param_p0p1px

#define BIT_SET ( i,
 )     (i)|=(b)

BIT_SET set bits; BITSET(i1,2); set bit 1.

#define BIT_CLR ( i,
 )     (i)&=~(b)

BIT_CLR clear bits; BITCLR(i1,3); clear bit 0 and 1.

#define BIT_GET ( i,
 )     ((i)&(b))

BIT_GET filter bits if(BITGET(i1,2)) gives 0=clear >0=set.

#define UT2D_irot_r ( rd   )     (((rd) > 0.) ? CCW : CW)

Direction from Radius; if(rd > 0.) irc=CCW(1) else irc=CW(-1).

#define UT2D_lenq_vc ( vc   )     ((vc)->dx*(vc)->dx + (vc)->dy*(vc)->dy)

UT2D_lenq_vc quadr.length of 2D-vector.

#define UT2D_len_vc ( vc   )     (sqrt((vc)->dx*(vc)->dx + (vc)->dy*(vc)->dy))

UT2D_len_vc length of 2D-vector.

#define UT2D_lenq_2pt ( lq,
p1,
p2   ) 

Value:

{\
  double _dx = (p2)->x - (p1)->x;\
  double _dy = (p2)->y - (p1)->y;\
  *(lq) = _dx * _dx + _dy * _dy;}
UT2D_lenq_2pt quadr. distance pt - pt.

#define UT2D_comp2pt ( p1,
p2,
tol   ) 

Value:

((fabs((p2)->x - (p1)->x) < tol) &&\
   (fabs((p2)->y - (p1)->y) < tol))
UT2D_comp2pt compare 2 points.

 RC = 0: Punkte nicht gleich; Abstand > tol.
 RC = 1: Punkte sind gleich; Abstand < tol.

#define UT2D_swap2pt ( p1,
p2   ) 

Value:

{\
  Point2 p3 = *(p1); *(p1) = *(p2); *(p2) = p3;}
UT2D_swap2pt swap 2 2D-points.

 see also MEM_swap_

#define UT2D_pt_2db ( pt2,
dx,
dy   ) 

Value:

{\
  (pt2)->x = dx; (pt2)->y = dy;}
UT2D_pt_2db 2D-Point < 2 doubles (x, y).

#define UT2D_pt_pt3 ( pt3   )     (*(Point2*)pt3)

UT2D_pt_pt3 2D-Point = 3D-Point.

#define UT2D_pt_pt ( pt2,
pt3   )     (memcpy((pt2), (pt3), sizeof(Point2)))

UT2D_pt_pt 2D-Point = 3D-Point.

#define UT2D_pt_pt3bp ( p2o,
p3i,
bpi   ) 

Value:

{\
  if     (bpi == BCKPLN_XY) {(p2o)->x = (p3i)->x; (p2o)->y = (p3i)->y;} \
  else if(bpi == BCKPLN_XZ) {(p2o)->x = (p3i)->x; (p2o)->y = (p3i)->z;} \
  else if(bpi == BCKPLN_YZ) {(p2o)->x = (p3i)->y; (p2o)->y = (p3i)->z;}}
UT2D_pt_pt3bp 2D-Point = 3D-Point on Backplane.

#define UT2D_pt_addpt ( po,
p1   ) 

Value:

{\
 (po)->x = (po)->x + (p1)->x;\
 (po)->y = (po)->y + (p1)->y;}
UT2D_pt_addpt Add two points: po += p1.

#define UT2D_pt_opp2pt ( po,
p1,
p2   ) 

Value:

{\
  (po)->x = (p1)->x - ((p2)->x - (p1)->x);\
  (po)->y = (p1)->y - ((p2)->y - (p1)->y);}
UT2D_pt_opp2pt opposite point (p1 = center).

#define UT2D_pt_mid2pt ( po,
p1,
p2   ) 

Value:

{\
  (po)->x = ((p1)->x + (p2)->x) / 2.0;\
  (po)->y = ((p1)->y + (p2)->y) / 2.0;}
UT2D_pt_mid2pt midpoint between 2 points.

#define UT2D_pt_traptvc ( po,
pi,
vc   ) 

Value:

{\
 (po)->x = (pi)->x + (vc)->dx;\
 (po)->y = (pi)->y + (vc)->dy;}
UT2D_pt_traptvc 2D Point = Point + Vector.

#define UT2D_acos_2vc   UT2D_skp_2vc

UT2D_skp_2vc cos of opening angle of 2 vecs (dot=scalarprod) DOT.

#define UT2D_skp_2vc ( v1,
v2   )     ((v1)->dx*(v2)->dx + (v1)->dy*(v2)->dy)

#define UT2D_sar_2vc ( v1,
v2   )     ((v1)->dx*(v2)->dy - (v1)->dy*(v2)->dx)

UT2D_sar_2vc signed area of 2 vectors (scalarprod).

#define UT2D_acos_vc2pt   UT2D_skp_vc2pt

UT3D_acos_vc2pt cos of opening angle of vec-(pt-pt) (dot=scalarprod) DOT.

#define UT2D_skp_vc2pt ( v1,
p1,
p2   ) 

Value:

((v1)->dx * ((p2)->x - (p1)->x) +\
  (v1)->dy * ((p2)->y - (p1)->y))

#define UT2D_crossprod_2vc ( vc1,
vc2   )     (((vc1)->dx * (vc2)->dy) - ((vc2)->dx * (vc1)->dy))

UT2D_crossprod_2vc crossprod of 2 2D-Vectors.

#define UT2D_vc_2db ( vc,
dx,
dy   ) 

Value:

{\
 (vc)->dx = (dx);\
 (vc)->dy = (dy);}
UT2D_vc_2db 2D-Vector < 2 doubles (x, y).

#define UT2D_vc_invert ( vo,
vi   ) 

Value:

{\
  (vo)->dx = -(vi)->dx;\
  (vo)->dy = -(vi)->dy;}
UT2D_vc_invert 2D-Vector invert (change direction).

#define UT2D_vc_add2vc ( v3,
v1,
v2   ) 

Value:

{\
 (v3)->dx = (v1)->dx + (v2)->dx;\
 (v3)->dy = (v1)->dy + (v2)->dy;}
UT2D_vc_add2vc v3 = v1 + v2 ADD.

#define UT2D_vc_sub2vc ( v3,
v1,
v2   ) 

Value:

{\
 (v3)->dx = (v1)->dx - (v2)->dx;\
 (v3)->dy = (v1)->dy - (v2)->dy;}
UT2D_vc_sub2vc v3 = v1 - v2 SUB.

#define UT2D_vc_multvc ( vo,
vi,
 ) 

Value:

{\
 (vo)->dx = (vi)->dx * (d);\
 (vo)->dy = (vi)->dy * (d);}
UT2D_vc_multvc vo = vi * d MULT.

#define UT2D_vc_perpvc ( vo,
vi   ) 

Value:

{\
  double _dx = (vi)->dx; (vo)->dx = -(vi)->dy; (vo)->dy = _dx;}
UT2D_vc_perpvc vector = perpendic. to vector ( + 90 degrees).

#define UT2D_vc_perp2pt ( vo,
p1,
p2   ) 

Value:

{\
  (vo)->dx = (p1)->y - (p2)->y;\
  (vo)->dy = (p2)->x - (p1)->x;}
UT2D_vc_perp2pt vector = perpendic. to Line ( + 90 degrees).

#define UT2D_vc_angr ( vc,
angr   ) 

Value:

{\
  (vc)->dx = cos(angr);\
  (vc)->dy = sin(angr);}
UT2D_vc_angr 2DVector = angle (radians).

#define UT2D_vc_vc3bp ( v2o,
v3i,
bpi   ) 

Value:

{\
 if     (bpi == BCKPLN_XY) {(v2o)->dx = (v3i)->dx; (v2o)->dy = (v3i)->dy;} \
 else if(bpi == BCKPLN_XZ) {(v2o)->dx = (v3i)->dx; (v2o)->dy = (v3i)->dz;} \
 else if(bpi == BCKPLN_YZ) {(v2o)->dx = (v3i)->dy; (v2o)->dy = (v3i)->dz;}}
UT2D_vc_vc3bp 2D-Vector = 3D-Vector on Backplane.

#define UT2D_vc_2pt ( vc,
p1,
p2   ) 

Value:

{\
 (vc)->dx = (p2)->x - (p1)->x;\
 (vc)->dy = (p2)->y - (p1)->y;;}
UT2D_vc_2pt 2D-Vector = 2D-Point -> 2D-Point.

#define UT2D_vc_ln ( vc,
ln   ) 

Value:

{\
 (vc)->dx = (ln)->p2.x - (ln)->p1.x;\
 (vc)->dy = (ln)->p2.y - (ln)->p1.y;}
UT2D_vc_ln 2D-Vector from 2D-Line.

#define UT2D_ln_ptpt ( ln1,
pt1,
pt2   ) 

Value:

{\
 (ln1)->p1 = *(pt1);\
 (ln1)->p2 = *(pt2);}

#define UT2D_ln_ptvc ( ln,
pt,
vc   ) 

Value:

{\
 (ln)->p1 = *(pt);\
 (ln)->p2.x = (pt)->x + (vc)->dx;\
 (ln)->p2.y = (pt)->y + (vc)->dy;}
UT2D_ln_ptvc 2D-Line from 2D-point and 2D-vector.

#define UT2D_ln_ln3 ( ln2,
ln3   ) 

Value:

{\
 (ln2)->p1.x = (ln3)->p1.x;\
 (ln2)->p1.y = (ln3)->p1.y;\
 (ln2)->p2.x = (ln3)->p2.x;\
 (ln2)->p2.y = (ln3)->p2.y;}
UT2D_ln_ln3 2D-Line = 3D-Line.

#define UT2D_len_cia ( radius,
ango   )     (fabs((radius)*(ango)))

UT2D_len_cia length arc (from rad & angle).

#define UT2D_ln_inv ( ln   ) 

Value:

{\
  Point2 _pt = (ln)->p1; (ln)->p1 = (ln)->p2; (ln)->p2 = _pt;}
UT2D_ln_inv Invert 2D-Line.

#define UT3D_lenq_vc ( vc   )     ((vc)->dx*(vc)->dx + (vc)->dy*(vc)->dy + (vc)->dz*(vc)->dz)

UT3D_lenq_vc quadr.length of 3D-vector.

#define UT3D_len_vc ( vc   )     (sqrt((vc)->dx*(vc)->dx + (vc)->dy*(vc)->dy + (vc)->dz*(vc)->dz))

UT3D_len_vc length of 3D-vector.

#define UT3D_skp_2vc ( v1,
v2   )     ((v1)->dx*(v2)->dx + (v1)->dy*(v2)->dy + (v1)->dz*(v2)->dz)

UT3D_skp_2vc scalarprod of 2 vecs (dotprod,Skalarprod).

 UT3D_acos_2vc        cos of opening angle of 2 vecs; see double UT3D_acos_2vc

#define UT3D_skp_vc2pt ( v1,
p1,
p2   ) 

Value:

((v1)->dx * ((p2)->x - (p1)->x) +\
  (v1)->dy * ((p2)->y - (p1)->y) +\
  (v1)->dz * ((p2)->z - (p1)->z))

#define UT3D_acos_2vc   UT3D_skp_2vc

UT3D_acos_vc2pt cos of opening angle of vec-(pt-pt) (dot=scalarprod) DOT.

#define UT3D_acos_vc2pt   UT3D_skp_vc2pt

#define UT3D_pt_pt ( pt3,
pt2,
zVal   ) 

Value:

{\
  memcpy((pt3), (pt2), sizeof(Point)); (pt3)->z = (zVal);}
UT3D_pt_ptz 3D-Point = 2D-Point + Z-Val.

#define UT3D_pt_multpt ( po,
pi,
 ) 

Value:

{\
 (po)->x = (pi)->x * (d);\
 (po)->y = (pi)->y * (d);\
 (po)->z = (pi)->z * (d);}
UT3D_pt_multpt po = pi * d.

#define UT3D_pt_LinComb2Pts ( po,
a1,
p1,
a2,
p2   ) 

Value:

{\
 (po)->x = a1 * (p1)->x + a2 * (p2)->x;\
 (po)->y = a1 * (p1)->y + a2 * (p2)->y;\
 (po)->z = a1 * (p1)->z + a2 * (p2)->z;}
UT3D_pt_LinComb2Pts Linear combination of two points:.

                   po = a1 * p1 + a2 * p2

#define UT3D_pt_addpt ( po,
p1   ) 

Value:

{\
 (po)->x += (p1)->x;\
 (po)->y += (p1)->y;\
 (po)->z += (p1)->z;}
UT3D_pt_addpt Add two points: po += p1.

#define UT3D_pt_add2pt ( po,
p1,
p2   ) 

Value:

{\
 (po)->x = (p1)->x + (p2)->x;\
 (po)->y = (p1)->y + (p2)->y;\
 (po)->z = (p1)->z + (p2)->z;}
UT3D_pt_add2pt Add two points: po = p1 + p2.

#define UT3D_swap2pt ( p1,
p2   ) 

Value:

{\
  Point p3 = *(p1); *(p1) = *(p2); *(p2) = p3;}
UT3D_swap2pt swap 2 3D-points.

 see also MEM_swap_

#define UT3D_pt_vc ( pt,
vc   )     (memcpy((pt), (vc), sizeof(Point)))

UT3D_pt_vc Point = Vector.

#define UT3D_pt_traptvc ( po,
pi,
vc   ) 

Value:

{\
 (po)->x = (pi)->x + (vc)->dx;\
 (po)->y = (pi)->y + (vc)->dy;\
 (po)->z = (pi)->z + (vc)->dz;}
UT3D_pt_traptvc Point = Point + Vector.

#define UT3D_pt_traptivc ( po,
pi,
vc   ) 

Value:

{\
 (po)->x = (pi)->x - (vc)->dx; \
 (po)->y = (pi)->y - (vc)->dy;\
 (po)->z = (pi)->z - (vc)->dz;}
UT3D_pt_traptivc Point = Point - Vector.

#define UT3D_pt_evparptcv ( pto,
par,
ptl,
vcl   ) 

Value:

{\
 (pto)->x = (ptl)->x + (vcl)->dx * (par);\
 (pto)->y = (ptl)->y + (vcl)->dy * (par);\
 (pto)->z = (ptl)->z + (vcl)->dz * (par);}
UT3D_pt_evparptcv evaluate param.point on line from point+vector.

#define u3d_LinComb2Pts ( po,
a1,
p1,
a2,
p2   ) 

Value:

{\
 (po)->x = a1 * (p1)->x + a2 * (p2)->x;\
 (po)->y = a1 * (p1)->y + a2 * (p2)->y;\
 (po)->z = a1 * (p1)->z + a2 * (p2)->z;}
u3d_LinComb2Pts Linear combination of two points:

                   po = a1 * p1 + a2 * p2

#define UT3D_vc_vc2 ( v3o,
v2i   ) 

Value:

{\
 (v3o)->dx = (v2i)->dx;\
 (v3o)->dy = (v2i)->dy;\
 (v3o)->dz = UT_DB_NULL;}
UT3D_vc_vc2 3D-vector = 2D-vector.

#define UT3D_vc_3db ( vc,
x,
y,
 ) 

Value:

{\
 (vc)->dx = (x);\
 (vc)->dy = (y);\
 (vc)->dz = (z);}
UT3D_vc_3db Vector < 3 doubles (x, y, z).

#define UT3D_vc_pt ( vc,
pt   )     (memcpy((vc), (pt), sizeof(Point)))

UT3D_vc_pt Vector = Point.

#define UT3D_vc_2pt ( vc,
p1,
p2   ) 

Value:

{\
 (vc)->dx = (p2)->x - (p1)->x;\
 (vc)->dy = (p2)->y - (p1)->y;\
 (vc)->dz = (p2)->z - (p1)->z;}
UT3D_vc_2pt Vector = Point -> Point.

#define UT3D_vc_perpTria ( vn,
tri   )     UT3D_vc_perp3pt ((vn),(tri)->pa[0],(tri)->pa[1],(tri)->pa[2])

UT3D_vc_perpTria vector = perpendic. to Triangle (crossprod).

#define UT3D_vc_invert ( vio,
vii   ) 

Value:

{\
  (vio)->dx = -(vii)->dx;\
  (vio)->dy = -(vii)->dy;\
  (vio)->dz = -(vii)->dz;}
UT3D_vc_invert invert Vector.

#define UT3D_vc_addvc ( vo,
vi   ) 

Value:

{\
 (vo)->dx += (vi)->dx;\
 (vo)->dy += (vi)->dy;\
 (vo)->dz += (vi)->dz;}
UT3D_vc_addvc vo += vi.

#define UT3D_vc_add2vc ( v3,
v1,
v2   ) 

Value:

{\
 (v3)->dx = (v1)->dx + (v2)->dx;\
 (v3)->dy = (v1)->dy + (v2)->dy;\
 (v3)->dz = (v1)->dz + (v2)->dz;}
UT3D_vc_add2vc v3 = v1 + v2 ADD.

#define UT3D_vc_addvc2pt ( v3,
v1,
p1,
p2   ) 

Value:

{\
 (v3)->dx = (v1)->dx + (p2)->x - (p1)->x;\
 (v3)->dy = (v1)->dy + (p2)->y - (p1)->y;\
 (v3)->dz = (v1)->dz + (p2)->z - (p1)->z;}
UT3D_vc_addvc2pt v3 = v1 + (p2-p1) Vector + (Vector from 2 points).

#define UT3D_vc_add3vc ( vo,
v1,
v2,
v3   ) 

Value:

{\
 (vo)->dx = (v1)->dx + (v2)->dx + (v3)->dx;\
 (vo)->dy = (v1)->dy + (v2)->dy + (v3)->dy;\
 (vo)->dz = (v1)->dz + (v2)->dz + (v3)->dz;}
UT3D_vc_add3vc vo = v1 + v2 + v3.

#define UT3D_vc_sub2vc ( v3,
v1,
v2   ) 

Value:

{\
 (v3)->dx = (v1)->dx - (v2)->dx;\
 (v3)->dy = (v1)->dy - (v2)->dy;\
 (v3)->dz = (v1)->dz - (v2)->dz;}
UT3D_vc_sub2vc v3 = v1 - v2 SUB.

#define UT3D_vc_multvc ( vo,
vi,
 ) 

Value:

{\
 (vo)->dx = (vi)->dx * (d);\
 (vo)->dy = (vi)->dy * (d);\
 (vo)->dz = (vi)->dz * (d);}
UT3D_vc_multvc vo = vi * d MULT.

#define UT3D_vc_merge2vc ( vo,
v1,
v2   ) 

Value:

{\
 (vo)->dx = ((v1)->dx + (v2)->dx) / 2.;\
 (vo)->dy = ((v1)->dy + (v2)->dy) / 2.;\
 (vo)->dz = ((v1)->dz + (v2)->dz) / 2.;}
UT3D_vc_merge2vc merge 2 vectors vo = (v1 + v2) / 2.

#define UT3D_comp2pt ( p1,
p2,
tol   ) 

Value:

((fabs((p2)->x - (p1)->x) < tol) &&\
   (fabs((p2)->y - (p1)->y) < tol) &&\
   (fabs((p2)->z - (p1)->z) < tol))
UT3D_comp2pt compare 2 points with tolerance.

 RC = 0: Punkte nicht gleich; Abstand > tol.
 RC = 1: Punkte sind gleich; Abstand < tol.
 Example:
   if(UT3D_comp2pt(&pt1, &pt2, UT_TOL_pt) != 0) printf(" identical points\n");

#define UT3D_ln_inv ( ln   )     {Point _pt = (ln)->p1; (ln)->p1 = (ln)->p2; (ln)->p2 = _pt;}

UT3D_ln_inv Invert 3D-Line.

#define UT3D_ln_ptpt ( ln1,
pt1,
pt2   ) 

Value:

{(ln1)->p1 = *(pt1);\
  (ln1)->p2 = *(pt2);}
UT3D_ln_ptpt Line = Point, Point.

#define UT3D_ln_ptvc ( ln,
pt,
vc   ) 

Value:

{(ln)->p1 = *(pt);\
  (ln)->p2.x = (pt)->x + (vc)->dx;\
  (ln)->p2.y = (pt)->y + (vc)->dy;\
  (ln)->p2.z = (pt)->z + (vc)->dz;}
UT3D_ln_ptvc Line = Point, Vector.

#define UT3D_ln_ln2 ( ln3,
ln2   ) 

Value:

{(ln3)->p1.x = (ln2)->p1.x;\
  (ln3)->p1.y = (ln2)->p1.y;\
  (ln3)->p1.z = UT_DB_NULL;\
  (ln3)->p2.x = (ln2)->p2.x;\
  (ln3)->p2.y = (ln2)->p2.y;\
  (ln3)->p2.z = UT_DB_NULL;}
UT3D_ln_ln2 3D-Line from 2D-Line (Z=0).

#define UT3D_ck_triaOrientI ( i0,
i1   )     (((((i0)==0)&&((i1)==1))||(((i0)==1)&&((i1)==2))||(((i0)==2)&&((i1)==0))) ? CCW : CW)

UT3D_ck_triaOrientI get orientation from indices.

 CCW is 01 12 20;      CW ist 02 21 10;    Val0=1, Val1=2, Val2=4.

#define UT3D_ck_triaOrientV ( i0,
i1   )     (((((i0)==1)&&((i1)==2))||(((i0)==2)&&((i1)==4))||(((i0)==4)&&((i1)==1))) ? CCW : CW)

UT3D_ck_triaOrientV get orientation from indices.

 CCW is 01 12 20;      CW ist 02 21 10;    Val0=1, Val1=2, Val2=4.

#define UT3D_ind3Tria_2ind ( i1,
i2   )     (IABS((i1)+(i2)-3))

#define UT3D_tria_pta_fac ( tri,
fac,
pTab   ) 

Value:

{\
 (tri)->pa[0] = &(pTab)[(fac)->i1];\
 (tri)->pa[1] = &(pTab)[(fac)->i2];\
 (tri)->pa[2] = &(pTab)[(fac)->i3];}

#define OGX_SET_OBJ ( ox,
oTyp,
oForm,
oSiz,
oDat   ) 

Value:

{\
  (ox)->typ = (oTyp);\
  (ox)->form = (oForm);\
  (ox)->siz = (oSiz);\
  (ox)->data = (oDat);\
  (ox)->dir = 0;}

#define OGX_SET_INDEX ( dbTyp,
dbInd,
ox   ) 

Value:

{\
  (ox)->typ = (dbTyp);\
  (ox)->form = Typ_Index;\
  (ox)->siz = 1;\
  (ox)->data = (void*)(dbInd);}
UT3D_ind3Tria_2ind give index of 3.point of triangle (0/1/2).

                            0+1 -> 2; 1+2 -> 0; 2+0 -> 1.
#define UT3D_ind3Tria_2ind(i1,i2) 

 UT3D_tria_pta_fac          create triangle from Fac3
#define UT3D_tria_pta_fac(tri,fac,pTab)






----------------------------------------------------------------
 OGX_SET_OBJ                load complex-object
#define OGX_SET_OBJ(ox,oTyp,oForm,oSiz,oDat)






 \brief OGX_SET_INDEX              load complex-object with db-typ and index
 \code
 replaces: ox.form = Typ_Index; ox.typ = dbTyp; ox->data = (void*)dbInd;

#define OGX_GET_INDEX ( ox   )     (long)(ox)->data

OGX_GET_INDEX get index out of complex-object.

 replaces: (int)ind = (long)oxi->data;   (if oxi->form == Typ_Index)

#define MEM_swap_int ( i1,
i2   ) 

Value:

{\
  int _i3 = *(i1); *(i1) = *(i2); *(i2) = _i3;}

#define MEM_swap_2vp ( v1,
v2   ) 

Value:

{\
  void *_v3 = *(v1); *(v1) = *(v2); *(v2) = _v3;}

#define MEM_swap_2db ( d1,
d2   ) 

Value:

{\
  double _d3 = *(d1); *(d1) = *(d2); *(d2) = _d3;}


Typedef Documentation

typedef double Mat_3x2[2][3]

typedef double Mat_3x3[3][3]

typedef double Mat_4x3[3][4]

size 96

typedef double Mat_4x4[4][4]


Function Documentation

int MEM_swap__ ( void *  stru1,
void *  stru2,
long  strSiz 
)

    MEM_swap__              2 structs vertauschen
    
    MEM_swap__(&p1, &p2, sizeof(Point));

int MEM_swap_int ( int *  i1,
int *  i2 
)

int MEM_swap_2db ( double *  d1,
double *  d2 
)

int MEM_ins_rec ( void *  insPos,
long  movSiz,
void *  insDat,
long  insSiz 
)

    MEM_ins_rec          insert data into mem
    
    insDat data to insert
    insSiz size of insDat
    insPos where to insert
    movSiz hom much bytes to move from insPos to insPos+insSiz

int MEM_chg_rec ( void *  datStart,
long *  datSiz,
void *  insDat,
long  insSiz,
void *  delPos,
long  delSiz 
)

    MEM_chg_rec          change a record in mem (change line)
    
    Input:
      datStart     Startposition des Datenblock
      datSiz       Size Datenblock (zB ex strlen)
      insDat       data to insert (len = insSiz)
      insSiz       size of insDat
      delPos       Position of old record (delete) and new record (insert)
      delSiz       how much bytes to delete at Pos delPos
    Output:
      datSiz  wird korrigiert
    
    
     strcpy(cbuf, "1234567890");   l1 = strlen(cbuf);
     MEM_chg_rec (cbuf, &l1, "AAA", 3, &cbuf[4], 1); // 5 -> AAA
    
    strcpy(cbuf, "1234567890");   l1 = strlen(cbuf);
    MEM_chg_rec (cbuf, &l1, "A", 1, &cbuf[4], 3);   // 567 -> A

int MEM_ins_nrec ( int *  recNr,
void *  recTab,
int  ipos,
void *  insDat,
int  insRecNr,
int  sizRec 
)

    insert records into table.
    insert data BEFORE Record with index ipos.
    insert dataBlock insDat BEFORE dataRecord Nr ipos into Table recTab
    recTab consists of *recNr records of size sizRec
    
    Input/Output:
    *recNr   nr of records of table recTab;
             after exit recNr += insRecNr
    recTab   table with *recNr records; each with a size of sizRec bytes.
             after exit record nr ipos is the firsdt record of insDat ..
    
    Input:
    ipos     index in recTab of the first inserted record of insDat
    insDat   data to insert; size = sizRec * insRecNr
    insRecNr nr of records to insert
    sizRec   size of records (of recTab and insDat)
    
    Example insert 1 point p31 into 3. position (index nr 2) of pTab:
    MEM_ins_nrec (&recNr, pTab, 2, &p31, 1, sizeof(Point));

int MEM_del_nrec ( int *  recNr,
void *  recTab,
int  ipos,
int  delRecNr,
int  sizRec 
)

    delete <delRecNr> records from table.
    first Record to delete has index ipos.
    recTab consists of *recNr records of size sizRec
    
    Input/Output:
    *recNr   nr of records of table recTab;
             after exit recNr -= delRecNr
    recTab   table with *recNr records; each with a size of sizRec bytes.
    
    Input:
    ipos     index in recTab of the first record to delete ..
    delRecNr nr of records to delete
    sizRec   size of records of recTab
    
    Example delete the 3. point (index nr 2) out of pTab:
    MEM_del_nrec (&pNr, pTab, 2, 1, sizeof(Point));

int MEM_del_IndRec ( int *  recNr,
void *  recTab,
int  ipos 
)

    MEM_del_IndRec          delete 1 integer in intArray
    recNr  is decremented

int MEM_del_DbRec ( int *  recNr,
void *  recTab,
int  ipos 
)

    MEM_del_DbRec          delete 1 double in double-Array
    recNr  is decremented

int UTP_comp_0 ( double   ) 

int UTP_compdb0 ( double  ,
double   
)

======================================================================

====================================================================== UTP_compdb0 compare double mit 0.0 mit Tol.

Retcode 0: db <> 0.0 (gr. oder kl. tol) 1: db = 0.0 (innerhalb tol)

int UTP_comp2db ( double  ,
double  ,
double   
)

int UTP_comp2x2db ( double  d11,
double  d12,
double  d21,
double  d22,
double  tol 
)

================================================================

================================================================ UTP_comp2x2db compare 2 * 2 doubles (with tolerance) 2 * 2 Zahlen vergleichen; gleich=0; verkehrt=1; else=-1. RetCod: 0 d11 == d21; d12 == d22; beide Paare gleich. 1 d11 == d22; d12 == d21; beide Paare gleich, aber verkehrt. -1 d11 == d21; d21 != d22; -2 d11 == d22; d12 != d21 ACHTUNG: d12 == d22 wird nicht getestet ! -3 beide Paare ungleich.

int UTP_db_ck_in2db ( double  v,
double  v1,
double  v2 
)

======================================================================

====================================================================== test if value of v is between v1 / v2 RC = 0: YES, v is between v1 / v2 RC = 1: NO, v is outside near v1; v2 > v1. RC = 2: NO, v is outside near v2; v2 > v1. RC = -1: NO, v is outside near v1; v2 < v1. RC = -2: NO, v is outside near v2; v2 < v1.

int UTP_db_ck_in2dbTol ( double  v,
double  v1,
double  v2,
double  tol 
)

======================================================================

====================================================================== test if value of v is between v1 / v2 RC = 0: YES, v is between v1 / v2 RC = 1: NO, v is outside v1 / v2

int UTP_db_cknear_2db ( double *  db,
double *  d1,
double *  d2 
)

=======================================================================

======================================================================= UTP_db_cknear_2db find nearest double out of 2 doubles RetCod 0 = db-d1 ist smaller than db-d2 RetCod 1 = db-d2 ist smaller than db-d1

int UTP_db_cknear_ndb ( double  db1,
int  dbNr,
double *  dbTab 
)

=======================================================================

======================================================================= UTP_db_cknear_ndb find nearest double out of dbTab

double UTP_db_rnd1sig ( double   ) 

double UTP_db_rnd2sig ( double   ) 

int UT1D_ndb_npt_bp ( double *  da,
Point pa,
int  pNr,
int  bp 
)

UT1D_ndb_npt_bp copy the backplane-part of a pointTable

double UT_DEGREES ( double   ) 

double UT_RADIANS ( double   ) 

int UT2D_sidPerp_3pt ( Point2 p1,
Point2 p2,
Point2 p3 
)

    UT2D_sidPerp_3pt        check if p3 is in, before or behind perp-line tru p2
    Ist p3 vor oder hinter der Linie, die durch p2 geht u.normal auf p1-p2 steht
    RC  -1 p3 liegt vor Ebene p1-p2 (vis-a-vis)
    RC   0 p3 liegt genau in der Ebene
    RC   1 liegt hinter Ebene p1-p2 (in der Naehe von p2)
   
                p3     |
                x      |
                .      |
                . -1   0    +1
                .      |
        x--------------x
       p1              p2
   
    see also UT3D_acos_2vc

int UT2D_angr_set ( double *  angr  ) 

UT2D_angr_set change to val >= 0 <= RAD_360

int UT2D_2angr_set ( double *  ang1,
double *  ang2,
int  irot 
)

    UT2D_2angr_set     change consecutive values from -RAD_360 to RAD_360
    if irot == 1 (CCW) ang2 > ang1
    if irot == -1 (CW) ang2 < ang1

double UT2D_angr_2angr ( double  ang1,
double  ang2,
int  irot 
)

    UT2D_angr_2angr                   angle between 2 angles
    irot =  1   CCW
    irot = -1   CW

int UT2D_ptNr_ci ( double  rdc,
double  ao,
double  tol 
)

Anzahl Ecken circ berechnen

int UT2D_solvtriri_a ( double *  a,
double  b,
double  c 
)

    UT2D_solvtriri_a         right-angled tri: a from sides b and c
   
                  C              Der rechte Winkel liegt im Punkt C.
                / . \
              /       \
            b           a
          /               \
        A -------c-------- B      c = hypotenuse
   
   
     a*a + b*b = c*c
   
     a = sqrt (c*c - b*b)

int UT2D_solvtriri_ac ( double *  ,
double *  ,
double  ,
double   
)

    UT2D_solvtriri_ac         right-angled tri: q and hc from sides b and c.
    
                   C              Der rechte Winkel liegt im Punkt C.
                 / | \
               /   |   \
             b    hc     a
           /       |       \
         A -------c-------- B
               q      p
    
    c = hypotenuse (baseline),
    b = side left,
    a = side right,
    hc is a normal to c. This normal parts c into
    q (lying under b) and
    p (lying under a).
    
    Returns:
    q  - the length of b projected to c;
    hc - the length of the normal standing on c

int UT2D_solvtri_abc ( double *  ,
double *  ,
double  ,
double  ,
double   
)

    UT2D_solvtri_abc          scalene tri: q and hc from sides a, b and c.
    
    
                   C               Allgemeines Dreieck. Kein rechter Winkel.
                 / | \
               /   |   \
             b    hc     a
           /       |       \
         A -------c-------- B
               q      p
    
    
    compute triangle.
    
    c is the baseline;
    b = side left,
    a = side right, (liegt gegenueber Punkt A !)
    hc is a normal to c. This normal parts c into
    q (lying under b) and
    p (lying under a).
    
    
    Input: the length of the sides a, b, c.
    
    Output:
      q  - the length of b projected to c; (with direction - can be negativ !)
      hc - the length of the normal standing on c
    
    Retcodes:
      0 - Ok.
     -1 - error; c = 0.;
     -2 - error; b > a + c;
     -3 - error; a > b + c;

int UT2D_ckBoxinBox1 ( Point2 p1,
Point2 p2,
Point2 p3,
Point2 p4 
)

    check if 2 boxes overlap
    p1-p2 sind Box1, p3-p4 Box2.
    ACHTUNG: p1 muss links unter p2 liegen; p3 links unter p4.
    RC -1:   NO, boxes do not overlap
    RC  1:   yes boxes overlap.

int UT2D_ckBoxinBox2 ( Point2 ,
Point2 ,
Point2 ,
Point2 ,
double   
)

    check if Box2 is complete in Box1
    p1-p2 sind Box1, p3-p4 Box2.
    ACHTUNG: p1 muss links unter p2 liegen; p3 links unter p4.
    RC -1:   NO, boxes overlap
    RC  1:   yes, Box2 is complete inside Box1

double UT2D_skp_2vc ( Vector2 ,
Vector2  
)

double UT2D_skp_vc2pt ( Vector2 ,
Point2 ,
Point2  
)

double UT2D_acos_2vc ( Vector2 ,
Vector2  
)

double UT2D_sar_2vc ( Vector2 ,
Vector2  
)

double UT2D_acos_vc2pt ( Vector2 ,
Point2 ,
Point2  
)

double UT2D_crossprod_2vc ( Vector2 ,
Vector2  
)

double UT2D_angd_angr ( double   ) 

UT2D_angd_angr angle (degrees) = angle (radians)

double UT2D_angd_invert ( double *  andi  ) 

UT2D_angd_invert ang(deg.) invert (change direction)

double UT2D_angr_angd ( double   ) 

UT2D_angr_angd angle (radians) = angle (degrees)

double UT2D_angr_triri_ab ( double  ,
double   
)

    UT2D_angr_triri_ab        right-angled tri: angle alfa from sides a and b.
    
    c = hypotenuse (baseline),
    b = side left,
    a = side right,
    the sides b - a include the right-angle.
    
    Returns the angle alfa (in rad; which is included by the sides b and c).

double UT2D_angr_ptpt ( Point2 ,
Point2  
)

UT2D_angr_ptpt angle (radians) = pt > pt

double UT2D_angr_vc ( Vector2  ) 

UT2D_angr_vc angle (radians) = vector (0-360)

double UT2D_angr_2ln ( Line2 ,
Line2  
)

UT2D_angr_2ln angle (rad.) between 2 Lines

double UT3D_angr_vc2pt ( Point pz,
Vector vz,
Point p1,
Point p2 
)

    UT3D_angr_vc2pt           angle between 2 points in plane (plane from pt-vc)
    angle is CCW, 0 - PI*2
    Die Punkte p1 und p2 befinden sich in einer Ebene.
    vz ist der Z-Vektor der Ebene.
   
    see also UT3D_angr_vcpl UT3D_angr_cipt UT3D_angr_ci UT3D_acos_2vc

double UT3D_angr_vcpl ( Plane pl1,
Vector vc1 
)

    UT3D_angr_vcpl          compute angle of vec in Refsys (to X-axis)
    vc1 wird auf pl1 projiziert; RetCod = Winkel von vci' mit dem X-Vec von pl1

double UT3D_angr_2pl ( Plane pl1,
Plane pl2 
)

Oeffnungswinkel zwischen 2 Planes

double UT2D_angr_2vc ( Vector2 ,
Vector2  
)

    UT2D_angr_2vc             angle (rad.) between 2 Vectors
    Die Vektoren muessen CCW liegen; vc1 entspricht der X-Achse; vc2 CCW davon.

double UT2D_angr_3ptdr ( Point2 ,
Point2 ,
Point2 ,
int   
)

DO NOT USE; use UT2D_angr_ci

double UT3D_angr_4pt ( Point p11,
Point p12,
Point p21,
Point p22 
)

UT3D_angr_4pt angle between 2 lines

double UT2D_angr_ci ( Point2 pa,
Point2 pe,
Point2 pc,
double  rad_in 
)

    UT2D_angr_ci              openingAngle of circle (pa,pe,pc,rad/dreh)
    
    Der Winkel ist bei CW-Kreisen immer negativ (-360 - 0 - 360).
    
    
    Achtung: rad gibt auch die Drehrichtung !
      CCW = rad > 0 ;
      CW  = rad < 0 ;

double UT3D_angr_cipt ( Circ ci1,
Point pti 
)

    UT3D_angr_cipt            opening angle of point on Circ
    ACHTUNG: ES KANN KEIN VOLLKREIS ANALYSIERT WERDEN - ERGIBT Winkel 0 !!
     Oeffnungswinkel CCW von 0 bis 2 Pi; CW von 0 bis -2 Pi.

double UT2D_angr_perpangr ( double *   ) 

UT2D_angr_perpangr angle + 90 degree (perp. to angle)

double UT2D_len_vc ( Vector2  ) 

double UT2D_lenq_vc ( Vector2  ) 

void UT2D_lenq_2pt ( double *  lq,
Point2 p1,
Point2 p2 
)

double UT2D_len_2pt ( Point2 ,
Point2  
)

UT2D_len_2pt distance pt - pt

double UT2D_lenB_2pt ( Point2 p1,
Point2 p2 
)

UT2D_lenB_2pt longest dx/dy-distance point-point (fast!)

int UT2D_minLenB_4pt ( double *  dp,
Point2 ,
Point2 ,
Point2 ,
Point2  
)

    UT2D_minLenB_4pt          min lenght between 2 lines
    dp ist Streckensumme entlang der Hauptachsen - nicht genau Laenge !
    rc = 1  p1e - p2a hat geringsten Abstand
    rc = 2  p1a - p2a hat geringsten Abstand
    rc = 3  p1e - p2e hat geringsten Abstand
    rc = 4  p1a - p2e hat geringsten Abstand
    dx,dy addieren; den geringsten Wert auswaehlen.

int UT3D_minLen_3pt ( double *  ,
Point ,
Point ,
Point  
)

    dp ist Streckensumme entlang der Hauptachsen - nicht genau Laenge !
    rc = 1  p0 - p1 hat geringeren Abstand
    rc = 2  p0 - p2 hat geringeren Abstand
    dx,dy,dz addieren; den geringsten Wert auswaehlen.

int UT3D_minLen_4pt ( double *  ,
Point ,
Point ,
Point ,
Point  
)

    dp ist Streckensumme entlang der Hauptachsen - nicht genau Laenge !
    rc = 1  p1e - p2a hat geringsten Abstand
    rc = 2  p1a - p2a hat geringsten Abstand
    rc = 3  p1e - p2e hat geringsten Abstand
    rc = 4  p1a - p2e hat geringsten Abstand
    dx,dy,dz addieren; den geringsten Wert auswaehlen.

double UT2D_len_ptln ( Point2 pt,
Point2 pa,
Point2 pe 
)

    UT2D_len_ptln      get (signed)  minDist from pt to Line pa-pe

int UT2D_3len_ptln ( double *  ,
double *  ,
double *  ,
Point2 ,
Point2 ,
Point2  
)

    ck minimalAbst von pt auf Line pa,pe
    feststellen, ob der Normalpunkt auf oder ausserhalb Line ist
      (Normalpunkt = Projektion von pt auf Line pa-pe)
    Auf Line: den Abstand pt-NormalPt liefern (mit Vorzeichen)
    nicht auf Line: den Abstand zum naeheren Endpunkt liefern
    d1: Normalabstand od MindestAbstand
    dx: LaengsAbstand (der Abstand des NormalPunktes von pa)
    dy: der Normalabstand von pt zur Line pa-pe;
        Vorzeichen positiv: pt links von pa; negativ: rechts von pa.
   
    RetCod:
     -1 = vor pa;         dy ist nicht gueltig !
      0   zwischen pa-pe; dx,dy sind gueltig
      1   ausserhalb pe;  dy ist nicht gueltig !

int UT2D_slenq_ptptvc ( double *  qlen,
Point2 pa,
Point2 pb,
Point2 pc 
)

    UT2D_slenq_ptptvc         signed quadr.Distance pt-pt in Richtung vec
    pa - pb gives a line, pc is projected onto this line.
   
                 c
                 |
                 |
           len   |
        a--------+------b
                 e
   
    see UT2D_sidPerp_3pt

double UT2D_slen_nor3pt ( Point2 p1,
Point2 p2,
Point2 p3 
)

    UT2D_slen_nor3pt          signed length of normal point - line
    gibt den Abstand den p2 auf die Linie p1 - p3 hat mit Vorzeichen.

double UT2D_slen_norvc2pt ( Vector2 v1,
Point2 p1,
Point2 p2 
)

    UT2D_acos_vc2pt           signed length of normal vector - vector
    For true length v1 must be normalized !
    see UT2D_acos_2vc
   
                       . p2
                     .   X
                   .     .
                 .       .
              v2         .   sk = Normalabst von vec p1-p2 auf vec p1-v1
             .           .
           .             .
         .               .
       X-----------------.-------
       p1            v1

double UT2D_len_ptlnX ( Point2 pt,
Point2 pl,
Vector2 vl 
)

    UT2D_len_ptlnX          Laengsabst.(m.Vorz.) eines Punktes auf Linie (pl-vl)
    
    Achtung: liefert den Abstand von pl nach pt !
      (den X-Wert der Normalen von pt auf pl/vl).
    Vorzeichen:  wenn pl in 0,0 und vl als 1,0 angenommen wird, entspricht der
     Abstand dem X-Wert; Vorzeichen also Positiv bei pt= rechts von pl-vl.

double UT2D_len_ptlnY ( Point2 pt,
Point2 pl,
Vector2 vl 
)

    UT2D_len_ptlnY           Normalabst.(m.Vorz.) eines Punktes von Linie (pl-vl)
    
    vl muss  nicht normalisiert sein.
    
    Vorzeichen:  wenn pl in 0,0 und vl als 1,0 angenommen wird, entspricht der
     Abstand dem Y-Wert; Vorzeichen also Positiv bei pt= oberhalb von pl-vl.

void UT2D_2len_ptvc ( double *  ,
double *  ,
Point2 ,
Point2 ,
Vector2  
)

    UT2D_2len_ptvc            dx,dy = dist pt - pb along / normal to vector vc
    
    Input:
      pb,vc  - define the axissystem (origin and x-axis)
      pt     - point in this axissystem
    
    Output:
      dx     - gives the distance along vc from pb to pt (can be negativ !)
      dy     - gives the distance normal to vc from pb to pt (can be negativ !)

int UT2D_irot_r ( double  r  ) 

int UT2D_sid_2vc ( Vector v1,
Vector v2 
)

    UT3D_cklr_2vc        check vc for left (CCW, above) or right (CW, below)
    Vektoren muessen nicht normiert sein !
    RC  -1   v2 is CW from v1   (neg. angle)
    RC   0   v1-v2 are parallel
    RC   1   v2 is CCW from v1  (pos. angle)
    
    see also UT2D_sidPerp_2vc

int UT2D_sidPerp_2vc ( Vector v1,
Vector v2 
)

    UT2D_sidPerp_2vc        check vecs for inFront, perp.(normal), or behind
    Ist v2 vor oder hinter einem Normalvektor auf v1 durch den Startpunkt von v1.
    sind Vektoren eher parallel oder anpiparallel ..
    Vektoren muessen nicht normiert sein !
    RC  -1 vecs point into opposit direction (angle > 90 deg.)
    RC   0 vecs are perpendicular  (angle = 90 deg)
    RC   1 vecs point into same direction (angle < 90 deg)
    
    see also UT2D_sid_2vc UT3D_acos_2vc

int UT2D_sid_3pt ( Point2 pt,
Point2 p1,
Point2 p2 
)

    UT2D_sid_3pt               compare if pt is on, above or below line (p1-p2)
     0   pt is on vector vl
     1   pt is above vector vl (left side)
    -1   pt is below vector vl (right side)

int UT2D_sid_ptvc ( Point2 ,
Point2 ,
Vector2  
)

    UT2D_sid_ptvc             compare if pt is on, above or below line (pl+vl)
   
    was UT2D_dir_ptvc
    
    retcode:
      0   pt is on vector vl
      1   pt is above vector vl (left side)
     -1   pt is below vector vl (right side)

int UT2D_sidPerp_ptvc ( Point2 pt,
Point2 pl,
Vector2 vl 
)

    UT2D_sidPerp_ptvc        compare if pt is right/on/left of a normal to pt+vc
    
    retcode:
      0   pt is on a normal to vector vl
      1   pt is before pl (to the right side of a normal to vector vl)
     -1   pt is behind pl (to the left side of a normal to vector vl)

int UT3D_sid_2vc ( Vector v1,
Vector v2 
)

    UT3D_sid_2vc        check vc's for perp, same or opposit direction
    Ist p3 vor oder hinter der Ebene, die durch p1 geht u.normal auf p1-p2 steht
    sind Vektoren eher parallel oder anpiparallel ..
    RC  -1 vc's point into opposit direction
    RC   0 vc's are perpendicular
    RC   1 vc's point into same direction
    see also UT3D_acos_2vc

int UT3D_sid_3pt ( Point p1,
Point p2,
Point p3 
)

    UT3D_sid_3pt        check if pt is in, before or behind perpendic.Plane
    Ist p3 vor oder hinter der Ebene, die durch p1 geht u.normal auf p1-p2 steht
    RC  -1 p3 liegt vor Ebene p1-p2 (vis-a-vis)
    RC   0 p3 liegt genau in der Ebene
    RC   1 liegt hinter Ebene p1-p2 (in der Naehe von p2)
    
    see also UT3D_acos_2vc

int UT3D_sid_ptpl ( Point pt,
Plane pl 
)

    UT3D_sid_ptpl         compare if pt is in, above or below plane
    
    retcode:
      0   pt is in plane pl
      1   pt is above plane pl (same side as the z-vector)
     -1   pt is below plane pl

int UT3D_sid_ptptvc ( Point ptx,
Point pto,
Vector vz 
)

    UT3D_sid_ptptvc          compare if pt is in, above or below plane
    Plane is defind by origin pto and z-vector vz
    retcode:
      0   pt is in plane pl
      1   pt is above plane pl (same side as the z-vector)
     -1   pt is below plane pl

int UT2D_parLn_pt2pt ( double *  d1,
Point2 p1,
Point2 p2,
Point2 px 
)

get parameter (0-1) of point px along line p1-p2

see also UTP_param_p0p1px

double UT2D_ar_3pt ( Point2 p1,
Point2 p2,
Point2 p3 
)

    UT2D_ar_3pt            get (signed) area of triangle
   
    see also UT2D_srar_inpt3 UFA_ar_fac

int UT2D_comp2pt ( Point2 ,
Point2 ,
double   
)

int UT2D_comp4pt ( Point2 ,
Point2 ,
Point2 ,
Point2 ,
double   
)

    UT2D_comp4pt              compare 4 2D-points
    Ob 2 der 4 Punkte zusammenpassen
      (zum Test ob 2 Lines einen gemeinsamen Punkt haben).
    Retcode 0 = Abstand aller Punkte > tol
            1 = Abstand (p1e - p2a) < tol
            2 = Abstand (p1a - p2a) < tol  (Obj 1 verkehrt)
            3 = Abstand (p1e - p2e) < tol  (Obj 2 verkehrt)
            4 = Abstand (p1a - p2e) < tol  (Obj 1 und 2 verkehrt)

int UT2D_pt_ck_int4pt ( Point2 ,
Point2 ,
Point2 ,
Point2  
)

    test ob die Linien p1-p2 und p3-p4 sich schneiden/beruehren/parallel sind
    rc=-1: kein Schnittpunkt
    rc=0:  die  Linien beruehren sich
    rc=1:  die Linien sind (teilweise) parallel
    rc=2:  die Linien schneiden sich
    see UT2D_pt_int2vc2pt

int UT2D_pt_ck_onLine ( Point2 po,
Point2 p1,
Point2 p2,
Point2 p3 
)

    liegt p3 auf der Linie p1-p2 ?      (Tests mit UT_TOL_pt)
    RC = -1   NO; Point outside Line p1-p2
    RC =  0   Yes; p3=p1; po=p1.
    RC =  1   Yes; po between p1-p2
    RC =  2   Yes; p3=p2; po=p2.

int UT2D_pt_ck_inLine ( Point2 p1,
Point2 p2,
Point2 p3,
double  tol 
)

    UT2D_pt_ck_inLine      check 2D-point on line segment
    
    
    Check if a 3. 2D-point lies inside the line segment defined by two 2D-points.
    It is assumed that the 2D-point is ON the line defined by the two 2D-points.
    
    IN:
      Point2 p1   ... 2D-point 1 defining the line segment
      Point2 p2   ... 2D-point 2 defining the line segment
      Point2 p3   ... 2D-point to check
      double tol  ... tolerance for 2D-point to ly inside line segment (>0)
    OUT:
    Returncodes:
      0 = the 2D-point lies outside the segment
      1 = the 2D-point lies inside the segment

int UT2D_pt_ck_inplg ( Point2 pTab,
int  pNr,
Point2 ptx 
)

    UT2D_pt_ck_inplg       Test if Point ptx is inside polygon pTab
    Input:
      pTab   polygonPoints; closing edge is from pTab[pNr-1] to pTab[0]
    Output:
      RetCod 0     No,  point ptx is outside pTab;
             else  Yes, point is inside.

int UT2D_pt_ck_linear ( int  np,
Point2 ptab,
double  tol 
)

    UT2D_pt_ck_linear       check straight position of 2D-points
    
    Check if the position of 2D-points is straight.
    IN:
      int np        ... number of 2D-points
      Point2 *ptab  ... 2D-points
      double tol    ... tolerance for straightness (>0)
    OUT:
    Returncodes:
      0 = position of points is not straight
      1 = position of points is straight

int UT2D_pt_ck_inBox ( Point2 p1,
Point2 p2,
Point2 p 
)

    UT2D_pt_ck_inBox             check if point p is inside box p1-p2
    RC = 0:   YES, p is inside box p1 / p2
    RC = 1:   NO,  p is outside box p1 / p2

int UT2D_pt_ck_inBoxTol ( Point2 p1,
Point2 p2,
Point2 p,
double  tol 
)

    UT2D_pt_ck_inBoxTol          check if point p is inside box p1-p2
    RC = 0:   YES, p is inside box p1 / p2
    RC = 1:   NO,  p is outside box p1 / p2

int UT2D_pt_ck_inAc ( Point2 pt,
Circ2 ci 
)

    UT2D_pt_ck_inAc          check if pt is in Arc(Segment)
    Vektor Cen-Pt muss Arc schneiden; else not in Arc.
    Es wird der Radius nicht kontrolliert; auch nicht die gegenUeberseite.
    RetCod: 0 = yes, pt is in Arcsegment;
           -1,-2,1,2 = no.

int UT2D_pt_ck_inTriangle ( Point2 p1,
Point2 p2,
Point2 p3,
Point2 p 
)

int UT2D_pt_ck_inCv3 ( Point ptx,
int  pNr,
Point pTab 
)

    UT2D_pt_ck_inCv3              check if point is inside polygon
    geschlossene Kontur erforderlich; pTab[pNr-1] muss gleich wie pTab[0] sein
    irc  1   Punkt liegt innerhalb der Kontur
    irc  0   Punkt liegt auf der Kontur
    irc -1   Punkt liegt ausserhalb der Kontur
    
    Schnittpunkte aller Kantenlinien mit Horzontale Linie durch ptx
    rechts von ptx zaehlen; ungerade == innen.

int UT2D_pt_cknear_npt ( Point2 p0,
Point2 ptTab,
int  ptNr 
)

    UT2D_pt_cknear_npt        return index of nearest Point from n points
    
    use: pt1 = ptTab[UT2D_ipt_cknear_npt (&ptStart, ptTab, ptNr)];

void UT2D_swap2pt ( Point2 p1,
Point2 p2 
)

Point2 UT2D_pt_pt3 ( Point  ) 

void UT2D_pt_2db ( Point2 ,
double  ,
double   
)

int UT3D_pt_pt2bp ( Point p3,
Point2 p2,
int  bp 
)

make 3D-point from 2D-point & backplane

void UT2D_pt_addpt ( Point2 ,
Point2  
)

void UT2D_pt_opp2pt ( Point2 ,
Point2 ,
Point2  
)

void UT2D_pt_mid2pt ( Point2 ,
Point2 ,
Point2  
)

void UT2D_pt_tra2ptlen ( Point2 ,
Point2 ,
Point2 ,
double   
)

UT2D_pt_tra2ptlen transl. point p1 into dir p1 -> p2 dist. lenv

void UT2D_pt_traPtPtPar ( Point2 po,
Point2 p1,
Point2 p2,
double  d1 
)

    UT2D_pt_traPtPtPar      transl. pt with parameter along p1-p2
   
    see UT3D_pt_evpar2pt UT3D_vc_multvc UT2D_pt_traptvc

void UT2D_pt_tra3ptlen ( Point2 ,
Point2 ,
Point2 ,
Point2 ,
double   
)

UT2D_pt_tra3ptlen transl. point p1 into dir p2 -> p3 dist. lenv

void UT2D_pt_tra2pt2len ( Point2 ,
Point2 ,
Point2 ,
double  ,
double   
)

UT2D_pt_tra2pt2len transl. point into dir p1 -> p2 dist. dx and normal dy

void UT2D_pt_tra2pt3len ( Point2 ,
Point2 ,
Point2 ,
double  ,
double  ,
double   
)

UT2D_pt_tra2pt3len move p1; Baseline p1-p2; Dir dx/dy; length lenv.

void UT2D_pt_traptvclen ( Point2 ,
Point2 ,
Vector2 ,
double   
)

UT2D_pt_traptvclen move pi along vc length lenv

void UT2D_pt_traptangrlen ( Point2 ,
Point2 ,
double  ,
double   
)

UT2D_pt_traptangrlen move point; direction from angle, distance=lenv

void UT2D_pt_tranor2ptlen ( Point2 ,
Point2 ,
Point2 ,
double   
)

    UT2D_pt_tranor2ptlen      transl. point normal to p1 - p2 dist. lenv
      Center is p1; p1-p2 gives the baseline

void UT2D_pt_tranorptvclen ( Point2 ,
Point2 ,
Vector2 ,
double   
)

    UT2D_pt_tranorptvclen     transl. point normal to vec dist. lenv
      Center is p1; p1-v1 gives the baseline

void UT2D_pt_traptvc2len ( Point2 ,
Point2 ,
Vector2 ,
double  ,
double   
)

    UT2D_pt_traptvc2len       transl. point into dir vc; dist. dx and normal dy
    Move point into direction vc with distance dx and normal to vc -
    with distance dy.

void UT2D_pt_tracirlen ( Point2 ,
Point2 ,
Point2 ,
double  ,
double   
)

    UT2D_pt_tracirlen         transl. point circular length
   
    rad  = Radius; Pos.Val = CCW; neg.Val =CW.
    clen = arcLenght

void UT2D_pt_rotptangr ( Point2 ,
Point2 ,
Point2 ,
double   
)

    UT2D_pt_rotptangr         rotate a point around centerpoint
    
    p2 darf ident mit p1 sein.

int UT2D_pt_projptptvc ( Point2 ,
Point2 ,
Point2 ,
Vector2  
)

    UT2D_pt_projptptvc        point = project point to line (pt+vc)
    Project a point onto a line given by point and vector.
    pl - vl gives a line, pt is projected onto this line.
   
    IN:
      Point2 *pt   ... point to project on line pl-vl
      Point2 *pl   ... point on line
      Vector2 *vl  ... vector of line
    OUT:
      Point2 *pp   ... normal projection of pt onto line
    Returncodes:
      0 = OK
      1 = point is on line

int UT2D_pt_projpt2pt ( Point2 pp,
double *  len,
Point2 pt,
Point2 p1,
Point2 p2 
)

    UT2D_pt_projpt2pt                pp = project point pt to lineSegment p1-p2
   
    p1-p2 is a line, pt is projected onto this line.
    len ist the len pt-pp  (if not NULL)
   
     -1   1       0         2   -2         retcod
          |       pt        |
                  |
               len|
                  |
          p1------+--------p2
                  pp
   
    Input:
      len    NULL or address
    Output:
      pp     pr projected to p1-p2
      len    distance pt-pp if not NULL on input
      retcod 0=OK, pp is on line, between p1-p2
             1 OK; pp = p1
             2 OK; pp = p2
            -1 outside; pt is before line
            -2 outside; pt if after line
            -3 Input-Error; p1==p2
   
    see also UT3D_pt_ck_ptvc UT3D_pt_ck_onLine UT3D_nlen_2ptvc UT3D_pt_projptptvc
      UT3D_pt_projptln

int UT2D_pt_projptln ( Point2 ,
Point2 ,
Line2  
)

UT2D_pt_projptln point = project point to line

void UT2D_2pt_projptci ( Point2 ,
Point2 ,
Point2 ,
Point2 ,
double   
)

    UT2D_2pt_projptci         project point to circle
    
    ip1 ist the nearer solution,
    ip2 is farer away from cen

int UT2D_pt_projptci ( Point2 pp,
Point2 pt,
Circ2 ci1 
)

    UT2D_pt_projptci         project point to Arc (segment of circle)
    2 solutions: der nearest point is selected.
    RetCod: 0 = yes, pp is in Arcsegment;
           -1 = no; none of the 2 projectionpoints is on the ArcSegment.

int UT3D_ptDi_intptvcptvc ( Point ip,
double *  dist,
Point ptl,
Vector vcl,
Point ptp,
Vector vcp 
)

    intersect line-plane (pt-vc  pt-vc)
    ip = project pt1 along vcl onto plane ptp-vcp
   
    Output:
      dist = der Faktor fuer den Abstand vom pt zum ip in Richtung vln.
             vln * dist ab pt ergibt ip.
    Returncodes:
      0 = vc parallel to plane
      1 = OK;

int UT3D_ptDi_intptvcpln ( Point ip,
double *  dist,
Plane pl,
Point pt,
Vector vln 
)

    UT3D_ptDi_intptvcpln      intersect line-plane (pt-vc  pt-vc)
    Von pl wird nur p und vz benutzt.
    
    Output:
      dist = der Faktor fuer den Abstand vom pt zum ip in Richtung vln.
             vln * dist ab pt ergibt ip.
    Returncodes:
      0 = vc parallel to plane
      1 = OK;
   
    see also UPRJ_app_pt UT3D_pt_intptvcplx/y/z

int UT2D_pt_int4pt ( Point2 ,
double *  ,
double *  ,
Point2 ,
Point2 ,
Point2 ,
Point2  
)

    intersection of 2 limited lines
    Info, ob Schnittpunkt ident mit p1 oder p2 (p3,p4 werden nicht getestet)
    Info, ob p1-p2 und p3-p4 uebereinanderliegen (ueberlappen)
    RC = -1   NO; Point outside Line p1-p2
    RC =  0   Yes; intersect; ps=p1; dp1=0;
    RC =  1   Yes; intersect; ps between p1-p2;
              dp1 ist der Abstandswert (0-1) des Schnittpunktes entlang p1-p2
    RC =  2   Yes; intersect; ps=p2; dp1=1;
    RC =  3   Lines parallel - Endpoints touch (not overlap). ps, dp1 unused.
    RC =  4   Lines parallel and overlap; ps, dp1 unused.

int UT2D_pt_int2ln ( Point2 ,
Line2 ,
Line2  
)

    UT2D_pt_int2ln            point = intersection of 2 lines
    
    Returncodes:
     0 = Lines parallel or zero-length
     1 = OK.

int UT2D_pt_intptvcy ( Point2 pto,
Point2 ptl,
Vector2 vcl,
double  yVal 
)

    UT2D_pt_intptvcy            intersection line (pt-vc) - horizontal line
    Schnittpunkt eines Linesegmentes ln1 mit einer unendlich langen,
    horiz. Geraden mit Y=yVal errechnen.
    Retcod= 0: Schnittpunkt in pto
    Retcod= 1: Linie vertical; beliebig viele Schnittpunkte

int UT2D_pt_intlny ( Point2 pto,
Point2 lp1,
Point2 lp2,
double  yVal 
)

    UT2D_pt_intlny            intersection linesegment - horizontal line
    Schnittpunkt eines Linesegmentes ln1 mit einer unendlich langen,
    horizontalen Geraden mit Y=yVal errechnen.
    Retcod= 0: Schnittpunkt in pto
    Retcod=-1: kein Schnittpunkt
    Retcod= 1: Linie horizontal; beliebig viele Schnittpunkte

int UT2D_pt_int2pt2vc ( Point2 ip,
Point2 pt1,
Vector2 vc1,
Point2 pt2,
Vector2 vc2 
)

    UT2D_pt_int2pt2vc         point = intersection of 2 vectors + 2 Points
    intersection of 2 unlimited lines
   
    Returncodes:
     0 = Lines parallel or zero-length
     1 = OK; ip = intersectionPoint;
   
    see also UT2D_pt_int2vc2pt

int UT2D_pt_int2vc2pt ( Point2 ,
Point2 ,
Vector2 ,
Point2 ,
Vector2  
)

    UT2D_pt_int2vc2pt         point = intersection of 2 vectors + 2 Points
   
    Es wird auch getestet, ob der Schnittpunkt ip sich auf oder ausserhalb des
      vc1 / vc2 befindet.
   
    Returncodes:
     0 = Lines parallel or zero-length
     1 = OK; Schnittpunkt befindet sich auf vc1 und auf vc2.
     2 = OK; Schnittpunkt befindet sich nicht auf vc1 (vc2 wird nicht getestet)
     3 = OK; Schnittpunkt befindet sich auf vc1, nicht auf vc2.

int UT2D_2pt_intciptvc ( Point2 ,
Point2 ,
Point2 ,
double  ,
Point2 ,
Vector2  
)

    UT2D_2pt_intciptvc        intersect Circle - Line (pt+vc)
    
    ip1 immer jener Punkt, 
    
    Return code:
      0 ... normal intersection (2 Ergebnispunkte)
      1 ... circle touches line
      -1 .. no intersection

int UT2D_2pt_intlnci ( Point2 ip1,
Point2 ip2,
Line2 ln,
int  lnMode,
Circ2 ci,
int  ciMode 
)

    UT2D_2pt_intlnci         intersect Line x Circ; both limited or unlimited 
    lnMode 0=limited Line, 1=unlimited Line.
    ciMode 0=limited Circ, 1=unlimited Circ.
    Retcod 1/2  number of intersectionpoints
          -1    no intersectionpoint

int UT2D_2pt_intcici ( Point2 ,
Point2 ,
Point2 ,
double  ,
Point2 ,
double   
)

    UT2D_2pt_intcici                intersect 2 Circles
      
    Return code:
      0 ... normal intersection
      1 ... circles touch each other
      -1 .. circles do not intersect

int UT2D_2pt_int2ci ( Point2 ip1,
Point2 ip2,
Circ2 ci1,
int  ci1Mode,
Circ2 ci2,
int  ci2Mode 
)

    UT2D_2pt_int2ci         intersect Circ x Circ; both limited or unlimited
    ciXMode 0=limited Circ, 1=unlimited Circ.
    Retcod 1/2  number of intersectionpoints
          -1    no intersectionpoint

void UT2D_pt_traptm2 ( Point2 ,
Mat_3x2  ,
Point2  
)

     UT2D_pt_traptm2         einen 2D-Punkt mit 3x2-Matrix transformieren.
    
    - transform point von Refsys ma nach absolut (mit normaler Matrix)
    - transform point von absolut Refsys ima   (mit inverser Matrix)
    
     Ausgabe: ein Punkt im 2D-System mata, gedreht um Center/Vektor in mata.

Point2 UT2D_pt_obj2 ( ObjG2 obj1  ) 

    UT2D_pt_obj2              2D-Obj > 2D-Point
    DO NOT USE

void UT2D_ln_ptpt ( Line2 ,
Point2 ,
Point2  
)

void UT2D_ln_ptvc ( Line2 ,
Point2 ,
Vector2  
)

void UT2D_ln_ln3 ( Line2 ln2,
Line ln3 
)

void UT2D_ln_inv ( Line2 ln1  ) 

void UT2D_ln_4db ( Line2 ln2,
double  xs,
double  ys,
double  xe,
double  ye 
)

UT2D_ln_4db 2D-Line from 4 doubles

Line2 UT2D_ln_obj2 ( ObjG2  ) 

    UT2D_ln_obj2              2D-Obj > 2D-Line
    DO NOT USE

int UT2D_lncoe_ln ( double *  k,
double *  d,
Line2 ln 
)

    UT2D_lncoe_ln       coefficients of 2D Line
    
    Coefficients of 2D-Line equation y = k*x + d, if the line is
    NOT parallel to the y-axis.
    
    IN:
      Line2 *ln    ...  2D-line
    OUT:
      double *k    ...  coefficient k
      double *d    ...  coefficient d
    Returncodes:
      0 = OK
      1 = line parallel y-axis

int UT2D_ln_pts_dmax ( Line2 ln,
int  np,
Point2 ptab,
double  tol 
)

    UT2D_ln_pts_dmax          line <-- points with max. distance of pointTab.
    
    Computation of a 2D-line from a set of 2D-points.
    The line points will be such that their distance is maximal!
    Die am weitesten auseinanderliegenden Punkte suchen, Linie davon machen.
    
    IN:
      int np       ... number of 2D-points
      Point2 *ptab ... 2D-points
      double tol   ... tolerance: minimal desired distance between
                                  2D-line points
    OUT:
      Line2 *ln    ... 2D-line with maximal point distance
    Returncodes:
      1: line exists
      0: no line exists

int UT2D_comp2vc ( Vector2 ,
Vector2 ,
double   
)

    UT2D_comp2vc              compare 2 vectors for parallel and antiparallel
    Vectors must not be normalized.
    tol applies to length 1
    Returns 1 if parallel=yes, else 0.
    if(UT2D_comp2vc(&vc1, &vc2, UT_TOL_pt)) printf("  parallel=yes");

int UT2D_comp2vc_p ( Vector2 ,
Vector2 ,
double   
)

    UT2D_comp2vc_p            compare 2 vectors for parallel
    Compare directions; lenght is normalized (tol applies to length 1)
    Returns 1 wenn parallel, else 0.

int UT2D_ckvc_in2vc ( Vector v1,
Vector v2,
Vector v3 
)

    UT2D_ckvc_in2vc         check if v2 is between v1 and v3
    the opening-angle of v1-v3 is less than 180 deg.
    
    RetCod:
    0 = no; v2 is NOT between v1 and v3
    1 = yes; v2 = between v1 and v3

int UT2D_2parvc_3vc ( double *  ,
double *  ,
Vector2 ,
Vector2 ,
Vector2  
)

    UT2D_2parvc_3vc project end of vec1 along vec2 on vec3
   
    Zu gegebenen Vektoren v1, v2, v3 finden wir Zahlen x und y so,
    dass x * v1 + y * v3 = v2.
   
    dx/dy sind zwischen 0 bis 1; wenn dx=0.5 liegt der Endpunkt von V2
    genau in der Mitte des Parallelogramss V1-V3.
   
     y
      \
       \                        V1,V2,V3 have same startpoint s.
     dy \-----------x
         \         / \
          \       /   \
        V3 \    V2     \
            \   /       \
             \ /         \
              s----------------------------x
                         dx          V1

void UT2D_vc_2db ( Vector2 ,
double  ,
double   
)

void UT2D_vc_angr ( Vector2 ,
double   
)

void UT2D_vc_angrlen ( Vector2 ,
double  ,
double   
)

UT2D_vc_angrlen 2DVector = angle (radians) + Length

void UT2D_vc_2pt ( Vector2 ,
Point2 ,
Point2  
)

void UT2D_vc_2pt3 ( Vector2 vc,
Point p1,
Point p2 
)

UT2D_vc_2pt3 2D-Vector = 3D-Point -> 3D-Point

int UT2D_vc_2pt3_bp ( Vector2 vo,
Point p1,
Point p2,
int  bp 
)

2D-Vector = (3D-Point -> 3D-Point) on Backplane

void UT2D_vc_2ptlen ( Vector2 ,
Point2 ,
Point2 ,
double   
)

UT2D_vc_2ptlen 2D-Vector = 2D-Point -> 2D-Point, set Length

void UT2D_vc_ln ( Vector2 ,
Line2  
)

void UT2D_vc_invert ( Vector2 ,
Vector2  
)

int UT3D_vc_Zup ( Vector v2,
Vector v1 
)

invert Vector if its Z-coord is negative

void UT2D_vc_perpvc ( Vector2 ,
Vector2  
)

void UT2D_vc_perp2pt ( Vector2 ,
Point2 ,
Point2  
)

void UT2D_vc_normalize ( Vector2 ,
Vector2  
)

UT2D_vc_normalize change to length 1

void UT2D_vc_setLength ( Vector2 ,
Vector2 ,
double   
)

    UT2D_vc_setLength                change 2D-Vectorlength
    vco und vci dürfen ident sein.
    use UT2D_vc_multvc with vectors of length=1

void UT2D_vc_mid2vc ( Vector2 ,
Vector2 ,
Vector2  
)

    UT2D_vc_mid2vc            vector = midVector between 2 vectors

void UT2D_vc_merge2vc ( Vector2 vm,
Vector2 v1,
Vector2 v2 
)

UT2D_vc_merge2vc merge 2 vectors vNew = (v1 + v2) / 2

void UT2D_vc_rotangr ( Vector2 ,
Vector2 ,
double   
)

    UT2D_vc_rotangr                  rotate a 2D_vector
    
    (vco and vci can be the same adress)

void UT2D_vc_travcm2 ( Vector2 vo,
Mat_3x2  mata,
Vector2 vi 
)

    UT2D_vc_travcm2          2D-vector transformation (3x2-matrix)
    
    UT2D_vc_travcm2          Author: Thomas Backmeister         9.4.2003
    
    Transformation of a 2D-vector with a 3x2-matrix.
    
    IN:
      Mat_3x2 mata ... transformation matrix
      Vector2 *vi  ... 2D-vector
    OUT:
      Vector2 *vo  ... transformed 2D-vector

double UT2D_angr_ciSec ( double  hc,
double  radc 
)

    UT2D_angr_ciSec           opening angle of Secant of Circ
                              for length of secant see UT2D_len_ciSec

double UT2D_len_ciSec ( double  hSec,
double  rCi 
)

    UT2D_len_ciSec          cmp length of secant from radius + height of secant.
    
                                        Gegeben:
             _  - + -  _                  x = hSec = Hoehe der sekante
           ^      |x     ^                c = rCi  = radius Kreis
         /        |        \
        +---a-----+---a-----+           Gesucht:
                  |       /               a = lSec = halbe Laenge der Sekante
                 b|     /
                  |   /c                b = c - x
                  | /                   a*a + b*b = c*c
                  +                     a = sqrt (c*c - b*b)
                 CirCen

double UT2D_len_cia ( double  rad,
double  ango 
)

double UT2D_len_cir ( double *  angOpe,
Point2 pa,
Point2 pe,
Point2 pc,
double  rad_in 
)

    UT2D_len_cir              length circular arc (pa,pe,pc,rad/dreh)
    
    Laenge immer positiv (angOpe nicht !)
    
    Liefert auch den Oeffnungswinkel angOpe.
    
    Achtung: rad gibt auch die Drehrichtung !
      CCW = rad > 0 ;
      CW  = rad < 0 ;

int UT2D_compPtOnAc ( double  ,
double  ,
double  ,
int   
)

     Testen, ob sich ein Punkt auf einem Arc befindet. Die Winkel
     sind Input (ev. aus UT2D_angr_ptpt).
     Out als RetCod: YES oder NO.

Circ2 UT2D_ci_obj2 ( ObjG2  ) 

UT2D_ci_obj2 2D-Circ = 2D-ObjG

int UT2D_ci_ptrd ( Circ2 ci,
Point2 ptc,
double  rdc 
)

UT2D_ci_ptrd 360-deg 2D-Circ from center, radius

int UT2D_ci_ci3 ( Circ2 ci2,
Circ ci3 
)

UT2D_ci_ci3 2D-Circ = 3D-Circ

int UT2D_ci_2vc2ptrd ( Point2 ,
Point2 ,
Vector2 ,
Point2 ,
Vector2 ,
double   
)

int UT2D_ci_ciptvcrd ( Point2 ,
Point2 ,
double  ,
int  ,
Point2 ,
Vector2 ,
double   
)

int UT2D_ci_ptvcpt ( Point2 ,
double *  ,
Point2 ,
Vector2 ,
Point2  
)

     circ from point and point+tangentVector
    
    Input:
      ps     = Startpunkt des Cir,
      vcs    = Startvektor
      pe     = ein Punkt am Kreis
    Output:
      pc     = Mittelpunkt
      radc   = Radius; ACHTUNG: negativ bei CW

int UT2D_obj_obj3 ( ObjGX oo,
ObjGX oi,
Memspc memSeg 
)

    UT2D_obj_obj3             change 3D-Obj > 2D-Obj (remove Z-val)
    3D-Objekt in 2D-Objekte umwandeln (remove Z-Wert)

ObjG2 UT2D_obj_pt3 ( Point  ) 

UT2D_obj_pt3 change 3D-Point > 2D-Obj

ObjG2 UT2D_obj_ln3 ( Line  ) 

    UT2D_obj_ln3              change 3D-Line > 2D-Obj
    DO NOT USE

ObjG2 UT2D_obj_ci2 ( Circ2  ) 

    UT2D_obj_ci2              change 2D-Circ > 2D-Obj
    DO NOT USE

ObjG2 UT2D_obj_ci3 ( Circ  ) 

    UT2D_obj_ci3              change 3D-Kreis > 2D-Obj
    DO NOT USE

ObjG2 UT2D_obj_cv3 ( Curv  ) 

    UT2D_obj_cv3              change 3D-Curve > 2D-Obj
    Die Indices (der Punktekette) sind in pc.x/pc.y.
    DO NOT USE

int UT2D_void_obj2 ( void *  memObj,
unsigned long *  oSiz,
ObjG2 og2 
)

    change ObjG2-Objekt -> data-Obj
    DO NOT USE

void UT2D_cv_ci360 ( Point2 cv,
int  ptNr,
double  rd,
Point2 ptCen 
)

    Vollkreis --> Polygon.
    insgesamt ptNr Punkt; erster und letzter sind gleich.

int UT2D_cv_ln ( Point2 cv,
int  ptAnz,
Point2 p1,
Point2 p2 
)

    UT2D_cv_ln         Linearstueck -> Polygon.

int UT2D_npt_ci ( Point2 pa,
int  pNr,
Circ2 ci1 
)

    UT2D_npt_ci               circular polygon
    see also UT2D_cv_cin UT2D_pt_rotptangr

int UT2D_cv_ci ( Point2  [],
int *  ,
Point2 ,
Point2 ,
Point2 ,
int   
)

    UT2D_cv_ci                change circle > polygon
    
    nur CCW. Max 64 Segments. Sehr schnell.
    Erstes und letztes Segment haben unterschiedliche Groesse.
    
    the circle is divided into 64/idiv segments.

int UT2D_cv3_linear ( int *  pNr,
Point pTab,
double  tol 
)

    UT2D_cv3_linear              delete unnecesary straight points
    alle Punkte die innerhalb tol liegen aus pTab entfernen.
    ACHTUNG: pTab sind 3D-Punkte; Z ignorieren !

int UT2D_srar_polc ( double *  aro,
int  ptNr,
Point2 pa 
)

    UT2D_srar_polc                         nach Karl Sauer 2004-04-07
    Umlaufsinn (sr=sense of rotation) und Flaeche (ar=area) eines
    geschlossenen 2D-Polygons (polc) berechnen.
    
    ptNr = Anzahl Punkte ohne den letzten == ersten Punkt !
    pa   = PunkteTabelle ohne den letzten == ersten Punkt !
    RetCod = 1 = CCW
            -1 = CW

void UT2D_m2_load ( Mat_3x2  ,
Vector2 ,
Point2  
)

UT2D_m2_load 2D-Refsys from baseDirection, basePoint.

void UT2D_m2_loadtravcm2 ( Mat_3x2  ma,
Vector2 vx,
Vector2 vy,
Vector2 vt 
)

    UT2D_m2_loadtravcm2      load 2D-vector trafo (3x2 matrix)
    
    Load a 2D-vector transformation with 3x2-matrix.
    
    IN:
      Vector2 *vx  ... vector 1
      Vector2 *vy  ... vector 2
      Vector2 *vt  ... translation vector
    OUT:
      Mat_3x2 ma   ... transformation matrix

int UT2D_m2_invtravcm2 ( Mat_3x2  im1,
Mat_3x2  m1 
)

    UT2D_m2_invtravcm2         invert 2D-vector transformation
    
    Inversion of a 2D-vector transformation.
    
    IN:
      Mat_3x2 m1  ... transformation matrix
    OUT:
      Mat_3x2 im1 ... inverse transformation matrix
    Returncodes:
      0 = OK
      1 = no inverse trafo

void UT2D_m2_init_rot ( Mat_3x2  ma,
double  angle 
)

UT2D_m3_init_rot Initialize a 3x2 - matrix with rotation

int UT3D_stru_dump ( int  typ,
void *  data,
char *  txt,
  ... 
)

    UT3D_stru_dump            Testausgabe Geom.Element.
    typ = TYP_FuncInit:  ab nun Ausgabe -> Datei "txt"  (Open File)
    typ = TYP_FuncEnd:   ab nun wiederAusgabe -> term.  (Close File)
    typ = TYP_FuncInit1: ab nun Ausgabe -> FILE "txt"  (File must be open)
    typ = TYP_FuncExit:  ab nun wiederAusgabe -> term.  (does not close File)

double UT3D_len_vc ( Vector  ) 

double UT3D_lenq_vc ( Vector  ) 

int UT3D_bplen_vc ( double *  lnv,
Vector vc1 
)

    UT3D_len1_vc     returns longest vectorpart and its backPlane
    RC = 0 = BCKPLN_YZ = X-part-len
         1 = BCKPLN_XZ = Y-part-len
         2 = BCKPLN_XY = Z-part-len

double UT3D_lenB_2pt ( Point p1,
Point p2 
)

UT3D_lenB_2pt longest dx/dy/dz-distance point-point (fast!)

double UT3D_len_2pt ( Point ,
Point  
)

UT3D_len_2pt distance point - point

double UT3D_lenq_PtPt ( Point p1,
Point p2 
)

    UT3D_lenq_PtPt            square-distance point - point
    alias UT3D_lenq_2pt
    nur Abstand ohne sqrt ausrechen (nur f Vergleichswert)

int UT3D_lenq_PtLn ( double *  lenq,
Point p,
Point p1,
Point p2 
)

    UT3D_lenq_PtLn          minimum (quadr) distance Point-Segment
    give min. distance from Point p to Line p1-p2
    
    see also UT3D_nlenq_3pt

double UT3D_len_ln ( Line  ) 

UT3D_len_ln length of line

double UT3D_len_ci ( Circ ci1  ) 

    UT3D_len_ci               length of circ
    immer pos.

double UT3D_slen_3pt ( Point pt,
Point p1,
Point p2 
)

    UT3D_slen_3pt             signed distance point - point
    
    p1-p2 gives the direction,
    OUT:  signed distance p1-p3
   
       ........ p3
       .        .
       .        .
       .        .
       .        .
      p1--------+------>p2
       <---rc--->

double UT3D_slen_projvcvc ( Vector vc1,
Vector vc2 
)

    3D-Projektionslaenge eines Vektors auf einen anderen Vektor:
    vc2 wird auf vc1 projiziert.
    negativ if Oeffnungswinkel > 90 Grad !?
    
               /|
           V2/  |
           /    |
         /      |
       x--------+------>  V1
       <---rc--->

double UT3D_slenq_projvcvc ( Vector vc1,
Vector vc2 
)

    Quadr.3D-Projektionslaenge eines Vektors auf einen anderen Vektor:
    vc2 wird auf vc1 projiziert.
    negativ if Oeffnungswinkel > 90 Grad !
    ACHTUNG: sqrt von einem negativen Wert geht ned !!!!
    
    see also UT3D_ptDi_intptvcpln
    
    
               /|
           V2/  |
           /    |
         /      |
       x--------+------>  V1
       <---rc--->

double UT3D_slenq_2ptvc ( Point p1,
Point p2,
Vector vc 
)

    UT3D_slenq_2ptvc     Quadr. Laenge pt-pt in Richtung vec (m. Vorzeichen !)
    die wahre Laenge ist sqrt(fabs(lq))*DSIGN(lq)
    
    see also UT3D_slenq_projvcvc
   
               p2
               /|
             /  |
           /    |
         /      |
      p1--------+------>  VC
       <---rc--->

double UT3D_nlen_projvcvc ( Vector vc1,
Vector vc2 
)

    3D-Normalabstand eines Vektors auf einen anderen Vektor:
    vc2 wird auf vc1 projiziert.
    
                     _
               /|    |
           V2/  |    |
            /  vc3  l3=rc
           /    |    |
         /      |    |
       x--------+------------> V1
       |---v1x--|

double UT3D_slen_2ptvc ( Point p1,
Point p2,
Vector vc 
)

    UT3D_slen_2ptvc     Laenge pt-pt in Richtung vec (m. Vorzeichen !)
    
    Wenn vc normiert ist (Laenge 1) dann genuegt Skalarprodunkt (UT3D_acos_2vc)
    
    p1-vc definieren eine Plane;  p1=Origin, vc=Normalvektor.
    p2 auf die Plane p1-vc projizieren (ergibt ps); die Laenge p2-ps liefern.
   
      p2....... p2
       .        .
       .        .
       .        .
       .        .
      p1--------+------>  vc
       <---rc--->

double UT3D_slen_ptpl ( Point pt,
Plane pl 
)

    UT3D_slen_ptpl     signed distance point - plane
    
    Value is positive  point ON same side as plane normal vector
    Value is negativ   point on OPPOSITE side of plane normal vector

double UT3D_nlen_2ptvc ( Point p1,
Point pv,
Vector vc 
)

    UT3D_nlen_2ptvc     Laenge der Normalen auf Vektor
    2003-11-07: p1-p2 vertauscht! RF.
    
    p1 auf pv-vc projizieren (ergibt ps); die Laenge p1-ps liefern.
    (p1 -ps ist normal auf vc)
    
               X p1
               |
            rc |
               |
       pv------+-------->  vc
    
    see also UT3D_pt_ck_ptvc UT3D_pt_ck_onLine UT3D_nlen_2ptvc UT3D_pt_projptptvc

double UT3D_nlen_3pt ( Point p1,
Point p2,
Point p3 
)

    UT3D_nlen_3pt       Laenge der Normalen von p2 auf Line p1-p3
    p2 liegt in der Mitte; p1-p3 ist die Linie.
    p2 wird auf die Linie projiziert; der Abstand ist der Rueckgabewert.
    
               X p2
               |
            rc |
               |
       p1------+--------p3

int UT3D_parpt_objpt ( double *  po,
Point pti,
int  oTyp,
void *  oDat 
)

    UT3D_parpt_objpt      give parameter of point on curve
    ACHTUNG: liefert (auch fuer B-Splines) immer Werte zwischen 0-1 !

int UT3D_parpt_3pt ( double *  pl,
Point ptx,
Point pl1,
Point pl2 
)

    UT3D_parpt_3pt    parameter of distance of point ptx on line pl1-pl2
   
    pl ist zwischen 0 bis 1; wenn pl=0.5 liegt ptx
    genau in der Mitte von pl1-pl2
   
   
                   ptx
                    X
                   /|
                  / |
                 /  |
                /   |
               /   .|
              X-----|------------X
            pl1     pl=0.4       pl2
    RetCodes:
       0  OK
      -1  v1-v2 aufeinander Normal; pl = 0.

int UT3D_parpt_ptvc ( double *  pl,
Point ptx,
Point pt1,
Vector vc1 
)

    UT3D_parpt_ptvc    parameter of distance of point ptx on line pt1-vc1
   
    pl ist zwischen 0 bis 1; wenn pl=0.5 liegt ptx
    genau in der Mitte von pl1-pl2
   
   
                   ptx
                    X
                   /|
                  / |
                 /  |
                /   |
               /   .|
              X-----|------------>
            pt1     pl=0.4       vc1
    RetCodes:
       0  OK
      -1  v1-v2 aufeinander Normal; pl = 0.

double UT3D_parpt_lnbp ( Point pti,
Line ln1,
int  bp 
)

    UT3D_parpt_lnbp          parameter of point on line (via 2D,BackPlane)
    bp = Berechnungsebene BackPlane ex UT3D_bp_vcz

double UT3D_parpt_cipt ( Point pti,
Circ ci1 
)

    UT3D_parpt_ci             parameter of point on circ
    par = gesamtlaenge_circ / laenge_von_p1_bis_pti
    laenge_circ = radius * Angle

int UT3D_pt_ck_npt ( Point p0,
Point pTab,
int  pNr,
double  tol 
)

    UT3D_pt_ck_npt            compare point / points
    check if p0 ist identical with one of the points of pTab
    Retcode:
    irc = -1    all points have a distance > tol
    irc >= 0    index of (first) identical point;

int UT3D_ipt_cknear_npt ( Point p0,
Point ptTab,
int  ptNr 
)

UT3D_ipt_cknear_npt return index of nearest Point from n points

int UT3D_ipt_ckfar_npt ( Point p0,
Point ptTab,
int  ptNr 
)

UT3D_ipt_ckfar_npt return index of farest Point from n points

int UT3D_ipt_cknearn_npt ( Point p0,
Point ptTab,
int  ptNr,
int  distNr 
)

    UT3D_ipt_cknearn_npt        return index of n-nearest Point from n points
    distNr=0: return index of nearest point;
    distNr=1: return index of 2.nearest point ...

int UT3D_ipt2_nptvc ( Point pt1,
Point pt2,
int  mode,
Point pta,
int  iNr,
Vector vc 
)

    ind. of outermost points in direction vc of n pt's
    mode   0 = start, >0 = resume
    
    see UT3D_slen_2ptvc UT3D_slen_ptpl

int UT3D_pt_ck_onel ( Point pt,
CurvElli el 
)

    UT3D_pt_ck_onel     check if point lies on an (full) ellipse
    
    Check if a point lies on an (full) ellipse.
    It is assumed that the point lies in the plane of the ellipse.
    
    IN:
      Point *pt    ... 3D-point
      CurvElli *el  ... 3D-ellipse
    OUT:
    Returncodes:
      0 = point is not on the ellipse
      1 = point is on the ellipse
     -1 = internal error

int UT3D_pt_ck_ptvc ( Point pt,
Point pl,
Vector vl,
double  tol 
)

    UT3D_pt_ck_ptvc     check if point is on unlimited line (point-vector)
    RC = -1   NO; Point pt is outside Line pl1-pl2
    RC =  0   Yes; pt is nearer than tol to line pl1-pl2
    
    see also UT3D_pt_ck_ptvc UT3D_pt_ck_onLine UT3D_nlen_2ptvc UT3D_pt_projptptvc
      UT3D_pt_projptln 

int UT3D_pt_ck_2pt ( Point pt,
Point pl1,
Point pl2,
double  tol 
)

    UT3D_pt_ck_2pt     check if point is on unlimited line (2 points)
    RC = -1   NO; Point pt is outside Line pl1-pl2
    RC =  0   Yes; pt is nearer than tol to line pl1-pl2
    
    see UT3D_pt_projptptvc UT3D_pt_projptln UT3D_pt_ck_onLine

int UT3D_pt_ck_onLine ( Point p1,
Point p2,
Point p3,
double  tol 
)

    liegt p3 auf der Linie p1-p2 ?      (Tests mit UT_TOL_pt)
    RC = -1   NO; Point outside Line p1-p2
    RC =  0   Yes; p3=p1; po=p1.
    RC =  1   Yes; po between p1-p2
    RC =  2   Yes; p3=p2; po=p2.
    
    see also UT3D_pt_ck_ptvc UT3D_pt_ck_onLine UT3D_nlen_2ptvc UT3D_pt_projptptvc
      UT3D_pt_projptln 

int UT3D_pt_ck_inLine ( Point p1,
Point p2,
Point p3,
double  tol 
)

    UT3D_pt_ck_inLine      check point on line segment
    
    Check if a 3. point lies inside the line segment defined by two points.
    It is assumed that the point is ON the line defined by the two points.
   
    IN:
      Point p1   ... point 1 defining the line segment
      Point p2   ... point 2 defining the line segment
      Point p3   ... point to check
      double tol ... tolerance for point to ly inside line segment (>0)
    OUT:
    Returncodes:
      0 = the point lies outside the segment
      1 = the point lies inside the segment

int UT3D_pt_ck_on_pta ( Point pTab,
int  ptNr,
Point pt1,
double  tol 
)

    testen, ob pt1 AUF Polygon liegt
    RetCod  0 pt1 is on polygon ptab
    RetCod -1 pt1 is not on polygon ptab

int UT3D_pt_ck_in2pt ( Point p1,
Point p2,
Point p3,
double  tol 
)

    check if point p3 is inside box of points p1-p2
    Returncodes:
     -1 = the point lies outside the box
      0 = the point lies inside the segment

int UT3D_pt_ck_inCirc ( Circ ci1,
Point pt1,
double  tol 
)

    check if point is on circ segment
    ACHTUNG: Radius und ob in gleicher Plane wird nicht mehr getestet !
             Es wird nur geprueft ob zwischen Start- und Endpunkt.
    RC = -1   NO; Point outside Line p1-p2
    RC =  0   Yes; p3=p1; po=p1.
    RC =  1   Yes; po between p1-p2
    RC =  2   Yes; p3=p2; po=p2.

int UT3D_pt_ck_inSph ( Point pt,
Point ps,
double  rs 
)

    UT3D_pt_ck_inSph              check if point is inside sphere
   
    irc:
     1 = YES point lies inside
     0 = --- point touches
    -1 = NO  point lies outside

void UT3D_swap2pt ( Point p1,
Point p2 
)

int UT3D_comp4pt ( Point p1a,
Point p1e,
Point p2a,
Point p2e,
double  tol 
)

    UT3D_comp4pt              compare 4 points
    Ob 2 der 4 Punkte zusammenpassen (ob 2 Lines einen gemeinsamen Punkt haben).
    Es wird nur der Abstand entlang der Hauptachsen getestet !
    
       rc=0: keine Verbindung
       rc=1: bei El. liegen richtig.
       rc=2: Obj 1 verkehrt
       rc=3: Obj 2 verkehrt
       rc=4: Obj 1 und Obj 2 verkehrt
    
    Retcode 0 = Abstand aller Punkte > tol
            1 = Abstand (p1e - p2a) < tol  (beide Obj. liegen korrekt)
            2 = Abstand (p1a - p2a) < tol  (Obj 1 verkehrt)
            3 = Abstand (p1e - p2e) < tol  (Obj 2 verkehrt)
            4 = Abstand (p1a - p2e) < tol  (Obj 1 und 2 verkehrt)

int UT3D_compptpl ( Point ,
Plane  
)

Point UT3D_pt_pt2 ( Point2  ) 

UT3D_pt_pt2 3D-Point = 2D-Point

Point UT3D_pt_pt2z ( Point2 pt20,
double  zVal 
)

UT3D_pt_pt2z 3D-Point = 2D-Point; Z-value = zVal

void UT3D_pt_3db ( Point ,
double  ,
double  ,
double   
)

UT3D_pt_3db Point < 3 doubles (x, y, z)

void UT3D_pt_txt ( Point ,
char *   
)

UT3D_pt_txt Point from text

void UT3D_pt_mid2pt ( Point ,
Point ,
Point  
)

UT3D_pt_mid2pt midpoint between 2 points

int UT3D_pt_mid_pta ( Point pto,
Point pTab,
int  ptNr 
)

    arithm. Mittelwert der Punktetabelle pTab
      (alle Punktcoord addieren dann durch PunkteAnzahl divid.)

void UT3D_pt_midci ( Point ,
Circ  
)

UT3D_pt_midci midpoint of a circ

void UT3D_pt_opp2pt ( Point ,
Point ,
Point  
)

    UT3D_pt_opp2pt                  opposite point (p1 = center)
    p1 und po duerfen ident sein.

int UT3D_pt_oppptptvc ( Point po,
Point pi,
Point pl,
Vector vl 
)

UT3D_pt_oppptptvc point opposite line (= 180 deg rot.)

int UT3D_2pt_oppptvclen ( Point ,
Point ,
Point ,
Vector ,
double   
)

    UT3D_2pt_oppptvclen       2 opposite points (center, vector, dist)
    pc is center, p1 is direction vc1 from pc, p2 in reverse direction.

void UT3D_pt_addpt ( Point ,
Point  
)

void UT3D_pt_add2pt ( Point ,
Point ,
Point  
)

void UT3D_pt_traptvclen ( Point po,
Point pi,
Vector vc,
double  dist 
)

    UT3D_pt_ptvclen          transl. point into dir vc dist. lenv
    Move point into direction vc with distance dx.
    po kann mit pi ident sein.

void UT3D_pt_traptvc1len ( Point po,
Point pi,
Vector vc,
double  dist 
)

====.==================================================================

 UT3D_pt_traptvc1len          transl. point into dir vc dist.lenv (vcLen=1)
 Vector has Length 1.; Point = basePoint + (vec * len)

void UT3D_pt_trapt2vc ( Point po,
Point pi,
Vector vc1,
Vector vc2 
)

    UT3D_pt_trapt2vc        transl. point into 2 directions
    po kann mit pi ident sein.

void UT3D_pt_trapt2vc2len ( Point ,
Point ,
Vector ,
double  ,
Vector ,
double   
)

    UT3D_pt_trapt2vc2len        transl. point into 2 directions (2 len's)
    Move point into direction vc with distance dx.
    po kann mit pi ident sein.

void UT3D_pt_trapt3vc3len ( Point po,
Point pi,
Vector vx,
double  dx,
Vector vy,
double  dy,
Vector vz,
double  dz 
)

    UT3D_pt_trapt3vc3len        transl. point into 3 directions (3 len's)
    Move point into direction vx,vy,vz with distance dx, dy dz.
    po kann mit pi ident sein.

void UT3D_pt_traptptlen ( Point po,
Point pi,
Point pDir,
double  lenv 
)

    UT3D_pt_traptptlen        transl. point into dir pDir dist. lenv
    Move point into direction pi->pDir with distance lenv.
    po kann mit pi ident sein.

void UT3D_pt_trapt2pt ( Point po,
Point pi,
Point p1,
Point p2 
)

UT3D_pt_trapt2pt transl. point distance p1 -> p2

int UT3D_pt_tracirlen ( Point pto,
Point pti,
Circ cii,
double  clen 
)

    UT3D_pt_tracirlen         transl. point circular length
    
      CCW = rad > 0 ;
      CW  = rad < 0 ;

int UT3D_pt_rotptptangr ( Point pto,
Point ptc,
Point pti,
double *  ar 
)

UT3D_pt_rotptptangr rotate pti around ptc/Z-Axis

void UT3D_pt_rotptptvcangr ( Point pto,
Point pti,
Point ptc,
Vector vz,
double  angr 
)

    Punkt pti um die Achse pta/vca um angr weiterdrehen
    angr = -2Pi bis +2Pi.
    ACHTUNG: vca muss normiert sein !!

int UT3D_pt_rotptm3 ( Point p2,
Point p1,
Mat_4x3  ma 
)

Rotate Point (prepare with UT3D_m3_inirot)

int UT3D_pt_rotciangr ( Point pto,
double  angr,
Circ ci1 
)

    Kreisstartpunkt p1 um die Achse vz um angr weiterdrehen
    pc und p1 muesssen am gleichen Kreis liegen (sonst ev 2 x UT3D_vc_perp2vc)
    angr = -2Pi bis +2Pi.
    angr=0: pto = ln1.p1;
    angr=1: pto = ln1.p2;

int UT3D_pt_projpt2pt ( Point pp,
double *  len,
Point pt,
Point p1,
Point p2 
)

    UT3D_pt_projpt2pt         point = project point pt to line p1+p2
    
    retcod 0=OK, 1=pt is on line, 2=Inputerror (vl too short)
    
    see also UT3D_pt_ck_ptvc UT3D_pt_ck_onLine UT3D_nlen_2ptvc UT3D_pt_projptptvc

int UT3D_pt_projptln ( Point ,
double *  ,
Point ,
Line  
)

    UT3D_pt_projptln                        point = project point to line
    
    retcod 0=OK, 1=pt is on line.

int UT3D_pt_projptci ( Point pto,
Point pt1,
Circ ci1 
)

UT3D_pt_projptci point = project point to circ

int UT3D_pt_projptptvc ( Point pp,
double *  len,
Point pt,
Point pl,
Vector vl 
)

    UT3D_pt_projptptvc                 point = project point pt to line pl+vl
    
    pl - vl gives a line, pt is projected onto this line.
    
               X pt
               |
            len|
               |
       pl------+--------vl
               pp
    
    retcod 0=OK, 1=pt is on line, 2=Inputerror (vl too short)
    
    E001 vl too short
    
    see also UT3D_pt_ck_ptvc UT3D_pt_ck_onLine UT3D_nlen_2ptvc UT3D_pt_projptptvc
      UT3D_pt_projptln 

int UT3D_pt_projptel ( int *  numpe,
Point pe,
CurvElli ell,
Point pt 
)

    UT3D_pt_projptel               proj PT -> CRV-Ellipse
    
    Project a point onto an ellipse.
    All possible cases are considered!
    
    IN:
      CurvElli *ell ... a 3D - ellipse
      Point *pt    ... a 3D - point
    OUT:
      int *numpe   ... number of points     (0-4 points out)
      Point *pe    ... points on the ellipse all having the same minimal 
                       distance to the input point
    Returncodes:
      0 = OK
      1 = input error

int UT3D_pt_projptbspl ( int *  nxp,
Point ptab,
double *  ttab,
Memspc memSeg1,
CurvBSpl bspl,
Point pt 
)

int UT3D_pt_projptptnvc ( Point po,
Point pi,
Point plo,
Vector plz 
)

UT3D_pt_projptptnvc project point pt to plane from Origin, Z-vec

void UT3D_pt_projptpl ( Point ,
Plane ,
Point  
)

UT3D_pt_projptpl point = project point to plane

see UPRJ_app_pt

int UT3D_pt_int2pt2vc ( Point ip1,
Point ip2,
double *  dist,
Point ptu,
Vector vcu,
Point ptv,
Vector vcv 
)

    UT3D_pt_int2pt2vc     intersect 2 rays
    
    ip1 liegt auf ray1 (ptu/vcu)
    ip2 liegt auf ray2 (ptv/vcv)
    
    Returncodes:
    0 = Lines parallel or zero-length
    1 = OK; dist gives the minimum distance.
    2 = OK; lines are crossing, ip1 = ip2, dist = 0.

int UT3D_pt_intptvcplx ( Point px,
Point pl,
Vector vl,
double  plx 
)

    UT3D_pt_intptvcplx              intersect point/vector with Y-Z-plane
    irc    0  OK px = Schnittpunkt
    irc   -1  kein Schnittpunkt (vl parallel pln)

int UT3D_pt_intptvcply ( Point px,
Point pl,
Vector vl,
double  ply 
)

    UT3D_pt_intptvcply              intersect point/vector with X-Z-plane
    irc    0  OK px = Schnittpunkt
    irc   -1  kein Schnittpunkt (vl parallel pln)

int UT3D_pt_intptvcplz ( Point px,
Point pl,
Vector vl,
double  plz 
)

    UT3D_pt_intptvcplz              intersect point/vector with X-Y-plane
    irc    0  OK px = Schnittpunkt
    irc   -1  kein Schnittpunkt (vl parallel pln)

int UT3D_pt_intptvcln ( Point ip1,
Point ip2,
double *  dist,
Point pt1,
Vector vc1,
Line ln2 
)

    UT3D_pt_intptvcln     intersect ray - lineSegment
    
    ip1 liegt auf ray (pt1/vc1)
    ip2 liegt auf Line ln2
    
    Returncodes:
     0 = Lines parallel or zero-length
     1 = OK; dist gives the minimum distance.
     2 = OK; lines are crossing, dist=0, ip1=ip2, but outside lineSegment.
     3 = OK; lines are crossing, dist=0, ip1=ip2 and inside lineSegment.

int UT3D_pt_intptvcxpln ( Point pti,
Point ptl,
Point ptpl,
Vector vcpl 
)

    UT3D_pt_intptvcxpln      intersect line(x-parallel) X plane (pt-vc)
    Input:
      ptl    Point on line (direction of line = 1,0,0)
      ptpl   Point in plane
      vcpl   perpendicular Vector to plane (muss nicht normiert sein);
    Returncodes:
      0 = OK
      1 = no intersection (parallel)
   
    See also UT3D_ln_int2pl UT3D_ptvc_int2pl UT3D_pt_intptvcpl

int UT3D_pt_intptvcypln ( Point pti,
Point ptl,
Point ptpl,
Vector vcpl 
)

    UT3D_pt_intptvcypln      intersect line(y-parallel) X plane (pt-vc)
    Input:
      ptl    Point on line (direction of line = 0,1,0)
      ptpl   Point in plane
      vcpl   perpendicular Vector to plane (muss nicht normiert sein);
    Returncodes:
      0 = OK
      1 = no intersection (parallel)
   
    See also UT3D_ln_int2pl UT3D_ptvc_int2pl UT3D_pt_intptvcpl

int UT3D_pt_intptvczpln ( Point pti,
Point ptl,
Point ptpl,
Vector vcpl 
)

    UT3D_pt_intptvczpln      intersect line(z-parallel) X plane (pt-vc)
    Input:
      ptl    Point on line (direction of line = 0,0,1)
      ptpl   Point in plane
      vcpl   perpendicular Vector to plane (muss nicht normiert sein);
    Returncodes:
      0 = OK
      1 = no intersection (parallel)
   
    See also UT3D_ln_int2pl UT3D_ptvc_int2pl UT3D_pt_intptvcpl

int UT3D_pt_intptvcsph ( Point pa,
Point pl,
Vector vl,
Point ps,
double  rs 
)

    UT3D_pt_intlnsph          intersect unlimited line / sphere
    irc   -1   Error (vl too short)
    irc    0   pl-vl outside sphere
    irc    1   touches - OK - 1 point out
    irc    2   OK, 2 points out. Richtung entspricht vl.

int UT3D_pt_int2ln ( Point ,
Point ,
double *  ,
Line ,
Line  
)

    UT3D_pt_int2ln            intersect 2 unlimitedLines; get 2 points & dist.
   
    IN:
      Line *ln1    ... line 1
      Line *ln2    ... line 2
    OUT:
      Point *ip1   ... point on line 1;
                       NULL: do not compute.
      Point *ip2   ... point on line 2
      double *dist ... minimal distance between ip1 and ip2
                       NULL = do not compute.
      Returncodes:
       -1 = Lines parallel or zero-length
        0 = OK; dist gives the minimum distance.
        1 = OK; distance (ip1-ip2) is less than UT_TOL_pt

int UT3D_pt_intperp2ln ( Point po,
Point p1,
Vector v1,
Point p2,
Vector v2 
)

    UT3D_pt_intperp2ln            inters ln2 with perp.plane to ln1
    Plane geht durch p1 normal auf v1; Schnittpunkt liegt auf p2/v2.
    po-p1 hat rechten Winkel zu p1-v1.
    see UT3D_pt_intptvcpl; pl.po=p1; pl.vz=v1; pt=p2, vln=v2.
    Returncodes:
      0 = vc parallel to plane; Error
      1 = OK;
     -1 = p1 und p2 ident; po = p1.

int UT3D_pt_intlnci__ ( int *  np,
Point  xp[],
Line ln,
Circ ci1 
)

    UT3D_pt_intlnci__     intersect line and circle
    
    Intersection of line and circle.
    The line need NOT lie in the plane of the circle.
    
    IN:
      Line *ln    ... 3D-line
      Circ *ci    ... 3D-circle
    OUT:
      int *np     ... number of intersection points (0,1,2)
      Point xp[]  ... array of intersection points
    Returncodes:
      0 = OK
      1 = no intersection

int UT3D_pt_intlnci_p ( int *  np,
Point  xp[],
Line ln,
Circ ci1 
)

    UT3D_pt_intlnci_p         intersection LN-CIR (gives 0/1/2 points)
    
    Intersection of 3D-line with 3D-circle.
    The line must lie in the plane of the circle. !!
    
    IN:
      Line *ln   ...  3D-line
      Circ *ci1   ...  3D-circle
    OUT:
      int *np    ...  number of intersection points (0,1,2)
      Point xp[] ...  array of intersection points
    Returncode:
      0 = OK
      1 = no intersection; xp[0]=pc projected -> ln

int UT3D_pt_intlnsph ( Line ln1,
Point ps,
double  rs 
)

    UT3D_pt_intlnsph          intersect limited line / sphere
    irc  -1  Line ganz ausserhalb

int UT3D_pt_intcici ( int *  np,
Point  xp[],
Circ ci1,
Circ ci2 
)

    UT3D_pt_intcici            intersect CIR CIR (gives 0/1/2 points)
    
    Returncode:
      0  = OK
      -1 = no intersection

int UT3D_pt_intplnln ( Point ip,
double *  dist,
Plane pl,
Line ln 
)

    UT3D_pt_intplnln         intersect LineSegment X Plane
    Von pl wird nur p und vz benutzt.
    
    Returncodes:
     -1 = LineSegment outside Plane
      0 = vc parallel to plane
      1 = OK; intersecting ...
      2 = ip = ln.p1
      3 = ip = ln.p2

int UT3D_pt_intlnpl ( Point ,
Plane ,
Line  
)

    UT3D_pt_intlnpl           point = intersection of line - plane
    
    Returncodes:
      0 = line parallel to plane
      1 = OK;

int UT3D_pt_intlnpl1 ( Point ,
double *  ,
Point ,
Point ,
double  ,
double   
)

    intersect line - plane
    OUT
      pi      Intersectionpoint
      dl      Faktor Abstand p1 - pi - p2; 0.5 ist genau in der Mitte.
    IN
      p1, p2  die Linie, die geschnitten wird
      dn1 dn2 der Normalabstand der Punkte p1 p2 von der Schnittebene.
              (get dn1 from UT3D_slen_ptpl)
   
    pi liegt auf der Geraden p1;p2.
    Die Plane wird ebenfalls als (hor-) Linie betrachtet.
    pi ist intersection dieser beiden Lines.
    dn. sind die NormalAbstaende von p1,p2 auf die Plane (=hor.Linie).

int UT3D_pt_intptvcpln ( Point pti,
Point ptl,
Vector vcl,
Point ptpl,
Vector vcpl 
)

    UT3D_pt_intptvcpln       intersect line-plane (pt-vc  pt-vc)
    Line durch Point + Vektor
    Plane durch Nullpunkt + Normalvektor.
    pl2vz muss nicht normiert sein;
      See also UT3D_ln_int2pl UT3D_ptvc_int2pl UT3D_pt_intptvcpl
    Returncodes:
      0 = OK
      1 = no intersection (parallel)

int UT3D_pt_intplci ( int *  np,
Point  xp[],
Plane pl,
Circ ci 
)

    UT3D_pt_intplci           intersect PLN CIR (gives 0/1/2 points)
    
   
    Intersection of plane and 3D-circle.
    
    IN:
      Plane *pl  ...  a plane
      Circ  *ci  ...  a circle
    OUT:
      int *np    ...  number of intersection points (0,1,2)
      Point xp[] ...  array of intersection points
    Returncode:
      0 = OK
      1 = no intersection (parallel planes)
      2 = no intersection (plane passes circle) xp[0]=cp.pc proj -> pl

int UT3D_pt_intcidpln ( int *  np,
Point  xp[],
Point pc,
Point p1,
Vector vz,
double  dx 
)

    UT3D_pt_intcidpln            intersect circ / perpend.offsetPlane
    Ein Kreis (pc=Mittelpunkt, p1=Punkt am Kreis, vz=Achse)
    dx ist der Abstand der Plane vom pc.
    Eine Plane normal zur Kreisflaeche im Abstand von dx schneidet den Kreis.
      Z-Vektor der Plane ist pc-p1; der vz ist der X-vec der Plane.
      Origin der Plane ist ppo (Vom pc in Richtg p1 Abstand dx)
    Output: die beiden Schnittpunkte mit der Plane.
      np   Anzahl Schnittpunkte (0/1/2)

int UT3D_pt_intptvcpl_ ( Point ,
Plane ,
Point ,
Vector  
)

    UT3D_pt_intptvcpl_         point = intersection of pt / vc  - plane
    Von pl wird nur p und vz benutzt.
    
    Returncodes:
      0 = vc parallel to plane
      1 = OK;

int UT3D_pt_intlnel__ ( int *  np,
Point  xp[],
Line ln,
CurvElli el 
)

    UT3D_pt_intlnel__     intersect line and ellipse
    
    Intersection of line and ellipse.
    The line need NOT lie in the plane of the ellipse.
    
    IN:
      Line *ln     ... 3D-line
      CurvElli *el  ... 3D-ellipse
    OUT:
      int *np      ... number of intersection points (0,1,2)
      Point xp[]   ... array of intersection points
    Returncodes:
      0 = OK
      1 = no intersection
     -1 = ellipse degenerated

int UT3D_pt_intlnel_p ( int *  np,
Point  xp[],
Line ln,
CurvElli el 
)

    UT3D_pt_intlnel_p           intersection LN-ELL (gives 0/1/2 points)
    
            !! The line must lie in the plane of the ellipse. !!
    
    Intersection of 3D-line with 3D-ellipse.
    !! The line must lie in the plane of the ellipse. !!
    
    IN:
      Line *ln    ...  3D-line
      CurvElli *el ...  3D-ellipse
    OUT:
      int *np    ...  number of intersection points (0,1,2)
      Point xp[] ...  array of intersection points
    Returncodes:
      0 = OK
      1 = no intersection
     -1 = ellipse degenerated

int UT3D_pt_ipl_2ptpt2 ( Point pi3,
Point p1,
Point p2,
Point2 pi2 
)

    UT3D_pt_ipl_2ptpt2        interpolate PointPosition for 2D-point
    Input:   2 3D-points and 1 2D-point (between the 3D-pt's; z-coord missing).
    Output:  3D-Point with interpolated Z-coord.
   
    see also UTP_param_p0p1px UTP_px_paramp0p1px

int UT3D_pt_mirptpl ( Point pto,
Point pti,
Plane pln 
)

    mirror point in plane
    pt auf die Pln projiz; opposite Punkt = gespiegelter pt.

int UT3D_pt_tangptci ( Point po1,
Point po2,
Point pt1,
Circ ci1 
)

    UT3D_pt_tangptci          tangent from point to circ
    RetCod: Nr of solutions; -1,1,2.
    see UT3D_vc_tangci UT3D_vc_tangcipt

int UT3D_pt_elfoc ( Point fp1,
Point fp2,
CurvElli el 
)

    UT3D_pt_elfoc     focal points of ellipse
    
    Computation of the focal points of an ellipse.
    
    IN:
      CurvElli *el  ... 3D-ellipse
    OUT:
      Point *fp1   ... focal point 1 (in direction of main axis)
      Point *fp2   ... focal point 2
    Returncodes:
      0 = OK
     -1 = input error

int UT3D_pt_evparln ( Point pto,
double  lpar,
Line ln1 
)

    UT3D_pt_evparln           evaluate param.point on line
    einen Punkt auf Line ln1 errechnen;
    lpar = Abstandswert 0 - 1.
    lpar=0: pto = ln1.p1;
    lpar=1: pto = ln1.p2;

int UT3D_pt_evparci ( Point pto,
double  lpar,
Circ ci1 
)

    UT3D_pt_evparci           evaluate param.point on circ
    einen Punkt auf Circ ci1 errechnen;
    lpar = Abstandswert 0 - 1.
    lpar=0: pto = ci1.p1;
    lpar=1: pto = ci1.p2;

int UT3D_pt_m3 ( Point pto,
Mat_4x3  ma 
)

UT3D_pt_m3 copy origin out of 4x3-matrix

void UT2D_pt_traptm3 ( Point2 p2,
Mat_4x3  mata,
Point2 p1 
)

    UT2D_pt_traptm3           apply transformation to point (from 4x3-matrix)
    p2 und p1 duerfen ident sein

void UT3D_pt_traptm3 ( Point ,
Mat_4x3  ,
Point  
)

    UT3D_pt_traptm3           apply transformation to point (from 4x3-matrix)
    
    p2 und p1 duerfen ident sein
   
           VX             VY            VZ        Nullpunkt
   
     [0][0]=vx.dx   [0][1]=vy.dx  [0][2]=vz.dx   [0][3]=o.x
     [1][0]=vx.dy   [1][1]=vy.dy  [1][2]=vz.dy   [1][3]=o.y
     [2][0]=vx.dz   [2][1]=vy.dz  [2][2]=vz.dz   [2][3]=o.z
   
    Mat via Adresse:
    printf("    vz=%f,%f,%f\n",(*mata)[0][2],(*mata)[1][2],(*mata)[2][2]);

void UT3D_pt_traptm4 ( Point p2,
Mat_4x4  ma,
Point p1 
)

    UT3D_pt_traptm4           apply transformation to point (from 4x4-matrix)
     p1 in p2 out.

int UT2D_ptvc_ck_int2pt ( int  mode,
Point2 p1s,
Vector2 v1,
Point2 p2s,
Point2 p2e 
)

    UT2D_ptvc_ck_int2pt       check if Line|Ray Pt-Vec intersects Line Pt-Pt
    Line = both sides limited; Ray = one side unlimited.
   
    Input:
      mode = 0  p1s-v1: both sides unlimited; p2s-p2e: both sides limited.
      mode = 1  p1s-v1: one side unlimited; p2s-p2e: both sides limited.
   
    Returncodes:
    -1 = no intersection between unlimited Line p1s-v1 and segment p2s-p2e.
     0 = OK; lines intersect.
     1 = p1s-v1 goes tru p2s
     2 = p1s-v1 goes tru p2e
     3 = p1s-v1 and p2s-p2e are parallel; no intersection-checks yet !
     4 = p1s lies exact on p2s-p2e.     (ONLY if mode=1)
     5 = p1s and p2s are equal          (ONLY if mode=1)
     6 = p1s and p2e are equal          (ONLY if mode=1)

int UT3D_ptvc_int2pl ( Point pt,
Vector vc,
Plane pl1,
Plane pl2 
)

    UT3D_ptvc_int2pl          point/vector = intersection of 2 planes
    
    Retcodes:
      1 - OK
      0 - no intersection; planes parallel
    Intersectionpoint is nearest point to both origins.

int UT3D_ptvc_int2pln ( Point pti,
Vector vci,
Point pl1pt,
Vector pl1vz,
Point pl2pt,
Vector pl2vz 
)

    UT3D_ptvc_int2pln       point/vector = intersection of 2 planes
    Planes durch Nullpunkt und Normalvektoren.
    pl2vz muss nicht normiert sein;
    vci (out) ist normiert.
      See also UT3D_ln_int2pl UT3D_ptvc_int2pl UT3D_pt_intptvcpl
    Returncodes:
      0 = OK
      1 = no intersection (parallel planes)

int UT3D_ptvc_ox ( Point pta,
Vector vca,
ObjGX oxi 
)

make PT+VC for Axis from PT|LN|PLN

double UT3D_angr_3pt ( Point p1,
Point pc,
Point p2 
)

UT3D_angr_3pt angle between 3 points

double UT3D_angr_2vc ( Vector ,
Vector  
)

UT3D_angr_2vcd angle between two vec's (always 0 <= PI)

double UT3D_angr_3vc ( Vector vz,
Vector v1,
Vector v2 
)

    UT3D_angr_3vc     Winkel zwischen den 2 Vektoren mit Z-Vektor
    Bereich von 0 bis -Pi
    vz ist der Z-Vektor des aktiven Achsensystems.
    see UT3D_angr_2vc
    see UT3D_angr_cipt

double UT3D_angr_ci ( Circ ci1  ) 

     UT3D_angr_ci              opening angle of Circ
    ACHTUNG: nicht fuer Vollkreise !

int UT3D_2angr_vc ( double *  az,
double *  ay,
Vector vc1 
)

    UT3D_2angr_vc           2 opening angels of vec (Y-ang = kipp, Z-ang = dreh)
    vc1 entspricht der X-Achse; dise wird so gedreht, dass dann vc1 
    Die Winkel sind so gesetzt, dass die X-Achse einer DL-Liste dann in
     Richtung vc1 zeigt. (soll Z-Achse benutzt werden: ay -= 90. degree.)

int UT3D_atan_vcpl ( double *  kvc,
Vector vci,
Plane pli 
)

    den Anstieg (tan) der Geraden vci bezueglich Ebene pli
    vci muss nicht normiert sein
    irc:  0  OK
    irc: -1  vci ist normal auf die Plane pli

int UT3D_compvc0 ( Vector v1,
double  tol 
)

    UT3D_compvc0              compare vectors for 0,0,0.
    
    Retcode 0:   v1 <> 0.0 (gr. oder kl. tol)
            1:   v1 = 0.0 (innerhalb tol)

int UT3D_comp2vc_d ( Vector ,
Vector ,
double   
)

    UT3D_comp2vc              compare 2 vectors for parallel and antiparallel
    tolerances: see func. UT3D_vc_ck_parpl
    RC=1:   die Vektoren sind gleich.
    RC=0:   die Vektoren sind unterschiedlich.

int UT3D_comp2vc_p ( Vector ,
Vector ,
double   
)

    UT3D_comp2vc_p              compare 2 vectors for parallel
    tolerances: see func. UT3D_vc_ck_parpl
    RC=1:   die Vektoren sind gleich.
    RC=0:   die Vektoren sind unterschiedlich.
    
    if(UT3D_comp2vc_p(&ciO.vz, &UT3D_VECTOR_IZ, UT_TOL_min1) != 0) gleich

int UT3D_vc_ck_parpl ( Vector vci,
Plane pli,
double  tol 
)

    UT3D_vc_ck_parpl           check if vec is parallel to plane
    tol ca 0.1  (zB UT_TOL_cv
    tol 0.02  ist 1.15 Grad (bei Vec-Laenge 1 !)
    tol 0.01  ist 0.60 Grad (bei Vec-Laenge 1 !)
    tol 0.004 ist 0.23 Grad (bei Vec-Laenge 1 !)
    RetCode:
     0 = vec is NOT parallel to plane
     1 = vec is parallel to plane

int UT3D_vc_ckperp_2vc1 ( Vector vc1,
Vector vc2,
double  tol 
)

    UT3D_vc_ckperp_2vc1         check if 2 normalized-vectors are normal (perp.)
    For not-normalized vectors use UT3D_vc_ck_perpvc.
    tol entspricht etwa der Abweichung; 1 / 0.1 = Steigung 10 : 1;
        0.1 ~ 5.7 deg, 0.01 ~ 0.5 deg ..
    RetCode:
     0 = vc1 is NOT normal to vc2
     1 = vc1 is normal to vc2

int UT3D_parvc_2vcbp ( double *  dl,
int  mainPln,
Vector v1,
Vector v2 
)

    UT3D_parvc_2vcbp    parameter of distance of vec1 projected on vec2
   
    mainPln: Berechnungsebene BackPlane ex UT3D_bp_vcz.
   
    dl ist zwischen 0 bis 1; wenn dl=0.5 liegt der Endpunkt von V2
    genau in der Mitte des Vektors V2.
   
       
                                V1,V2 have same startpoint s.
                    x
                   /| 
                  / |
                V1  |
                /   |
               /    |
              s---------V2-------x
                    dl 

int UT3D_2parvc_3vcbp ( double *  ,
double *  ,
int  ,
Vector ,
Vector ,
Vector  
)

    UT2D_2parvc_3vc project end of vec1 along vec2 on vec3
   
    mainPln: Berechnungsebene BackPlane ex UT3D_bp_vcz.
   
    Zu gegebenen Vektoren v1, v2, v3 finden wir Zahlen x und y so,
    dass dx * v1 + dy * v3 = v2.
   
    dx/dy sind zwischen 0 bis 1; wenn dx=0.5 liegt der Endpunkt von V2
    genau in der Mitte des Parallelogramss V1-V3.
   
      y
       \                        V1,V2,V3 have same startpoint s.
     dy \-----------x
         \         / \
          \       /   \
        V3 \    V2     \
            \   /       \
             \ /         \
              s----------------------------x
                         dx          V1

void UT3D_vc_txt ( Vector vc,
char *  txt 
)

UT3D_vc_txt Vector from text

void UT3D_vc_2ptlen ( Vector ,
Point ,
Point ,
double   
)

UT3D_vc_2ptlen Vector = Point -> Point, set Length

void UT3D_vc_angr ( Vector vc,
double  angr 
)

UT3D_vc_angr Vector = Angle_X_axis

void UT3D_vc_2angr ( Vector ,
double  ,
double   
)

    UT3D_vc_2angr             Vector = Angle_X_axis, Angle_Z_axis.
    
    angX = Drehwinkel, angZ = Kippwinkel.

void UT3D_vc_2vc ( Vector ,
Vector ,
Vector  
)

    UT3D_vc_2vc            intermediate Vector
    
    Vektoren muessen normiert sein !!!
    Vektoren duerfen nicht antiparallel sein !!
    AusgabeVektor nicht normiert !

void UT3D_vc_ln ( Vector ,
Line  
)

UT3D_vc_ln Vector = LineStartPoint -> LineEndPoint

int UT3D_vc_bp ( Vector vn,
int  bp 
)

UT3D_vc_bp returns normalVector from BackPlaneNr (0-2)

void UT3D_vc_invert ( Vector ,
Vector  
)

void UT3D_vc_perp1vc ( Vector vp,
Vector vi 
)

UT3D_vc_perp1vc normal vector to 3D-vector in X-Y-plane

Computation of a normal vector (not necessarily of length 1) to a 3D-vector. Liefert den Y-Vektor !!!

IN: Vector *vi ... 3D-vector OUT: Vector *vp ... vector normal to the input vector

void UT3D_vc_perp2vc ( Vector ,
Vector ,
Vector  
)

    UT3D_vc_perp2vc            vector = perpendic. to 2 vectors (crossprod CROSS)
    
    Liefert den Z-Vektor wenn v1=X-vec; v2=Y-vec.
    Get VZ from VX, VY:    UT3D_vc_perp2vc (&vz, &vx, &vy);
    Get VY from VZ, VX:    UT3D_vc_perp2vc (&vy, &vz, &vx);
    Get VX from VY, VZ:    UT3D_vc_perp2vc (&vx, &vy, &vz);
    
    v1, v2 muessen nicht normiert sein.
    vp ist nicht normiert.

int UT3D_vc_perpvc2pt ( Vector vp,
Vector vx,
Point pc,
Point py 
)

    UT3D_vc_perpvc2pt         vector = perpendic. to vec & 2 points (crossprod)
    
    Liefert den Z-Vektor von X-Vektor, Y-AchsStartpunkt und Y-AchsEndpunkt
    Get VZ from VX, PY1, PY2:    UT3D_vc_perp3pt (&vz, &vx, &pya, &pye);
    Get VY from VZ, PX1, PX2:    UT3D_vc_perp3pt (&vy, &vz, &pxa, &pxe);

int UT3D_vc_perp3pt ( Vector vp,
Point ptc,
Point ptx,
Point pty 
)

    UT3D_vc_perp3pt           vector = perpendic. to 3 points (crossprod)
    
    Liefert den Z-Vektor von Origin, X-AchsEndpunkt und Y-AchsEndpunkt
    Get VZ from PO, PX, PY:    UT3D_vc_perp3pt (&vz, &po, &px, &py);
    Get VY from PO, PX, PZ:    UT3D_vc_perp3pt (&vy, &po, &pz, &px);

int UT3D_vc_perp4pt ( Vector vp,
Point p1,
Point p2,
Point p3,
Point p4 
)

    UT3D_vc_perp4pt         vector = perpendic. to 2 lines (crossprod)
    
    Get VY from VZ, PX1, PX2:    UT3D_vc_perp3pt (&vy, &vz, &pxa, &pxe);

void UT3D_vc_perpTria ( Vector vn,
Triangle tri 
)

void UT3D_vc_perpvcplXY ( Vector ,
Vector  
)

UT3D_vc_perpvcplXY Normalvektor auf vc1, der in der X-Y-Plane liegt.

int UT3D_vc_perppta ( Vector vcn,
int  pNr,
Point pa 
)

UT3D_vc_perppta Normalvektor auf planares Polygon

void UT3D_vc_normalize ( Vector ,
Vector  
)

    UT3D_vc_normalize         change to length 1
    
    vn = vc = OK.

void UT3D_vc_setLength ( Vector ,
Vector ,
double   
)

    UT3D_vc_setLength               change vectorlength
    
    vco und vci duerfen ident sein
    
    use UT3D_vc_multvc with vectors of length=1

int UT3D_vc_setLenLen ( Vector vco,
Vector vci,
double  newLen,
double  actLen 
)

UT3D_vc_setLenLen change vectorlength; actLen known.

void UT3D_vc_tangci ( Vector vs,
Circ ci1,
double  u 
)

    UT3D_vc_tangci            vector to circ (0. - 1.)
    make tangent to circ at position u
    ACHTUNG: dzt nur 0. und 1. !!!

int UT3D_vc_tangcipt ( Vector vt,
Point p1,
Circ ci 
)

UT3D_vc_tangcipt tangent to point on circ

int UT3D_vc_rotangr ( Vector vco,
Vector vci,
double *  ar 
)

    UT3D_vc_rotangr                 rotate a vector around Z-axis
    
    vco and vci can be the same adress

void UT3D_vc_rot3angr ( Vector ,
Vector ,
double  ,
double  ,
double   
)

    UT3D_vc_rot3angr                  rotate a vector
    
    (vco and vci can have the same adress)

int UT3D_vc_rotvcvcangr ( Vector vo,
Vector va,
Vector vi,
double  angr 
)

    UT3D_vc_rotvcvcangr            rotate vec vi around vec va
    VA MUSS NORMIERT SEIN !!!
    see UT3D_pt_rotptptvcangr

int UT3D_vc_projvcvc ( Vector v3,
Vector v1,
Vector v2 
)

    UT3D_vc_projvcvc             vector v3 = project vector v1 to vector v2
    see UT3D_parvc_2vc
    RetCodes:
       0  OK
      -1  v1-v2 aufeinander Normal; v3 ist Nullvektor.
    
               /|
           V1/  |
            /   |
           /    |
         /      |    V2
       x----V3-->------------>

int UT3D_vc_projvc2vc ( Vector vo,
Vector vi,
Vector v1,
Vector v2 
)

UT3D_vc_projvc2vc vector = project vector to plane from 2 vec's

int UT3D_vc_projvcnvc ( Vector vo,
Vector vi,
Vector vz 
)

    UT3D_vc_projvcnvc  project vec to plane from Z-vec
    
    den vi auf den vz projizieren;
    die Strecke Spitze-vi nach Spitze-vz ist der gesuchte vo.
    
                             vo = vi - vz1
       ^       /^
       |    vi/ |
     vo|    /   vo
       |   /    |
       | /      |
       x--------+------------> VZ
       |---vz1-->

void UT3D_vc_projvcpl ( Vector ,
Plane ,
Vector  
)

UT3D_vc_projvcpl vector = project vector to plane

int UT3D_vc_mirvcpl ( Vector vco,
Vector vci,
Plane pln 
)

    mirror vector in plane
    dem Planeorigin den vektor aufaddieren;
    diesen punkt dann auf die Pln projiz; opposite Punkt = gespiegelter Vektor.

void UT3D_vc_travcm3 ( Vector b,
Mat_4x3  ma,
Vector a 
)

    UT3D_vc_travcm3           apply transformation to vector (from 4x3-matrix)
     b darf ident mit a sein
     wird das ein normalisierter vektor ?
     eigentlich eine vectorTransform ?
    dann sollte a ein vc sein !

void UT3D_vc_travcm4 ( Vector b,
Mat_4x4  ma,
Vector a 
)

    UT3D_vc_travcm4           apply transformation to vector (from 4x4-matrix)
     wird das ein normalisierter vektor ?
     eigentlich eine vectorTransform ?
    dann sollte a ein vc sein !

int UT3D_comp2ln ( Line pa1,
Line pa2,
double  tol 
)

    UT3D_comp2ln              compare 2 lines if identical
    
    RC = 1 = Lines are identical
    RC = 0 = one of the points has a distance > tol

int UT3D_ln_ck_on_ln ( Point ,
Point ,
Point ,
Point ,
Point ,
Point ,
double  tol 
)

    check if 2 lines collinear
    Input:
      l11, l12     Line 1
      l21, l22     Line 2
    Output:
      lo1, lo2     the collinear segment if RC==1
    RetCod:
     -1 no
      0 yes, no coverage
      1 coverage: coverline out

int UT3D_ln_ck_parpl ( double *  dist,
Line ln,
Plane pl,
double  tol 
)

    UT3D_ln_ck_parpl          check if line is parallel to plane
    
    UT3D_ln_ck_parpl     Author: Thomas Backmeister       4.7.2003
    
    Check, if a line is parallel to a plane.
    
    IN:
      Line *ln    ... 3D-line
      Plane *pl   ... plane
      double tol  ... tolerance for parallelism
    OUT:
      double *dist ... signed distance line - plane if line || plane
                       >0.0 <=> line ON side of plane normal vector
                       <0.0 <=> line on OPPOSITE side of plane normal vector
    Returncodes:
      0 = line is NOT parallel to plane
      1 = line is parallel to plane

void UT3D_ln_6db ( Line ,
double  ,
double  ,
double  ,
double  ,
double  ,
double   
)

line from 2 * 3 doubles

void UT3D_ln_2pt2 ( Line ln1,
Point2 pta,
Point2 pte 
)

UT3D_ln_2pt2 3D-Line aus 2 2D-Punkten

int UT3D_ln_int2pl ( Line ln,
Plane pl1,
Plane pl2 
)

    UT3D_ln_int2pl            LN = Intersection PLN / PLN
    
    
    Intersection of 2 planes.
    
    The 1. point of the intersection line is the closest to the
    coordinate origin.
    The 2. point of the intersection line has distance 1 to the 1. point.
    
    IN:
      Plane *pl1 ...  1. plane
      Plane *pl2 ...  2. plane
    OUT:
      Line *ln   ...  intersection line of the 2 planes
    Returncodes:
      0 = OK
      1 = no intersection (parallel planes)

int UT3D_ln_tangcici ( Line ln1,
Circ ci1,
Circ ci2,
int  sNr 
)

    UT3D_ln_tangcici          Tangente (4 Lines) an CIR - CIR
    sNr = 1-4
    
    RC = 0: OK;
        -1: keine Loesung moglich

int UT3D_ln_parl2ln ( Point ,
Point ,
Point ,
Point ,
Point ,
Point  
)

    UT3D_ln_parl2ln           ln <== gemeinsame Strecke of 2 lines
    rc = -1:  keine gemeinsame Strecke
    rc =  0:  po1-po2 ist die gemeinsame Strecke

int UT3D_ln_pts_dmax ( Line ln,
int  np,
Point ptab,
double  tol 
)

    UT3D_ln_pts_dmax          line <-- points with max. distance of pointTab.
    
    
    Computation of a line from a set of points.
    The line points will be such that their distance is maximal!
    Die am weitesten auseinanderliegenden Punkte suchen, Linie davon machen.
    
    IN:
      int np      ... number of points
      Point *ptab ... points
      double tol  ... tolerance: minimal desired distance between
                                 line points
    OUT:
      Line *ln    ... line with maximal point distance
    Returncodes:
      1: line exists
      0: no line exists

int UT3D_ln_setLen ( Line lno,
Point pc,
double  lnlg,
Line lni 
)

change LineLength; center around pc

void UT3D_ln_inv ( Line ln1  ) 

void UT3D_ln_ln2 ( Line ,
Line2  
)

int UT3D_rdc_3pt ( double *  rdc,
Point pp1,
Point pp2,
Point pp3 
)

    Den Radius eines Kreises errechnen, von dem 3 Punkte bekannt sind.
    p1-p3 sind 3 punkte am Kreis.
    rc = a * b / 2 * hc             - is halt so ..
    
                  pp2
                  / | \
                /   |   \
              b    hc     a
            /       |       \
        pp3 -------c--------pp1
                q      p

int UT3D_ck_ci180 ( Circ ci1  ) 

    UT3D_ck_ci180             check if circ is 180-degree-circ
    RC = 0:   YES, is 180-deg-circ
    RC = 1:   NO
    if(UT3D_ck_ci180 == YES) ...

int UT3D_ck_ci360 ( Circ ci1  ) 

    UT3D_ck_ci360             check if circ is 360-degree-circ
    RC = 0:   YES, is 360DegCirc
    RC = 1:   NO
    if(UT3D_ck_ci360 == YES) ...

int UT3D_ci_cip1 ( Circ ci1,
Point p1 
)

UT3D_ci_cip1 change startpoint of circ

int UT3D_ci_ptvcr ( Circ ci1,
Point pc,
Vector vz,
double  rc 
)

UT3D_ci_ptvcr Circ from center, axis, radius

int UT3D_ci_pt2vcr ( Circ ci1,
Point pc,
Vector vz,
Vector vx,
double  rc 
)

UT3D_ci_pt2vcr Circ from center, axis, x-vec and radius

int UT3D_ci_cip2 ( Circ ci1,
Point p2 
)

UT3D_ci_cip2 change endpoint of circ

int UT3D_ci_cip3 ( Circ ci1,
Point p1,
Point p2 
)

UT3D_ci_cip3 change start- and endpoint of circ

int UT3D_ci_ciangr ( Circ ci,
double  ao2 
)

UT3D_ci_ciangr change endpoint of circ from angle

void UT3D_ci_setangr ( Circ ci1  ) 

UT3D_ci_setangr fix angle from p1-p2

int UT3D_ci_ptptvcangr ( Circ ci,
Point pc,
Point p1,
Vector vz,
double  ao 
)

    UT3D_ci_ptptvcangr        Circ from center, startpoint, axis, opening angle
    neg. Winkel: CCW !

int UT3D_ci_ptptvcrd ( Circ ci,
Point p1,
Point p2,
double  rd,
Vector vz,
int  siz 
)

    UT3D_ci_ptptvcrd         Circ from startpoint endpoint radius Z-vector
    
    rd      Radius; r>0 = CCW, r<0 = CW
    siz  1  0-180 deg
    siz -1  180-360 deg
    
    irc -1  p1 - p2 ident
    irc -2  Radius too small       (p1-p2) > (rd * 2)

int UT3D_ci_cipt180 ( Circ ci1,
Point p1 
)

    UT3D_ci_cipt180           change circ -> 180 deg-circ; keep dir
    make p2 opposit to p1

int UT3D_ci_cipt360 ( Circ ci1,
Point p1 
)

UT3D_ci_cipt360 change circ -> 360 deg-circ; keep dir

int UT3D_ci_pcvzpt180 ( Circ ci1,
Point pc,
Vector vz,
Point p1,
int  dreh 
)

UT3D_ci_pcvzpt180 180 deg-circ (CCW) from center, axis, startpoint

int UT3D_ptNr_ci ( Circ ci1,
double  tol 
)

UT3D_ptNr_ci nr of points for polygon from circle

int UT3D_ci_inv1 ( Circ ci1  ) 

    UT3D_ci_inv1              invert (change p1, p2, dir)
    Kreis bleibt optisch ganz gleich !!

int UT3D_ci_inv2 ( Circ ci1  ) 

UT3D_ci_inv2 invert (change dir) KreisOut = Vollkreis - KreisIn (das Komplement)

int UT3D_ci_inv3 ( Circ ci1  ) 

UT3D_ci_inv3 invert (optisch gleich, Z-Axis invers)

Circ UT3D_ci_ci2 ( Circ2  ) 

UT3D_ci_ci2 3D-Circ = 2D-Circ; Z-vec=0,0,1

Circ UT3D_ci_obj2 ( ObjG2  ) 

DO NOT USE

Circ UT3D_ci_obj ( ObjG ci_in  ) 

int UT3D_ci_ptvcrd ( Circ ci,
Point ps,
Vector vs,
double  rd,
Vector vz,
double  a1 
)

    UT3D_ci_ptvcrd  Circ from startpoint, startvector, radius ..
    ACHTUNG: vs und vz muessen normiert sein !
    Input:
      ps    Startpoint of circ
      vs    tangent in ps
      rd    Radius; positiv:circ=ccw; negativ: circ=cw.
      vz    Axis
      a1    Angle in rad; 0=full circle.

int UT3D_ci_2ptvcrd ( Circ cia,
Point pp1,
Point pp2,
Vector vz,
double  rdc 
)

    UT3D_ci_2ptvcrd                  Circ from  2 Points-on-Circ  & Radius
   
    RetCod: nr of circles in cia
   
    see UT3D_ci_ptptvcrd UT3D_ci_ptvcrd
   
                d1     |    vc1
           x-----------x-----------x
         pp1         pt1          pp2
                       |
                       |
                       |vc2
                       |
                       x
                     circ.pc

int UT3D_ci_3pt ( Circ cpo,
Point pp1,
Point pp2,
Point pp3 
)

    UT3D_ci_3pt          Circ from 3 points
    p1-p3 sind 3 punkte am Kreis.
    rc = a * b / 2 * hc             - is halt so ..
    hx wird genau in Mitte von c angesetzt (Streckensymmetrale, Pt. pMc)
    hx = sqrt (r * r - (c * c / 4))   // gleichseitiges Dreieck p1,p2,Cen.
    
                  pp2
                  / | \
                /   |   \
              b    hc     a
            /       |       \
          pp3-------c--------pp1
                q    | 
                     hx,vx
                     |
                     Cen

int UT3D_civz_ci ( Circ ci1  ) 

UT3D_civz_ci den vz eines Circ (aus p1-pc-p2) errechnen

int UT3D_ci_ptptrd ( Circ  ca[],
Point pt1,
Point pt2,
double  radi 
)

    UT3D_ci_ptptrd            Circ = tangent to PT + PT, radius.
    DO NOT USE; use UT3D_ci_2ptvcrd

int UT3D_ci_lnptrd ( Circ  ca[],
Line ln1,
Point pt1,
Vector vz,
double  rdc 
)

int UT3D_ci_ciptrd ( Circ  ca[],
Circ ci1,
Point pt1,
double  rdc 
)

    UT3D_ci_ciptrd            Circ = tangent to CI + PT, radius.
    
    RetCod:
     -1        Error
     0-2       Nr of resulting Circles

int UT3D_ci_2lnrd ( Circ  ca[],
Line ln1,
Line ln2,
double  rdc,
int   
)

    UT3D_ci_2lnrd             Circ = corner for 2 Lines
    
    RC = -1: Lines parallel 
        0-4: nr of Circs generated

int UT3D_ci_cicird ( Circ  ca[],
Circ ci1,
Circ ci2,
double  rdc,
int   
)

    UT3D_ci_lncird            Circ = tangent to CIR + CIR, radius.
    
    RC = 1,2 = Anzahl Kreise.
         -1  = keine Loesung

int UT3D_ci_lncird ( Circ  ca[],
Line ln1,
Circ ci1,
double  rdc,
int   
)

    UT3D_ci_lncird            Circ = tangent to LN + CIR, radius.
    
    Input:
     sNr  solutionNr, -1 == alle Solutions, else nur die gewuenschte
    
    RC = 1,2,3,4,5,6,7,8 = Max. Anzahl Kreise.

int UT3D_ci_intplsph ( Circ cio,
Plane pli,
Sphere spi 
)

    Circ = intersect Plane Sphere
    
    irc  0   OK
    irc -1   Plane touches Sphere
    irc -2   Plane outside Sphere

int UT3D_ci_ptrd2vc2angr ( Circ ci,
Point pc,
double  rd,
Vector vz,
Vector vx,
double  a1,
double  a2 
)

    circ from center, Radius, Z-Axis, X-Axis, startAngle, endAngle
    ACHTUNG: Z-Axis u X-Axis muessen normiert sein !!!!
    rd hat DrehRichtg.
    ACHTUNG: die Winkel werden hier umgedreht, die Kreisdrehachse
    ist genau verkehrt zum Plane-vz !

int UT3D_ci_ptvcpt2angr ( Circ ci,
Point pc,
Point p1,
Vector vz,
double  a1,
double  a2 
)

circ from center, point, axis, startAngle, endAngle

int UT3D_ck_el360 ( CurvElli el1  ) 

    UT3D_ck_el360             check if elli is 360-degree-elli
    RC = 0:   YES, is elli
    RC = 1:   NO
    if(UT3D_ck_el360 == YES) ...

int UT3D_el_elpt180 ( CurvElli el1,
Point p1 
)

double UT3D_angr_elpt ( Point pti,
Point ptc,
Vector va,
Vector vb 
)

UT3D_angr_elpt parametric-Angle <- pt

int UT2D_pt_elangd ( Point2 pto,
double  lx,
double  ly,
double  angr 
)

    UT2D_pt_elangd            pt <- parametric-Angle, rMaj, rMin.
    Einen Punkt auf der 2D-Ellipse aus einem Winkel errechnen. Der Winkel ist
      nur als Parameter zu sehen; eine Linie unter diesem Winkel schneidet nur
      den Innen- und Aussenkreis; nicht die Ellipse !
    IN: angr = Winkel in rad,
        lx     Laenge Hauptachse
        ly     Laenge Nebenachse

int UT3D_pt_elangd ( Point pto,
Point ptc,
Vector va,
Vector vb,
double  angr 
)

UT3D_pt_elangd pt <- parametric-Angle.

int UT3D_el_pt2vc2a ( CurvElli el,
Point ptc,
Vector vcx,
Vector vcy,
double  a1,
double  a2,
int  idir 
)

    UT3D_el_pt2vc2a           elli=center,vecMajAx,vecMinAx,AngStart,angEnd,dir.
    idir: CCW (0)  od CW(1)

int UT3D_el_projcipl ( CurvElli el,
Plane pl,
Circ ci 
)

    UT3D_el_projcipl          ellipse = project CIR -> PLN
    
    Project a circle onto a plane.
    
    IN:
      Plane *pl    ... projection plane
      Circ *ci     ... 3D - circle
    OUT:
      CurvElli *el  ... ellipse
    Returncodes:
      0 = OK
    
    see also UPRJ_app_el

int UT3D_el_projelpl ( CurvElli elo,
Plane pl,
CurvElli eli 
)

    UT3D_el_projelpl          ellipse = project ELL -> PLN
    
    see also UT3D_el_projcipl UPRJ_app_ci

int UT3D_el_elcoe ( CurvElli ,
polcoeff_d5 ,
Point2 pa,
Point2 pe,
double  zt 
)

    UT3D_el_elcoe           Ellipse <-- coeff-data (IGES)
    
    
    ellipse from IGES-data of type 104.
    
    pa,pe  Beginn/Endpunkt der Elli in 2D-Zentrumslage (Center ist 0,0)
    zt = Hoehe der Z-Plane der Elli im 2D
    
    
    IN:
      IgesConic *ig   ... IGES-data of type 104 (conic arc entity)
    
    OUT:
      Ellipse
    
    Returncodes:
      0 = OK and conic is ellipse
     -1 = input error: data are no conic arc entity

int UT3D_elcoe_el ( polcoeff_d5 ,
CurvElli  
)

    UT3D_elcoe_el             CoeffEllipse(IGES) <-- ellipse
    
    the ellipse lies in a plane parallel x,y-plane and its axes need not be 
    parallel to x- resp. y- axis.
    
    IN:
      CurvElli *el   ...  ellipse in a plane parallel x,y-plane
    
    OUT:
      polcoeff_d5   ...  IGES-coefficients of the ellipse equation
    
    Returncode:
      0 = OK
     -1 = input error

int UT3D_pta_ck_planar ( int  pNr,
Point pTab,
Point pPln,
Vector vc 
)

    testen ob alle Punkte planar (Abst. von Plane pPln-vc < UT_TOL_pt).
    RetCod = 0   OK, ist planer
            -1   no, 1-n points of pTab are not in plane pPln-vc

int UT3D_rMin_pta ( double *  rMin,
int  pNr,
Point pTab 
)

    vom gesamten Polgon den kleinsten Radius errechnen
    Nur Abschaetzung; es wird von jeweils 3 Punkten der Kreisradius errechnet.
    ev in eine neue source ../ut/ut_pta.c ?

int UT3D_sr_polc ( int  ptNr,
Point pa,
Vector vcn,
int  plMain 
)

    UT3D_sr_polc                           nach Karl Sauer 2004-04-07
    Umlaufsinn (sr=sense of rotation) eines geschlossenen 3D-Polygons (polc)
     berechnen.
    
    ptNr = Anzahl Punkte ohne den letzten == ersten Punkt !
    pa   = PunkteTabelle ohne den letzten == ersten Punkt !
    RetCod = 1 = CCW
            -1 = CW
    
    mode: Berechnungsebene BackPlane ex UT3D_bp_vcz.

int UT3D_pta_dbo ( Point **  pTab,
int *  pNr,
int  typ,
long  ind,
double  tol 
)

    UT3D_pta_dbo              get polygon from DB-object(typ,ind)
    returns points in memspc201 ! (do not free)

Curv UT3D_cv_obj2 ( ObjG2  ) 

UT3D_cv_obj2 Polygon < 2D-Obj

void UT3D_cv_ln ( Point cv,
int *  ptAnz,
Point p1,
Point p2 
)

    Linearstueck -> Polygon.
    
    In/Out: *ptAnz wird nur in 2 geandert, wenn < 2.

int UT3D_npt_ci ( Point pa,
int  pNr,
Circ ci1 
)

    UT3D_npt_ci               circular polygon
   
    see also UT3D_cv_ci

void UT3D_cv_ci ( Point  cv[],
int *  ptanz,
Circ ci1,
int  ptmax,
double  tol 
)

    UT3D_cv_ci                Polygon < 3D-Kreis
     ptmax = max. Anzahl von Ausgabepunkten.
     tol   = die Sehnenabweichung (wenn ptmax > 0).
             Wenn tol < 0.0 wird der ci1 auf genau ptmax Punkte zerteilt.

int UT3D_cv_ell ( Point  cv[],
int *  numpt,
CurvElli el,
int  ptmax,
double  stol 
)

    UT3D_cv_ell           Polygon <- Ellipse
    
    Polygonial curve from 3D-Ellipse.
    
    IN:
      CurvElli *el  ...  3D-ellipse
      int ptmax    ...  maximal number of polygonpoints
      double stol  ...  maximal deviation of secant
    OUT:
      Point cv[]   ...  array of polygonpoints
      int *numpt   ...  number of polygonpoints
    Returncodes:
      0  = OK
      1  = ellipse is a line (a = 0)
      2  = ellipse is a line (b = 0)
      -1 = degeneration of ellipse (a = b = 0)

int UT3D_cv_delia ( int *  pNr,
Point pTab,
char *  ptStat 
)

    UT3D_cv_delia             delete points out of pTab
    alle Punkte die (ptStat = 1) haben aus Tabelle loeschen
    pNr richtigstellen
    ptStat = 0: Punkt wird gebraucht
    ptStat = 1: Punkt loeschen

int UT3D_cv3_linear ( int *  pNr,
Point pTab,
double  tol 
)

    UT3D_cv3_linear              delete unnecesary straight points
    alle Punkte die innerhalb tol liegen aus pTab entfernen.

int UT3D_obj_dump ( ObjG el  ) 

DO NOT USE

ObjG UT3D_obj_ln ( Line  ) 

DO NOT USE

ObjG UT3D_obj_ci ( Circ  ) 

DO NOT USE

int UT3D_bp_2pt ( Point pt1,
Point pt2 
)

    UT3D_bp_2pt         returns main-BackPlaneNr (0-2) from 2 points
    
    Hauptebene mit dem hoechsten Wert waehlen; zb fuer UT3D_parpt_lnbp

int UT3D_bp_vc_ ( Vector  ) 

    UT3D_bp_vc_      returns main-BackPlaneNr (0-2) from vec
    
    eine Hilfsebene auswaehlen; Input ist ein Vektor;
    es wird jene Hauptebene mit dem hoechsten Wert gewaehlt.
     vc1   rc
    1 0 0   1 = BCKPLN_XZ   skip Y-Vec
    0 1 0   2 = BCKPLN_XY   skip Z-Vec
    0 0 1   0 = BCKPLN_YZ   skip X-Vec

int UT3D_bp_vcz ( Vector  ) 

    UT3D_bp_vcz               returns main-BackPlaneNr (0-2) from normalvec
   
    eine Hilfsebene auswaehlen; Input ist der Normalvektor der Ebene;
    es wird jene Hauptebene mit dem geringsten Wert gewaehlt.
    In:               Out:
    1,0,0  X-Vektor:   0 = BCKPLN_YZ   es wird Y-Z-Plane gewaehlt;
    0,1,0  Y-Vektor:   1 = BCKPLN_XZ   es wird X-Z-Plane gewaehlt;
    0,0,1  Z-Vektor:   2 = BCKPLN_XY   es wird X-Y-Plane gewaehlt;

void UT3D_pl_XYZ ( Plane pl1  ) 

UT3D_pl_XYZ Defaultplane

int UT3D_pl_bpdb ( Plane plo,
int  bp,
double  dbc 
)

    UT3D_pl_bpdb            Plane from equation;
    
    Input:
      bp = BCKVEC_Z = BCKPLN_XY: dbc = Z-Coord.Value
      bp = BCKVEC_Y = BCKPLN_XZ: dbc = Y-Coord.Value
      bp = BCKVEC_X = BCKPLN_YZ: dbc = X-Coord.Value

int UT3D_pl_3pt ( Plane ,
Point ,
Point ,
Point  
)

    UT3D_pl_3pt               plane from 3 point's
    
    Achtung: für Transformation manchmal ungeeignet, weil
    der X-Vektor immer parallel zur XY_Ebene eingerichtet wird
      (use UT3D_pl_pt2vc).

void UT3D_pl_ptvcvc ( Plane pl1,
Point po,
Vector vx,
Vector vz 
)

plane from Origin, X-vec, Z-Vec

void UT3D_pl_pt2vc ( Plane ,
Point ,
Vector ,
Vector  
)

    UT3D_pl_pt2vc             plane from origin u. 2 vc's (fixer X-Vektor)
    
    Both vecs are in the Plane !

int UT3D_pl_ptvc ( Plane ,
Point ,
Vector  
)

UT3D_pl_ptvc plane from point + z-vector

void UT3D_pl_ptvcpt ( Plane pl1,
Point po,
Vector vz,
Point ptx 
)

UT3D_pl_ptvcpt Plane aus Nullpunkt, Z-Achse und Punkt auf X-Achse

int UT3D_pl_ln ( Plane pln,
Line lna 
)

    UT3D_pl_ln                make Plane from line
    Origin is line-center; Z-vec is line.

void UT3D_pl_2ln ( Plane pl1,
Line ln1,
Line ln2 
)

plane from 2 lines;

int UT3D_pl_ci ( Plane pl1,
Circ ci1 
)

UT3D_pl_ci make Plane from circ

int UT3D_pl_nobj ( Plane pl1,
int  oNr,
ObjGX oTab 
)

    UT3D_pl_nobj              plane fron ObjGX-table
    die Transformationsmatrix zu n Objekten suchen ..
    oTab enthaelt PT|LN|AC
    1) Circ in den Inputdaten: vz auslesen, ptCen laden, Plane davon.
    2) mind 2 Lines: vz=CrossProd. dazu; Origin = 1.Point, Plane davon.
    3) von den InputObjekten eine Punktetabelle beladen; Plane davon.

void UT3D_pl_invert ( Plane pl  ) 

    UT3D_pl_invert            Plane invert (change direction of Z-vec)
    Invert Z-Achse, swap X-Y-Achse.

int UT3D_pl_rotpt ( Plane plo,
Plane pli,
Point ptx 
)

    UT3D_pl_rotpt             rot. Refsys around Z; point gives new X-direction
    plo und pli duerfen gleich sein.

void UT3D_pl_ptpl ( Plane pl,
Point pt1 
)

UT3D_pl_ptpl change origin of plane

int UT3D_pl_plcoe ( Plane pl,
polcoeff_d3 co 
)

    UT3D_pl_plcoe              plane <-- plane equation
    
   
    Computation of the plane from the coefficients of the plane equation.
    
    IN:
      polcoeff_d3 *co ... coefficients of plane equation
    OUT:
      Plane *pl      ... plane
    Returncodes:
      0 = OK
     -1 = input error

int UT3D_plcoe_pl ( polcoeff_d3 co,
Plane pl 
)

    UT3D_plcoe_pl              plane equation <-- plane
    
    Computation of the coefficients of the plane equation to a plane,
    i.e. a, b, c, d such that a*X + b*Y + c*Z = d;
    
    IN:
      Plane *pl      ... plane
    OUT:
      polcoeff_d3 *co ... coefficients of plane equation
    Returncodes:
      0 = OK

double UT3D_plg_lvTab ( double *  lvTab,
Point pta,
int  ptNr 
)

int UT3D_pta_plg ( int *  ptNr,
Point pta,
CurvPoly plg 
)

int UT2D_box_ini0 ( Point2 pt1,
Point2 pt2 
)

UT3D_box_ini0 init box

int UT2D_box_extend ( Point2 pb1,
Point2 pb2,
Point2 pt1 
)

    Box mit point vergroessern.
    init Box zB mit UT3D_box_ini0

int UT2D_rect_pts ( Point2 pmin,
Point2 pmax,
int  nump,
Point2 ptab 
)

    UT2D_rect_pts        bounding rectangle <-- 2D-points
    
    Computation of a minimal axis-parallel rectangle which contains all
    given 2D-points.
    The rectangle is given by the endpoints of its diagonal.
    If all points ly on a line parallel x-, y- or z- axis, the rectangle
    will be a line segment.
    
    IN:
      int nump     ... number of 2D-points
      Point2 *ptab ... 2D-points
    OUT:
      Point2 *pmin ... endpoint 1 of rectangle diagonal (lower left)
      Point2 *pmax ... endpoint 2 of rectangle diagonal (upper right)
    Returncodes:
      0 = OK
     -1 = input error

int UT3D_cv_boxxy ( Point pb1,
double  x1,
double  x2,
double  y1,
double  y2 
)

UT3D_cv_boxxy load rect.points from xmin/xmax ymin/ymax in z=0

int UT3D_box_extend ( Point pb1,
Point pb2,
Point pt1 
)

    Box mit point vergroessern.
    init Box zB mit UT3D_box_ini0

int UT3D_box_2pt ( Point pb1,
Point pb2,
Point pt1,
Point pt2 
)

UT3D_box_2pt make box of 2 points

int UT3D_box_2pttol ( Point pb1,
Point pb2,
Point pt1,
Point pt2,
double  tol 
)

UT3D_box_2pttol make box of 2 points + tol

int UT3D_box_pts ( Point pmin,
Point pmax,
int  nump,
Point ptab 
)

    UT3D_box_pts         bounding box <-- points
    
    Computation of a minimal axis-parallel box which contains all given points.
    The box is given by the endpoints of its diagonal.
    If all points ly in a plane parallel x,y-plane, the box will be a rectangle.
    
    IN:
      int nump    ... number of points
      Point *ptab ... points
    OUT:
      Point *pmin ... endpoint 1 of box diagonal
      Point *pmax ... endpoint 2 of box diagonal
    Returncodes:
      0 = OK
     -1 = input error

int UT3D_box_tria ( Point pb1,
Point pb2,
Triangle tr,
double  tol 
)

UT3D_box_tria make box from triangle

int UT3D_box_addTol ( Point pb1,
Point pb2,
double  tol 
)

    UT3D_box_addTol           add tolerance to box

int UT3D_ck_ptInBox ( Point p1,
Point p2,
Point px 
)

    UT3D_ck_ptInBox          check if point px is inside box p1-p2
    box should have tolerance added; use UT3D_box_addTol
    RC = 0:   YES, p is inside box p1 / p2
    RC = 1:   NO,  p is outside box p1 / p2

int UT3D_ckBoxinBox1 ( Point p1,
Point p2,
Point p3,
Point p4 
)

    check if 2 boxes overlap
    p1-p2 sind Box1, p3-p4 Box2.
    ACHTUNG: p1 muss links unter p2 liegen; p3 links unter p4.
    Toleranzen: schon zur Box dazuaddieren.
    RC -1:   NO, boxes do not overlap
    RC  1:   yes boxes overlap.

int UT3D_box_ck_intLn ( Line ln,
Point pmin,
Point pmax,
double  tol 
)

    UT3D_box_ck_intLn        check line-X with axis-parallel box
    
    Check if a line intersects an axis-parallel box.
    
    IN:
      Line *ln    ... line
      Point *pmin ... endpoint 1 of box diagonal
      Point *pmax ... endpoint 2 of box diagonal
      double tol  ... tolerance for line intersecting box (>0)
    OUT:
    Returncodes:
      0 = the line does not intersect the box
      1 = the line intersects the box

int UT3D_box_ck_intpl ( Plane pln,
Point p1,
Point p2,
double  tol 
)

    UT3D_box_ck_intpl               check intersect. Plane / Box (estimate!)
    ACHTUNG: dzt nur rasche Abschaetzung !!!
    Returncodes:
      0 = plane does not intersect the box
      1 = plane intersects the box

int UT3D_rbox_loadxy ( Point pb1,
double  x1,
double  x2,
double  y1,
double  y2 
)

int UT3D_ptvc_intbox ( Point pl,
Vector vl,
Point bp1,
Point bp2 
)

    UT3D_ptvc_intbox               intersect point/vector with box
    
    Input:
      pl ist ausserhalb box. vl zeigt in die box hinein.
    Output:
      pl ist der Schnittpunkt mit der am naechsten liegenden Boxplane.

int UT3D_ln_intbox ( Line ln1,
Point bp1,
Point bp2 
)

    UT3D_ln_intbox            relimit line inside box
    Line an Raumbox begrenzen

void UT3D_tria_pta_fac ( Triangle ,
Fac3 ,
Point  
)

int UT3D_m3_inirot ( Mat_4x3  ma,
Point pa,
Vector va,
double  angr 
)

define rotation (axis, origin angle)

void UT3D_m3_loadpl ( Mat_4x3  ,
Plane  
)

UT3D_m3_loadpl load Plane(=Achsensystem) into 4x3 Transform.Matrix

void UT3D_m3_load ( Mat_4x3  ,
Vector ,
Vector ,
Vector  
)

     UT3D_m3_load              define refSys from 3 vectors (4x3 Matrix).
    Die Inp.Vec. muessen nicht normiert sein.
      use (translate points) with UT3D_pt_traptm3

void UT3D_m3_load_povxvy ( Mat_4x3  ma,
Point ori,
Vector vx,
Vector vy 
)

UT3D_m3_load_povxvy neues Achsensystem mit Origin,vx,vy definieren

void UT3D_m3_load_povxvz ( Mat_4x3  ma,
Point ori,
Vector vx,
Vector vz 
)

    UT3D_m3_load_povxvz       neues Achsensystem mit Origin,vx,vz definieren
    Doku see UT3D_m3_load

void UT3D_m3_load_o ( Mat_4x3  ,
Point  
)

     UT3D_m3_load_o            Nullpunkt into 4x3 Transform.Matrix.
     Nach UT3D_m3_load.

int UT3D_m3_invm3 ( Mat_4x3  ,
Mat_4x3   
)

     UT3D_m3_invm3              4x3-Matrix invertieren
    ACHTUNG: Adresse darf NICHT gleich sein !!

void UT3D_m3_multm3 ( Mat_4x3  m3,
Mat_4x3  m1,
Mat_4x3  m2 
)

    UT3D_m3_multm3             4x3-Matrix mit 4x3 Matrix multiplizieren
      (nur den 3x3-Anteil)

int UT3D_m3_tram3m3 ( Mat_4x3  m3,
Mat_4x3  m1,
Mat_4x3  m2 
)

    UT3D_m3_tram3m3         apply transformation to Mat_4x3
   
    see also UTRA_app__

void UT3D_m4_init ( Mat_4x4  ma  ) 

    UT3D_m4_init              Initialize a 4x4 - matrix
    
    Fuer horiz u vert matrix. !
   
          ( 1 0 0 0 )
          ( 0 1 0 0 )
    [a] = ( 0 0 1 0 )
          ( 0 0 0 1 )

void UT3D_m4_init_ori ( Mat_4x4  ma,
double  px,
double  py,
double  pz 
)

    UT3D_m4_init_ori          Initialize a 4x4 - matrix with translation
    
    hor. Matrix !
    
    Mat_4x4-horizontal:
      Der erste Wert ist der Index ins double-Array.
    
    VX     0=[0][0]=vx.x   1=[0][1]=vx.y   2=[0][2]=vx.z    3=[0][3]=0
    VY     4=[1][0]=vy.x   5=[1][1]=vy.y   6=[1][2]=vy.z    7=[1][3]=0
    VZ     8=[2][0]=vz.x   9=[2][1]=vz.y  10=[2][2]=vz.z   11=[2][3]=0
    PO    12=[3][0]=o.x   13=[3][1]=o.y   14=[3][2]=o.z    15=[3][3]=1

void UT3D_m4_init_rot ( Mat_4x4  ma,
double  angle,
Vector axis 
)

UT3D_m4_init_rot Initialize a 4x4 - matrix with rotation

void UT3D_m4_loadpl ( Mat_4x4  m1,
Plane pl1 
)

    UT3D_m4_loadpl          load Plane(=Achsensystem) into 4x4 Transform.Matrix
    kann fuer glMultMatrixd verwendet werden.

void UT3D_m4_addrot ( Mat_4x4  mo,
Mat_4x4  ma,
Mat_4x4  mb 
)

UT3D_m4_addrot Concatenate 2 4x4 - matrixes.

void UT3D_m4_addtra ( Mat_4x4  ma,
double  px,
double  py,
double  pz 
)

UT3D_m4_addtra add a translation into 4x4-matrix

double UT3D_sbs_ck_planar ( SurBSpl su1  ) 

double UT3D_sru_ck_planar ( ObjGX ru1  ) 

void OGX_SET_OBJ ( ObjGX ox,
int  oTyp,
int  oForm,
int  oSiz,
void *  oDat 
)


Variable Documentation

double UT_TOL_pt

identical Points-tolerence

double UT_TOL_cv

max Abweichung Curve. (Tol. bei Umwandlung Curve -> Polygon).

double UT_TOL_ln

Toleranz fuer die Behandlung einer Menge von Punkten als Gerade.

double UT_DISP_cv

max. Abweichung bei der Darstellung von Kreisen, Kurven

double UT_TOL_min0

double UT_TOL_min1

double UT_TOL_min2

double UT_TOL_PAR

tolerance for parallelism

double UT_TOL_Ang1

tolerance for Angle 0.01 Grad

const double UT_VAL_MIN

const double UT_VAL_MAX

const double UT_DB_LEER

const double UT_DB_NULL

const int UT_INT_MAX

const int UT_I2_MAX

const char UT_CHR_NULL


Generated on Sat May 30 09:31:55 2009 for gCAD3D by  doxygen 1.5.6