//-----------------------------------------------------------------------------+ // Copyright (C), 1998-2007, Beijing Tangent Software Co. Ltd. // = FileName : TGGeRectAngle 类 // = Version : ver2.0 // = Author : wlw // = CreateDate : 2002-09-09 // = Description: TGGeRectAngle 类声明 // = Maintainers: // //-----------------------------------------------------------------------------+ #ifndef _TGGERECTANGLE_H_ #define _TGGERECTANGLE_H_ #ifndef _TGGESHAPE_H_ #include "TGGeShape.h" #endif #ifndef _TGGELINE_H_ #include "TGGeLine.h" #endif #ifndef _TGGEPOLY2D_H_ #include "TGGePoly2D.h" #endif #ifndef _TADSGEPOINT3D_H_ #include "TADSGePoint3d.h" #endif // 2D only class GEOAPI TGGeRectAngle : public TGGeShape { public: TGGeRectAngle(); TGGeRectAngle(const ads_point pt1, const ads_point pt2); TGGeRectAngle(const ads_point ptCen, ads_real dWidth, ads_real dHeight); virtual ~TGGeRectAngle(); virtual ShapeType GetShapeType() const; virtual void Center(ads_point ptCen); virtual ads_real Area() const; virtual int Intersection(const TGGeLine & aline, ads_point pt1 = NULL, ads_point pt2 = NULL) const; TADSGePoint3d GetLowLeft() const ; TADSGePoint3d GetLowRight() const; TADSGePoint3d GetUpRight() const; TADSGePoint3d GetUpLeft() const; double Width() const; double Height() const; void Make(const TCHAR * pszlayer = NULL, int nUseLine = 0) const; void SetElevation(ads_real dElev); void AsPoly2D(TGGePoly2D & poly) const; public: TADSGePoint3d lowLeft, upRight; }; extern GEOAPI int operator & (const TADSGePoint3d &pt, const TGGeRectAngle &box); extern GEOAPI int operator & (const TGGeRectAngle &boxIn, const TGGeRectAngle &boxOut); extern GEOAPI int operator & (const TGGeRectAngle &box, TGGePoly2D &poly); #endif