Files

70 lines
1.3 KiB
C++
Raw Permalink Normal View History

2026-10-04 00:04:20 +08:00
//-----------------------------------------------------------------------------+
2026-09-28 15:28:50 +08:00
// Copyright (C), 1998-2007, SH Software Co. Ltd.
2026-10-04 00:04:20 +08:00
// = FileName : XRegion 类
2026-09-28 15:28:50 +08:00
// = Version : ver2.0
// = Author : zjq
// = CreateDate : 2002-09-09
2026-10-04 00:04:20 +08:00
// = Description: XRegion 声明
2026-09-28 15:28:50 +08:00
// = Maintainers:
//
//-----------------------------------------------------------------------------+
#ifndef _XREGION_H_
#define _XREGION_H_
#ifndef _XREGIONSIDE_H_
#include "XRegionSide.h"
#endif
#ifndef _DSTACK_H_
#include "DStack.h"
#endif
#ifndef _XPOLY2D_H_
#include "XPoly2D.h"
#endif
#ifndef _DLIST_H_
#include "DList.h"
#endif
#ifndef _XPOINT_H_
#include "XPoint.h"
#endif
class GEOAPI XRegion : public DStack<XRegionSide>
{
public:
XRegion();
~XRegion();
int ShowMe() const;
ads_real PathArea() const;
int CenterPoly2D(XPoly2D &poly) const;
2026-10-04 00:04:20 +08:00
//求房间中心线的界限
2026-09-28 15:28:50 +08:00
int GetExtend(XPoint &ptLow, XPoint &ptUp) const;
BOOL IsEqualTo(const XRegion &region) const;
BOOL IsAdjacentTo(const XRegion &region) const;
2026-10-04 00:04:20 +08:00
//nFlag--0, 内; 1--外
2026-09-28 15:28:50 +08:00
XPoint GetPoint(int nFlag, double nDist) const;
public:
2026-10-04 00:04:20 +08:00
// 全局房间号
2026-09-28 15:28:50 +08:00
static int g_nGlobalIndex;
2026-10-04 00:04:20 +08:00
//全局所有房间的链表
2026-09-28 15:28:50 +08:00
static DList<XRegion> *g_pAllSpaces;
2026-10-04 00:04:20 +08:00
// 房间号
2026-09-28 15:28:50 +08:00
int m_nIndex;
};
#endif