83 lines
1.9 KiB
C++
83 lines
1.9 KiB
C++
//-------------------------------------------------------------------------------------------------------+
|
|
// Copyright (C), 1998-2007, Beijing Tangent Software Co. Ltd.
|
|
// = FileName : TPGeExtend2D Àà
|
|
// = Version : ver2.0
|
|
// = Author : wlw
|
|
// = CreateDate : 2002-09-09
|
|
// = Description: TPGeExtend2D ÉùÃ÷
|
|
// = Maintainers:
|
|
//
|
|
//-------------------------------------------------------------------------------------------------------+
|
|
#ifndef _TPGEEXTEND2D_H_
|
|
#define _TPGEEXTEND2D_H_
|
|
|
|
#ifndef _TPGEEXTEND_H_
|
|
#include "TPGeExtend.h"
|
|
#endif
|
|
|
|
class GEOAPI TPGeExtend2D
|
|
{
|
|
public:
|
|
|
|
TPGeExtend2D(double xMin = 0,double xMax = 0,double yMin = 0,double yMax = 0);
|
|
|
|
TPGeExtend2D(const TPGeExtend& xExt,const TPGeExtend& yExt);
|
|
|
|
virtual ~TPGeExtend2D();
|
|
|
|
virtual bool IsSameWith(const TPGeExtend2D*pExt) const;
|
|
|
|
void SetRange(double xMin,double xMax,double yMin,double yMax);
|
|
|
|
void SetRange(const TPGeExtend& xExt,const TPGeExtend& yExt);
|
|
|
|
TPGeExtend GetXExtend() const;
|
|
|
|
TPGeExtend GetYExtend() const;
|
|
|
|
double GetLength() const;
|
|
|
|
double GetHeight() const;
|
|
|
|
double GetArea() const;
|
|
|
|
bool IsValid() const;
|
|
|
|
bool operator == (const TPGeExtend2D& ext) const;
|
|
|
|
bool operator != (const TPGeExtend2D& ext) const;
|
|
|
|
bool operator > (const TPGeExtend2D& ext) const;
|
|
|
|
bool operator >= (const TPGeExtend2D& ext) const;
|
|
|
|
bool operator < (const TPGeExtend2D& ext) const;
|
|
|
|
bool operator <= (const TPGeExtend2D& ext) const;
|
|
|
|
bool IsInclude(double x,double y) const;
|
|
|
|
bool IsInside(double x,double y) const;
|
|
|
|
bool IsInside(const TPGeExtend2D& ext) const;
|
|
|
|
bool IsInclude(const TPGeExtend2D& ext) const;
|
|
|
|
bool IsIntersect(const TPGeExtend2D& ext) const;
|
|
|
|
bool IsConnect(const TPGeExtend2D& ext) const;
|
|
|
|
TPGeExtend2D operator & (const TPGeExtend2D& ext) const;
|
|
|
|
TPGeExtend2D operator + (const TPGeExtend2D& ext) const;
|
|
|
|
TPGeExtend2D& operator += (const TPGeExtend2D& ext);
|
|
|
|
void Inflate(double d);
|
|
|
|
public:
|
|
|
|
TPGeExtend m_xExt,m_yExt;
|
|
};
|
|
|
|
#endif |