59 lines
1.1 KiB
C++
59 lines
1.1 KiB
C++
//-----------------------------------------------------------------------------+
|
|
// Copyright (C), 1998-2007, Beijing Tangent Software Co. Ltd.
|
|
// = FileName : TPGeEdge.h
|
|
// = Version : ver2.0
|
|
// = Author : xlc
|
|
// = CreateDate : 2002-09-09
|
|
// = Description: 类的声明 有向边
|
|
|
|
// = Maintainers:
|
|
//
|
|
//-----------------------------------------------------------------------------+
|
|
#ifndef _TPGEEDGE_H_
|
|
#define _TPGEEDGE_H_
|
|
|
|
#ifndef _TWFLAG_H_
|
|
#include "TWFlag.h"
|
|
#endif
|
|
|
|
#ifndef _TPGEEDGEPATH_H_
|
|
#include "TPGeEdgePath.h"
|
|
#endif
|
|
|
|
class TGNode;
|
|
class TPGeCurve2D;
|
|
|
|
class GEOAPI TPGeEdge : public TWFlag
|
|
{
|
|
public:
|
|
|
|
TPGeEdge(TPGeCurve2D*p);
|
|
|
|
virtual ~TPGeEdge();
|
|
|
|
TPGeCurve2D* FetchEdge();
|
|
|
|
TGNode* EndNode()const;
|
|
|
|
void SetNode(TGNode*p1,TGNode*p2);
|
|
|
|
//path找从经过这一边的可能的唯一环路(或者说是第一个环路)
|
|
bool FindLoop(TPGeEdgePath&path);
|
|
|
|
bool operator >(const TPGeEdge&)const;
|
|
|
|
bool operator <(const TPGeEdge&)const;
|
|
|
|
protected:
|
|
|
|
//不封闭曲线段或一端无限曲线
|
|
TPGeCurve2D *pSeg;
|
|
|
|
//起点
|
|
TGNode *pNodeStart;
|
|
|
|
//终点
|
|
TGNode *pNodeEnd;
|
|
};
|
|
|
|
#endif |