LWPolyline.h
1 /**************************************************************************\
2  *
3  * FILE: LWPolyline.h
4  *
5  * This source file is part of DIME.
6  * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved.
7  *
8  * This library is free software; you can redistribute it and/or modify it
9  * under the terms of the GNU General Public License, version 2, as
10  * published by the Free Software Foundation.
11  *
12  * This library is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * General Public License (the accompanying file named COPYING) for more
16  * details.
17  *
18  **************************************************************************
19  *
20  * If you need DIME for a non-GPL project, contact Systems In Motion
21  * to acquire a Professional Edition License:
22  *
23  * Systems In Motion http://www.sim.no/
24  * Prof. Brochs gate 6 sales@sim.no
25  * N-7030 Trondheim Voice: +47 22114160
26  * NORWAY Fax: +47 67172912
27  *
28 \**************************************************************************/
29 
30 #ifndef DIME_LWPOLYLINE_H
31 #define DIME_LWPOLYLINE_H
32 
33 #include <dime/entities/ExtrusionEntity.h>
34 
35 class DIME_DLL_API dimeLWPolyline : public dimeExtrusionEntity
36 {
37 public:
39  virtual ~dimeLWPolyline();
40 
41  virtual dimeEntity *copy(dimeModel * const model) const;
42  virtual bool getRecord(const int groupcode,
43  dimeParam &param,
44  const int index) const;
45  virtual const char *getEntityName() const;
46 
47  virtual void print() const;
48  virtual bool write(dimeOutput * const out);
49  virtual int typeId() const;
50  virtual int countRecords() const;
51 
52  virtual GeometryType extractGeometry(dimeArray <dimeVec3f> &verts,
53  dimeArray <int> &indices,
54  dimeVec3f &extrusionDir,
55  dxfdouble &thickness);
56  int getNumVertices() const;
57  const dxfdouble *getXCoords() const;
58  const dxfdouble *getYCoords() const;
59  const dxfdouble *getStartingWidths() const;
60  const dxfdouble *getEndWidths() const;
61  const dxfdouble *getBulges() const;
62 
63  dxfdouble getElevation() const;
64  dxfdouble getConstantWidth() const;
65  int16 getFlags() const;
66 
67 protected:
68  virtual bool handleRecord(const int groupcode,
69  const dimeParam &param,
70  dimeMemHandler * const memhandler);
71 
72 private:
73  dxfdouble constantWidth;
74  dxfdouble elevation;
75  int16 flags;
76  int32 numVertices;
77  int16 tmpCounter; // used during loading only
78  int16 tmpFlags; // ""
79  dxfdouble *xcoord;
80  dxfdouble *ycoord;
81  dxfdouble *startingWidth;
82  dxfdouble *endWidth;
83  dxfdouble *bulge;
84 
85 }; // class dimeLWPolyLine
86 
87 
88 inline int
89 dimeLWPolyline::getNumVertices() const
90 {
91  return this->numVertices;
92 }
93 
94 inline const dxfdouble *
95 dimeLWPolyline::getXCoords() const
96 {
97  return this->xcoord;
98 }
99 inline const dxfdouble *
100 dimeLWPolyline::getYCoords() const
101 {
102  return this->ycoord;
103 }
104 
105 inline const dxfdouble *
106 dimeLWPolyline::getStartingWidths() const
107 {
108  return this->startingWidth;
109 
110 }
111 
112 inline const dxfdouble *
113 dimeLWPolyline::getEndWidths() const
114 {
115  return this->endWidth;
116 }
117 
118 inline const dxfdouble *
119 dimeLWPolyline::getBulges() const
120 {
121  return this->bulge;
122 }
123 
124 inline dxfdouble
125 dimeLWPolyline::getElevation() const
126 {
127  return this->elevation;
128 }
129 
130 inline dxfdouble
131 dimeLWPolyline::getConstantWidth() const
132 {
133  return this->constantWidth;
134 }
135 
136 inline int16
137 dimeLWPolyline::getFlags() const
138 {
139  return this->flags;
140 }
141 
142 
143 #endif // ! DIME_LWPOLYLINE_H
144 

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