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_ARC_H
00031 #define DIME_ARC_H
00032
00033 #include <dime/Basic.h>
00034 #include <dime/entities/ExtrusionEntity.h>
00035 #include <dime/util/Linear.h>
00036
00037 class DIME_DLL_API dimeArc : public dimeExtrusionEntity
00038 {
00039 public:
00040 dimeArc();
00041
00042 void setCenter(const dimeVec3f &c);
00043 void getCenter(dimeVec3f &c) const;
00044 void setRadius(const dxfdouble r);
00045 dxfdouble getRadius() const;
00046 void setStartAngle(const dxfdouble a);
00047 dxfdouble getStartAngle() const;
00048 void setEndAngle(const dxfdouble a);
00049 dxfdouble getEndAngle() const;
00050
00051 virtual bool getRecord(const int groupcode,
00052 dimeParam ¶m,
00053 const int index = 0) const;
00054 virtual const char *getEntityName() const;
00055
00056 virtual dimeEntity *copy(dimeModel * const model) const;
00057
00058 virtual void print() const;
00059 virtual bool write(dimeOutput * const out);
00060 virtual int typeId() const;
00061 virtual int countRecords() const;
00062
00063 virtual GeometryType extractGeometry(dimeArray <dimeVec3f> &verts,
00064 dimeArray <int> &indices,
00065 dimeVec3f &extrusionDir,
00066 dxfdouble &thickness);
00067
00068 protected:
00069 virtual bool handleRecord(const int groupcode,
00070 const dimeParam ¶m,
00071 dimeMemHandler * const memhandler);
00072
00073 private:
00074 dimeVec3f center;
00075 dxfdouble radius;
00076 dxfdouble startAngle;
00077 dxfdouble endAngle;
00078
00079 };
00080
00081
00082
00083
00084
00085 inline void
00086 dimeArc::setCenter(const dimeVec3f &c)
00087 {
00088 this->center = c;
00089 }
00090
00091 inline void
00092 dimeArc::getCenter(dimeVec3f &c) const
00093 {
00094 c = this->center;
00095 }
00096
00097 inline void
00098 dimeArc::setRadius(const dxfdouble r)
00099 {
00100 this->radius = r;
00101 }
00102
00103 inline dxfdouble
00104 dimeArc::getRadius() const
00105 {
00106 return this->radius;
00107 }
00108
00109 inline void
00110 dimeArc::setStartAngle(const dxfdouble a)
00111 {
00112 this->startAngle = a;
00113 }
00114
00115 inline dxfdouble
00116 dimeArc::getStartAngle() const
00117 {
00118 return this->startAngle;
00119 }
00120
00121 inline void
00122 dimeArc::setEndAngle(const dxfdouble a)
00123 {
00124 this->endAngle = a;
00125 }
00126
00127 inline dxfdouble
00128 dimeArc::getEndAngle() const
00129 {
00130 return this->endAngle;
00131 }
00132
00133 #endif // ! DIME_ARC_H
00134