Files
envi-code/SourceCode/Code2026/inc/AdsXRx/XSearchRegionFromCurve.h
T

87 lines
1.9 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, SH Software Co. Ltd.
2026-10-04 00:04:20 +08:00
// = FileName : XSearchRegionFromCurve 类
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: XSearchRegionFromCurve 声明
2026-09-28 15:28:50 +08:00
// = Maintainers:
//
//-----------------------------------------------------------------------------+
#ifndef _XSearchRegionFromCurve_H_
#define _XSearchRegionFromCurve_H_
#ifndef _DLIST_H_
#include "DList.h"
#endif
#ifndef _XCURVESEGMENT_H_
#include "XCurveSegment.h"
#endif
#ifndef _XREGION_H_
#include "XRegion.h"
#endif
#ifndef _XREGIONSIDE_H_
#include "XRegionSide.h"
#endif
#ifndef _XSortSideOnVertex_H_
#include "XSortSideOnVertex.h"
#endif
class GEOAPI XSearchRegionFromCurve
{
public:
XSearchRegionFromCurve();
virtual ~XSearchRegionFromCurve();
void _XSearchRegionFromCurve();
void InitStart(const DList<XCurveSegment> &lstSegs);
2026-10-04 00:04:20 +08:00
//返回最大外区域
2026-09-28 15:28:50 +08:00
XRegion * SearchRegions();
XRegionSide * HitTest(XPoint ptMid);
2026-10-04 00:04:20 +08:00
//移除重合的区域,返回移除的数目
2026-09-28 15:28:50 +08:00
int RemoveDupRegions();
2026-10-04 00:04:20 +08:00
//求最外区域,返回数目
2026-09-28 15:28:50 +08:00
int GetOutsideRegions(DList<int> &lstOutIndex) const;
2026-10-04 00:04:20 +08:00
//求最外区域,返回数目
2026-09-28 15:28:50 +08:00
int GetOutsideRegions1(DList<int> &lstOutIndex) const;
2026-10-04 00:04:20 +08:00
// 找墙的左右房间
2026-09-28 15:28:50 +08:00
int SerachTwoRegion(XRegionSide &aSide, XRegion &lRegion, XRegion &rRegion);
public:
static DList<XSortSideOnVertex> g_lstAllSortSides;
DList<XRegionSide> m_sides;
DList<XRegion> m_regions;
private:
2026-10-04 00:04:20 +08:00
// 新添SortWallOnPt 到全局变量GlobalSortWalls
2026-09-28 15:28:50 +08:00
void NewAppend(XRegionSide *pWall);
2026-10-04 00:04:20 +08:00
// 从初始组中移邻接的区域到当前组, 返回移动的数目
2026-09-28 15:28:50 +08:00
BOOL AddAdjacentRegion(DList<int> &curGroup, DList<int> &initGroup) const;
int ComparePointBySortXY(const XPoint *p1, const XPoint *p2);
private:
static TCHAR s_chConstructed;
};
#endif