#ifndef _CUSTOM_H #define _CUSTOM_H #include #include #include class Custom : public AcDbEntity { public: //initializeaza metodele "isA()", "desc()" si "cast()" ACRX_DECLARE_MEMBERS( Custom ); //constructor implicit Custom() : mStartPoint( 0.0, 0.0, 0.0 ), mEndPoint( 10.0, 0.0, 0.0 ), mRadius1( 2.5 ), mRadius2( 2.5 ) {}; //constructor cu argumente Custom( const AcGePoint3d p1, const AcGePoint3d p2, const double r1, const double r2 ) : mStartPoint( p1 ), mEndPoint( p2 ), mRadius1( r1 ), mRadius2( r2 ) {}; ~Custom(){ }; //destructor //metode de acces AcGePoint3d getStartPoint( ) { return mStartPoint; }; AcGePoint3d getEndPoint( ) { return mEndPoint; }; double getRadius1( ) { return mRadius1; }; double getRadius2( ) { return mRadius2; }; //metode pt. modificarea datelor membru. // OBS: pentru simplificare, nu se testeaza //validitatea datelor. //in mod normal, nu se prea recomanda folosirea //metodelor/functiilor cu retur "void" void setStartPoint( AcGePoint3d pt ) { assertWriteEnabled(); mStartPoint = pt; }; void setEndPoint( AcGePoint3d pt ) { assertWriteEnabled(); mEndPoint = pt; }; void setRadius1( double r1 ) { assertWriteEnabled(); mRadius1 = r1; }; void setRadius2( double r2 ) { assertWriteEnabled(); mRadius2 = r2; }; //metode virtuale ale AcDbObject, redefinite pentru uzul propriu virtual Acad::ErrorStatus dwgInFields(AcDbDwgFiler* filer); virtual Acad::ErrorStatus dwgOutFields(AcDbDwgFiler* filer) const; //si, bineinteles, metoda de reprezentare grafica a obiectului. //Acestea sint metode virtuale ale AcDbEntity virtual Adesk::Boolean worldDraw( AcGiWorldDraw* mode ); virtual void viewportDraw( AcGiViewportDraw* mode ); private: AcGePoint3d mStartPoint, mEndPoint; double mRadius1, mRadius2; }; #endif // _CUSTOM_H