Files
envi-code/SourceCode/Code2026/tg_shs/inc/subgeo/TPGeExtend.h
T

76 lines
1.7 KiB
C++
Raw Normal View History

2026-10-04 00:04:20 +08:00
//-------------------------------------------------------------------------------------------------------+
2026-09-28 15:28:50 +08:00
// Copyright (C), 1998-2007, Beijing Tangent Software Co. Ltd.
2026-10-04 00:04:20 +08:00
// = FileName : TPGeExtend 类
2026-09-28 15:28:50 +08:00
// = Version : ver2.0
// = Author : wlw
// = CreateDate : 2002-09-09
2026-10-04 00:04:20 +08:00
// = Description: TPGeExtend 声明 坐标系中的连续区域
2026-09-28 15:28:50 +08:00
// = 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;
2026-10-04 00:04:20 +08:00
//长度为0时代表一点,有效!
2026-09-28 15:28:50 +08:00
bool IsValid() const;
bool operator == (const TPGeExtend& ext) const;
bool operator != (const TPGeExtend& ext) const;
2026-10-04 00:04:20 +08:00
//不相邻
2026-09-28 15:28:50 +08:00
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;
2026-10-04 00:04:20 +08:00
//如果不相交则返回无效TPGeExtend!
2026-09-28 15:28:50 +08:00
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