1 {
2 *****************************************************************************
3 *                                                                           *
4 *  This file is part of the ZCAD                                            *
5 *                                                                           *
6 *  See the file COPYING.modifiedLGPL.txt, included in this distribution,    *
7 *  for details about the copyright.                                         *
8 *                                                                           *
9 *  This program is distributed in the hope that it will be useful,          *
10 *  but WITHOUT ANY WARRANTY; without even the implied warranty of           *
11 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                     *
12 *                                                                           *
13 *****************************************************************************
14 }
15 {
16 @author(Andrey Zubarev <zamtmn@yandex.ru>)
17 }
18 unit uzbgeomtypes;
19 {$INCLUDE def.inc}
20 interface
21 uses uzbtypesbase;
22 type
23 {EXPORT+}
24 PIMatrix4=^IMatrix4;
25 IMatrix4=packed array[0..3]of GDBInteger;
26 DVector4D=packed array[0..3]of GDBDouble;
27 DVector3D=packed array[0..2]of GDBDouble;
28 DVector4F=packed array[0..3]of GDBFloat;
29 PDMatrix4D=^DMatrix4D;
30 DMatrix4D=packed array[0..3]of DVector4D;
31 DMatrix3D=packed array[0..2]of DVector3D;
32 ClipArray=packed array[0..5]of DVector4D;
33 PDMatrix4F=^DMatrix4F;
34 DMatrix4F=packed array[0..3]of DVector4F;
35 
36 FontFloat=GDBFloat;
37 PFontFloat=^FontFloat;
38 PGDBXCoordinate=^GDBXCoordinate;
39 GDBXCoordinate=GDBDouble;
40 PGDBYCoordinate=^GDBYCoordinate;
41 GDBYCoordinate=GDBDouble;
42 PGDBZCoordinate=^GDBZCoordinate;
43 GDBZCoordinate=GDBDouble;
44 PGDBvertex=^GDBvertex;
45 GDBvertex=packed record
46                 x:GDBXCoordinate;(*saved_to_shd*)
47                 y:GDBYCoordinate;(*saved_to_shd*)
48                 z:GDBZCoordinate;(*saved_to_shd*)
49           end;
50 PGDBCoordinates3D=^GDBCoordinates3D;
51 GDBCoordinates3D=GDBvertex;
52 PGDBLength=^GDBLength;
53 GDBLength=GDBDouble;
54 PGDBQuaternion=^GDBQuaternion;
55 GDBQuaternion=packed record
56    ImagPart: GDBvertex;
57    RealPart: GDBDouble;
58               end;
59 GDBBasis=packed record
60                 ox:GDBvertex;(*'OX Axis'*)(*saved_to_shd*)
61                 oy:GDBvertex;(*'OY Axis'*)(*saved_to_shd*)
62                 oz:GDBvertex;(*'OZ Axis'*)(*saved_to_shd*)
63           end;
64 PGDBvertex3S=^GDBvertex3S;
65 GDBvertex3S=packed record
66                 x:GDBFloat;(*saved_to_shd*)
67                 y:GDBFloat;(*saved_to_shd*)
68                 z:GDBFloat;(*saved_to_shd*)
69           end;
70 PGDBvertex4S=^GDBvertex4S;
71 GDBvertex4S=packed record
72                 x:GDBFloat;(*saved_to_shd*)
73                 y:GDBFloat;(*saved_to_shd*)
74                 z:GDBFloat;(*saved_to_shd*)
75                 w:GDBFloat;(*saved_to_shd*)
76           end;
77 PGDBLineProp=^GDBLineProp;
78 GDBLineProp=packed record
79                   lBegin:GDBCoordinates3D;(*'Begin'*)(*saved_to_shd*)
80                   lEnd:GDBCoordinates3D;(*'End'*)(*saved_to_shd*)
81               end;
82 PGDBvertex4D=^GDBvertex4D;
83 GDBvertex4D=packed record
84                 x,y,z,w:GDBDouble;
85             end;
86 GDBvertex4F=packed record
87                 x,y,z,w:GDBFloat;
88             end;
89 PGDBvertex2D=^GDBvertex2D;
90 GDBvertex2D=packed record
91                 x:GDBDouble;(*saved_to_shd*)
92                 y:GDBDouble;(*saved_to_shd*)
93             end;
94 PGDBSnap2D=^GDBSnap2D;
95 GDBSnap2D=packed record
96                 Base:GDBvertex2D;(*'Base'*)(*saved_to_shd*)
97                 Spacing:GDBvertex2D;(*'Spacing'*)(*saved_to_shd*)
98             end;
99 PGDBFontVertex2D=^GDBFontVertex2D;
100 GDBFontVertex2D=packed record
101                 x:FontFloat;(*saved_to_shd*)
102                 y:FontFloat;(*saved_to_shd*)
103             end;
104 PGDBPolyVertex2D=^GDBPolyVertex2D;
105 GDBPolyVertex2D=packed record
106                       coord:GDBvertex2D;
107                       count:GDBInteger;
108                 end;
109 PGDBPolyVertex3D=^GDBPolyVertex3D;
110 GDBPolyVertex3D=packed record
111                       coord:GDBvertex;
112                       count:GDBInteger;
113                       LineNumber:GDBInteger;
114                 end;
115 PGDBvertex2S=^GDBvertex2S;
116 GDBvertex2S=packed record
117                    x,y:GDBFloat;
118              end;
119 GDBvertex2DI=packed record
120                    x,y:GDBInteger;
121              end;
122 
123 {Bounding volume}
124 TBoundingBox=packed record
125                       LBN:GDBvertex;(*'Near'*)
126                       RTF:GDBvertex;(*'Far'*)
127                 end;
128 TBoundingRect=packed record
129                       LB:GDBvertex2D;(*'Near'*)
130                       RT:GDBvertex2D;(*'Far'*)
131                 end;
132 TInBoundingVolume=(IRFully,IRPartially,IREmpty);
133 
134 PGDBvertex2DI=^GDBvertex2DI;
135 GDBvertex2DIArray=packed array [0..0] of GDBvertex2DI;
136 OutBound4V=packed array [0..3]of GDBvertex;
137 PGDBQuad3d=^GDBQuad3d;
138 GDBQuad2d=packed array[0..3] of GDBvertex2D;
139 GDBQuad3d=OutBound4V;
140 PGDBLineProj=^GDBLineProj;
141 GDBLineProj=packed array[0..6] of GDBvertex2D;
142 GDBplane=packed record
143                normal:GDBvertex;
144                d:GDBDouble;
145          end;
146 GDBray=packed record
147              start,dir:GDBvertex;
148        end;
149 GDBPiece=packed record
150              lbegin,dir,lend:GDBvertex;
151        end;
152 ptarcrtmodify=^tarcrtmodify;
153 tarcrtmodify=packed record
154                       p1,p2,p3:GDBVertex2d;
155                 end;
156 {EXPORT-}
157 implementation
158 begin
159 end.
160 
161