00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef DIME_LWPOLYLINE_H
00031 #define DIME_LWPOLYLINE_H
00032
00033 #include <dime/entities/ExtrusionEntity.h>
00034
00035 class DIME_DLL_API dimeLWPolyline : public dimeExtrusionEntity
00036 {
00037 public:
00038 dimeLWPolyline();
00039 virtual ~dimeLWPolyline();
00040
00041 virtual dimeEntity *copy(dimeModel * const model) const;
00042 virtual bool getRecord(const int groupcode,
00043 dimeParam ¶m,
00044 const int index) const;
00045 virtual const char *getEntityName() const;
00046
00047 virtual void print() const;
00048 virtual bool write(dimeOutput * const out);
00049 virtual int typeId() const;
00050 virtual int countRecords() const;
00051
00052 virtual GeometryType extractGeometry(dimeArray <dimeVec3f> &verts,
00053 dimeArray <int> &indices,
00054 dimeVec3f &extrusionDir,
00055 dxfdouble &thickness);
00056 int getNumVertices() const;
00057 const dxfdouble *getXCoords() const;
00058 const dxfdouble *getYCoords() const;
00059 const dxfdouble *getStartingWidths() const;
00060 const dxfdouble *getEndWidths() const;
00061 const dxfdouble *getBulges() const;
00062
00063 dxfdouble getElevation() const;
00064 dxfdouble getConstantWidth() const;
00065 int16 getFlags() const;
00066
00067 protected:
00068 virtual bool handleRecord(const int groupcode,
00069 const dimeParam ¶m,
00070 dimeMemHandler * const memhandler);
00071
00072 private:
00073 dxfdouble constantWidth;
00074 dxfdouble elevation;
00075 int16 flags;
00076 int32 numVertices;
00077 int16 tmpCounter;
00078 int16 tmpFlags;
00079 dxfdouble *xcoord;
00080 dxfdouble *ycoord;
00081 dxfdouble *startingWidth;
00082 dxfdouble *endWidth;
00083 dxfdouble *bulge;
00084
00085 };
00086
00087
00088 inline int
00089 dimeLWPolyline::getNumVertices() const
00090 {
00091 return this->numVertices;
00092 }
00093
00094 inline const dxfdouble *
00095 dimeLWPolyline::getXCoords() const
00096 {
00097 return this->xcoord;
00098 }
00099 inline const dxfdouble *
00100 dimeLWPolyline::getYCoords() const
00101 {
00102 return this->ycoord;
00103 }
00104
00105 inline const dxfdouble *
00106 dimeLWPolyline::getStartingWidths() const
00107 {
00108 return this->startingWidth;
00109
00110 }
00111
00112 inline const dxfdouble *
00113 dimeLWPolyline::getEndWidths() const
00114 {
00115 return this->endWidth;
00116 }
00117
00118 inline const dxfdouble *
00119 dimeLWPolyline::getBulges() const
00120 {
00121 return this->bulge;
00122 }
00123
00124 inline dxfdouble
00125 dimeLWPolyline::getElevation() const
00126 {
00127 return this->elevation;
00128 }
00129
00130 inline dxfdouble
00131 dimeLWPolyline::getConstantWidth() const
00132 {
00133 return this->constantWidth;
00134 }
00135
00136 inline int16
00137 dimeLWPolyline::getFlags() const
00138 {
00139 return this->flags;
00140 }
00141
00142
00143 #endif // ! DIME_LWPOLYLINE_H
00144