layerdata.h
1 /**************************************************************************\
2  *
3  * This source file is part of DIME.
4  * Copyright (C) 1998-2001 by Systems In Motion. All rights reserved.
5  *
6  * This library is free software; you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License, version 2, as
8  * published by the Free Software Foundation.
9  *
10  * This library is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * General Public License (the accompanying file named COPYING) for more
14  * details.
15  *
16  **************************************************************************
17  *
18  * If you need DIME for a non-GPL project, contact Systems In Motion
19  * to acquire a Professional Edition License:
20  *
21  * Systems In Motion http://www.sim.no/
22  * Prof. Brochs gate 6 sales@sim.no
23  * N-7030 Trondheim Voice: +47 22114160
24  * NORWAY Fax: +47 22207097
25  *
26 \**************************************************************************/
27 
28 #ifndef _DXF2VRML_LAYERDATA_H_
29 #define _DXF2VRML_LAYERDATA_H_
30 
31 #include <dime/util/Linear.h>
32 #include <dime/util/Array.h>
33 #include <dime/util/BSPTree.h>
34 #include <stdio.h>
35 
36 class DIME_DLL_API dxfLayerData {
37 public:
38  dxfLayerData(const int colidx);
39  ~dxfLayerData();
40 
41  void setFillmode(const bool fillmode);
42 
43  void addLine(const dimeVec3f &v0, const dimeVec3f &v1,
44  const dimeMatrix * const matrix = NULL);
45 
46  void addPoint(const dimeVec3f &v,
47  const dimeMatrix * const matrix = NULL);
48 
49  void addTriangle(const dimeVec3f &v0,
50  const dimeVec3f &v1,
51  const dimeVec3f &v2,
52  const dimeMatrix * const matrix = NULL);
53  void addQuad(const dimeVec3f &v0,
54  const dimeVec3f &v1,
55  const dimeVec3f &v2,
56  const dimeVec3f &v3,
57  const dimeMatrix * const matrix = NULL);
58 
59  void writeWrl(FILE *fp, int indent, const bool vrml1,
60  const bool only2d);
61 
62 //private:
63 public: // 20011001 thammer - please don't kill me for this ;-)
64 
65  friend class dime2So;
66  friend class dime2Profit;
67 
68  bool fillmode;
69  int colidx;
70  dimeBSPTree facebsp;
71  dimeArray <int> faceindices;
72  dimeBSPTree linebsp;
73  dimeArray <int> lineindices;
74  dimeArray <dimeVec3f> points;
75 };
76 
77 #endif // _DXF2VRML_LAYERDATA_H_

Copyright © 1998-1999, Systems In Motion <sales@sim.no>. All rights reserved.
System documentation was generated using doxygen.