#pragma once #include "GeShape.h" #include "GeLine.h" #include "GePoly2D.h" #include "ADSGePoint3d.h" class GeRectAngle : public GeShape { public: GeRectAngle(); GeRectAngle(const ads_point pt1, const ads_point pt2); GeRectAngle(const ads_point ptCen, ads_real dWidth, ads_real dHeight); virtual ~GeRectAngle(); virtual ShapeType GetShapeType() const; virtual void Center(ads_point ptCen); virtual ads_real Area() const; virtual int Intersection(const GeLine & aline, ads_point pt1 = NULL, ads_point pt2 = NULL) const; ADSGePoint3d GetLowLeft() const ; ADSGePoint3d GetLowRight() const; ADSGePoint3d GetUpRight() const; ADSGePoint3d 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(GePoly2D & poly) const; public: ADSGePoint3d lowLeft, upRight; }; extern int operator & (const ADSGePoint3d &pt, const GeRectAngle &box); extern int operator & (const GeRectAngle &boxIn, const GeRectAngle &boxOut); extern int operator & (const GeRectAngle &box, GePoly2D &poly);