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 
19 unit uzglgeomdata;
20 {$INCLUDE def.inc}
21 interface
22 uses uzgindexsarray,uzgvertex3sarray,sysutils,uzbtypesbase,uzbtypes,uzbmemman,
23      gzctnrvectortypes,uzbgeomtypes,uzegeometry;
24 type
25 {Export+}
26 ZGLGeomData={$IFNDEF DELPHI}packed{$ENDIF}object(GDBaseObject)
27                                                 Vertex3S:ZGLVertex3Sarray;
28                                                 Indexes:ZGLIndexsArray;
29                                                 constructor init({$IFDEF DEBUGBUILD}ErrGuid:pansichar;{$ENDIF}m:GDBInteger);
30                                                 destructor done;virtual;
31                                                 procedure Clear;virtual;
32                                                 procedure Shrink;virtual;
Add2DPointnull33                                                 function Add2DPoint(const x,y:fontfloat):TArrayIndex;virtual;
34                                           end;
35 {Export-}
36 implementation
37 //uses log;
ZGLGeomData.Add2DPointnull38 function ZGLGeomData.Add2DPoint(const x,y:fontfloat):TArrayIndex;
39 var
40     vs:GDBvertex3S;
41 begin
42      vs.x:=x;
43      vs.y:=y;
44      vs.z:=0;
45      result:=Vertex3S.PushBackData(vs);
46 end;
47 constructor ZGLGeomData.init;
48 begin
49   Vertex3S.init({$IFDEF DEBUGBUILD}ErrGuid,{$ENDIF}m);
50   Indexes.init({$IFDEF DEBUGBUILD}ErrGuid,{$ENDIF}m);
51 end;
52 destructor ZGLGeomData.done;
53 begin
54   Vertex3S.done;
55   Indexes.done;
56 end;
57 procedure ZGLGeomData.Clear;
58 begin
59   Vertex3S.Clear;
60   Indexes.Clear;
61 end;
62 procedure ZGLGeomData.Shrink;
63 begin
64   Vertex3S.Shrink;
65   Indexes.Shrink;
66 end;
67 begin
68 end.
69 
70