100 lines
2.1 KiB
C++
100 lines
2.1 KiB
C++
//-------------------------------------------------------------------------------------------------------+
|
|
// Copyright (C), 1998-2007, Beijing Tangent Software Co. Ltd.
|
|
// = FileName : TPGeDscPoint 类
|
|
// = Version : ver2.0
|
|
// = Author : wlw
|
|
// = CreateDate : 2002-09-09
|
|
// = Description: TPGeDscPoint 声明 离散点
|
|
// = Maintainers:
|
|
//
|
|
//-------------------------------------------------------------------------------------------------------+
|
|
#ifndef _TPGEDSCPOINT_H_
|
|
#define _TPGEDSCPOINT_H_
|
|
|
|
#ifndef _TGPOINT_H_
|
|
#include "TGPoint.h"
|
|
#endif
|
|
|
|
#ifndef _TDUALPTRLIST_H_
|
|
#include "TDualPtrList.h"
|
|
#endif
|
|
|
|
#ifndef _TPGEFITTRIANGLE_H_
|
|
#include "TPGeFitTriangle.h"
|
|
#endif
|
|
|
|
#ifndef _TPDLIST_H_
|
|
#include "TPDList.h"
|
|
#endif
|
|
|
|
#ifndef _TTABLE_H_
|
|
#include "TTable.h"
|
|
#endif
|
|
|
|
class TPGeDscEdge;
|
|
class TGPoint2D;
|
|
|
|
class GEOAPI TPGeDscPoint : public TGPoint
|
|
{
|
|
public:
|
|
|
|
TPGeDscPoint(double X = 0,double Y = 0,double Z = 0);
|
|
|
|
TPGeDscPoint(const TPGeDscPoint &pt);
|
|
|
|
virtual ~TPGeDscPoint();
|
|
|
|
|
|
double GetValue() const;
|
|
|
|
void SetValue(double value);
|
|
|
|
void AppendValue(double value);
|
|
|
|
long GetEdgeNum() const;
|
|
|
|
void AppendEdge(TPGeDscEdge*p);
|
|
|
|
void RemoveEdge(TPGeDscEdge*p);
|
|
|
|
//找到pPtTo的边,失败返回NULL
|
|
TPGeDscEdge* FindEdge(TPGeDscPoint *pPtTo);
|
|
|
|
//构造相关的剩余所有正确三角形
|
|
void MakeTriangle(TPDList<TPGeFitTriangle> &allTrg);
|
|
|
|
//去除所有连接数据,且通知连接点也更新,不删除边本身!
|
|
void RemoveAllEdge();
|
|
|
|
//取出所有邻接点
|
|
void GetConnectPoint(TTable<TPGeDscPoint*> &connectPoint);
|
|
|
|
//特殊线性插值,失败返回NULL
|
|
TPGeDscPoint *GetFitPoint(double z,double zSnap);
|
|
|
|
//对边进行角度排序
|
|
void Arrange();
|
|
|
|
//pEdge为出发边,找邻边的邻接点(逆时针邻边优先),最后pEgde返回当前边
|
|
TPGeDscPoint* FindNext(TPGeDscEdge*&pEdge);
|
|
|
|
TGPoint2D* CreatePoint();
|
|
|
|
bool operator == (const TPGeDscPoint&pt) const;
|
|
|
|
bool operator != (const TPGeDscPoint&pt) const;
|
|
|
|
bool operator > (const TPGeDscPoint&pt) const;
|
|
|
|
bool operator < (const TPGeDscPoint&pt) const;
|
|
|
|
protected:
|
|
|
|
//重合点计数
|
|
int m_ptCount;
|
|
|
|
//所有连接边<引用>
|
|
TDualPtrList<TPGeDscEdge*> allEdge;
|
|
};
|
|
|
|
#endif |