71 lines
1.3 KiB
C++
71 lines
1.3 KiB
C++
//-----------------------------------------------------------------------------+
|
|
// Copyright (C), 1998-2007, SH Software Co. Ltd.
|
|
// = FileName : XRegion 类
|
|
// = Version : ver2.0
|
|
// = Author : zjq
|
|
// = CreateDate : 2002-09-09
|
|
// = Description: XRegion 声明
|
|
// = 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;
|
|
|
|
//求房间中心线的界限
|
|
int GetExtend(XPoint &ptLow, XPoint &ptUp) const;
|
|
|
|
BOOL IsEqualTo(const XRegion ®ion) const;
|
|
|
|
BOOL IsAdjacentTo(const XRegion ®ion) const;
|
|
|
|
//nFlag--0, 内; 1--外
|
|
XPoint GetPoint(int nFlag, double nDist) const;
|
|
|
|
public:
|
|
|
|
// 全局房间号
|
|
static int g_nGlobalIndex;
|
|
|
|
//全局所有房间的链表
|
|
static DList<XRegion> *g_pAllSpaces;
|
|
|
|
// 房间号
|
|
int m_nIndex;
|
|
};
|
|
|
|
#endif
|