71 lines
1.3 KiB
C++
71 lines
1.3 KiB
C++
//-----------------------------------------------------------------------------+
|
|||
|
|
// Copyright (C), 1998-2007, Beijing Tangent Software Co. Ltd.
|
||
|
|
// = FileName : TPtList.h
|
||
|
|
// = Version : ver2.0
|
||
|
|
// = Author : xlc
|
||
|
|
// = CreateDate : 2002-09-09
|
||
|
|
// = Description: 几何计算数据结构类的声明
|
||
|
|
// = Maintainers:
|
||
|
|
//
|
||
|
|
//-----------------------------------------------------------------------------+
|
||
|
|
#ifndef _TPTLIST_H_
|
||
|
|
#define _TPTLIST_H_
|
||
|
|
|
||
|
|
#ifndef _TPGEGLIST_H_
|
||
|
|
#include "TPGeGList.h"
|
||
|
|
#endif
|
||
|
|
|
||
|
|
#ifndef _TGPOINT_H_
|
||
|
|
#include "TGPoint.h"
|
||
|
|
#endif
|
||
|
|
|
||
|
|
#ifndef _TGMLINE2D_H_
|
||
|
|
#include "TGMLine2D.h"
|
||
|
|
#endif
|
||
|
|
|
||
|
|
#ifndef _TLIST_H_
|
||
|
|
#include "TList.h"
|
||
|
|
#endif
|
||
|
|
|
||
|
|
class TGPolygon2D;
|
||
|
|
class TGPolygonEx2D;
|
||
|
|
|
||
|
|
class GEOAPI TPtList : public TPGeGList< TGPoint >
|
||
|
|
{
|
||
|
|
public:
|
||
|
|
|
||
|
|
TPtList();
|
||
|
|
|
||
|
|
TPtList(const TGPoint& pt);
|
||
|
|
|
||
|
|
TPtList(const TGMLine2D& mLine);
|
||
|
|
|
||
|
|
virtual ~TPtList();
|
||
|
|
|
||
|
|
TPtList *Next()const;
|
||
|
|
|
||
|
|
TPtList *GetTail()const;
|
||
|
|
|
||
|
|
//返回新长度,去除相邻相同点
|
||
|
|
long RemoveDupPoint(TList<TPtList*> &delList);
|
||
|
|
|
||
|
|
long RemoveDupPoint();
|
||
|
|
|
||
|
|
TGMLine2D *NewMLine2D()const;
|
||
|
|
|
||
|
|
TGPolygon2D* NewPolygon2D()const;
|
||
|
|
|
||
|
|
TGPolygonEx2D* NewLFace2D()const;
|
||
|
|
|
||
|
|
bool operator >(const TPtList&)const;
|
||
|
|
|
||
|
|
bool operator <(const TPtList&)const;
|
||
|
|
|
||
|
|
bool operator ==(const TPtList& pt)const;
|
||
|
|
|
||
|
|
bool operator !=(const TPtList& pt)const;
|
||
|
|
|
||
|
|
bool MakeMLine2D(TGMLine2D& mLine,bool bReverse = false)const;
|
||
|
|
};
|
||
|
|
|
||
|
|
#endif
|