//-----------------------------------------------------------------------------+ // Copyright (C), 1998-2007, SH Software Co. Ltd. // = FileName : XRectAngle 类 // = Version : ver2.0 // = Author : zjq // = CreateDate : 2002-09-09 // = Description: XRectAngle 类声明 // = Maintainers: // //-----------------------------------------------------------------------------+ #ifndef _XRECTANGLE_H_ #define _XRECTANGLE_H_ #ifndef _XSHAPE_H_ #include "XCell.h" #endif #ifndef _XLINE_H_ #include "XLine.h" #endif #ifndef _XPOLY2D_H_ #include "XPoly2D.h" #endif #ifndef _XPOINT_H_ #include "XPoint.h" #endif // 2D only class GEOAPI XRectAngle : public XCell { public: XRectAngle(); XRectAngle(const ads_point pt1, const ads_point pt2); XRectAngle(const ads_point ptCen, ads_real dWidth, ads_real dHeight); virtual ~XRectAngle(); virtual ShapeType GetShapeType() const; virtual void Center(ads_point ptCen); virtual ads_real Area() const; virtual int Intersection(const XLine & aline, ads_point pt1 = NULL, ads_point pt2 = NULL) const; XPoint GetLowLeft() const ; XPoint GetLowRight() const; XPoint GetUpRight() const; XPoint 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(XPoly2D & poly) const; public: XPoint lowLeft, upRight; }; extern GEOAPI int operator & (const XPoint &pt, const XRectAngle &box); extern GEOAPI int operator & (const XRectAngle &boxIn, const XRectAngle &boxOut); extern GEOAPI int operator & (const XRectAngle &box, XPoly2D &poly); #endif