//-------------------------------------------------------------------------------------------------------+ // Copyright (C), 1998-2007, Beijing Tangent Software Co. Ltd. // = FileName : TPGeExtend 类 // = Version : ver2.0 // = Author : wlw // = CreateDate : 2002-09-09 // = Description: TPGeExtend 声明 坐标系中的连续区域 // = Maintainers: // //-------------------------------------------------------------------------------------------------------+ #ifndef _TPGEEXTEND_H_ #define _TPGEEXTEND_H_ class GEOAPI TPGeExtend { public: TPGeExtend(double min = 0,double max = 0); virtual ~TPGeExtend(); void SetRange(double min,double max); double GetMin() const; double GetMax() const; double GetLength() const; double GetCenter() const; //长度为0时代表一点,有效! bool IsValid() const; bool operator == (const TPGeExtend& ext) const; bool operator != (const TPGeExtend& ext) const; //不相邻 bool operator > (const TPGeExtend& ext) const; bool operator >= (const TPGeExtend& ext) const; bool operator < (const TPGeExtend& ext) const; bool operator <= (const TPGeExtend& ext) const; bool IsInside(double x) const; bool IsInside(const TPGeExtend& ext) const; bool IsInclude(double x) const; bool IsInclude(const TPGeExtend& ext) const; bool IsIntersect(const TPGeExtend& ext) const; bool IsConnect(const TPGeExtend&ext) const; //如果不相交则返回无效TPGeExtend! TPGeExtend operator & (const TPGeExtend& ext) const; TPGeExtend operator + (const TPGeExtend &ext) const; TPGeExtend& operator += (const TPGeExtend& ext); void Inflate(double d); public: double m_fMin; double m_fMax; }; #endif