88 lines
1.9 KiB
C++
88 lines
1.9 KiB
C++
//-----------------------------------------------------------------------------+
|
|
// Copyright (C), 1998-2007, Beijing Tangent Software Co. Ltd.
|
|
// = FileName : TSearchRegionFromCurve 类
|
|
// = Version : ver2.0
|
|
// = Author : wlw
|
|
// = CreateDate : 2002-09-09
|
|
// = Description: TSearchRegionFromCurve 声明
|
|
// = Maintainers:
|
|
//
|
|
//-----------------------------------------------------------------------------+
|
|
#ifndef _TSEARCHREGIONFROMCURVE_H_
|
|
#define _TSEARCHREGIONFROMCURVE_H_
|
|
|
|
#ifndef _TDPTRLIST_H_
|
|
#include "TDPtrList.h"
|
|
#endif
|
|
|
|
#ifndef _TGGECURVESEGMENT_H_
|
|
#include "TGGeCurveSegment.h"
|
|
#endif
|
|
|
|
#ifndef _TGGEREGION_H_
|
|
#include "TGGeRegion.h"
|
|
#endif
|
|
|
|
#ifndef _TGGEREGIONSIDE_H_
|
|
#include "TGGeRegionSide.h"
|
|
#endif
|
|
|
|
#ifndef _TSORTSIDEONVERTEX_H_
|
|
#include "TSortSideOnVertex.h"
|
|
#endif
|
|
|
|
class GEOAPI TSearchRegionFromCurve
|
|
{
|
|
public:
|
|
|
|
TSearchRegionFromCurve();
|
|
|
|
virtual ~TSearchRegionFromCurve();
|
|
|
|
void _XSearchRegionFromCurve();
|
|
|
|
void InitStart(const TDPtrList<TGGeCurveSegment> &lstSegs);
|
|
|
|
//返回最大外区域
|
|
TGGeRegion * SearchRegions();
|
|
|
|
TGGeRegionSide * HitTest(TADSGePoint3d ptMid);
|
|
|
|
//移除重合的区域,返回移除的数目
|
|
int RemoveDupRegions();
|
|
|
|
//求最外区域,返回数目
|
|
int GetOutsideRegions(TDPtrList<int> &lstOutIndex) const;
|
|
|
|
//求最外区域,返回数目
|
|
int GetOutsideRegions1(TDPtrList<int> &lstOutIndex) const;
|
|
|
|
// 找墙的左右房间
|
|
int SerachTwoRegion(TGGeRegionSide &aSide, TGGeRegion &lRegion, TGGeRegion &rRegion);
|
|
|
|
public:
|
|
|
|
static TDPtrList<TSortSideOnVertex> g_lstAllSortSides;
|
|
|
|
TDPtrList<TGGeRegionSide> m_sides;
|
|
|
|
TDPtrList<TGGeRegion> m_regions;
|
|
|
|
private:
|
|
|
|
// 新添SortWallOnPt 到全局变量GlobalSortWalls
|
|
void NewAppend(TGGeRegionSide *pWall);
|
|
|
|
// 从初始组中移邻接的区域到当前组, 返回移动的数目
|
|
BOOL AddAdjacentRegion(TDPtrList<int> &curGroup, TDPtrList<int> &initGroup) const;
|
|
|
|
int ComparePointBySortXY(const TADSGePoint3d *p1, const TADSGePoint3d *p2);
|
|
|
|
private:
|
|
|
|
static TCHAR s_chConstructed;
|
|
};
|
|
|
|
#endif
|
|
|