Files
envi-code/SourceCode/Code2026/tg_shs/inc/subgeo/TPGeDscEdge.h
T

76 lines
1.7 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, Beijing Tangent Software Co. Ltd.
2026-10-04 00:04:20 +08:00
// = FileName : TPGeDscEdge 类
2026-09-28 15:28:50 +08:00
// = Version : ver2.0
// = Author : wlw
// = CreateDate : 2002-09-09
2026-10-04 00:04:20 +08:00
// = Description: TPGeDscEdge 声明 离散无向边集合
2026-09-28 15:28:50 +08:00
// = Maintainers:
//
//-------------------------------------------------------------------------------------------------------+
#ifndef _TPGEDSCEDGE_H_
#define _TPGEDSCEDGE_H_
#ifndef _TWFLAG_H_
#include "TWFlag.h"
#endif
#ifndef _TPGEFITPATH_H_
#include "TPGeFitPath.h"
#endif
#ifndef _TPGEEXTEND2D_H_
#include "TPGeExtend2D.h"
#endif
class TPGeGLineSeg2D;
class TPGeDscPoint;
class TPGeFitTriangle;
class GEOAPI TPGeDscEdge : public TWFlag
{
public:
2026-10-04 00:04:20 +08:00
//同时建立点连接!
2026-09-28 15:28:50 +08:00
TPGeDscEdge(TPGeDscPoint* p0,TPGeDscPoint* p1,double len = 0);
virtual ~TPGeDscEdge();
2026-10-04 00:04:20 +08:00
//取另一个点
2026-09-28 15:28:50 +08:00
TPGeDscPoint* GetNextPoint(TPGeDscPoint* pPt) const;
2026-10-04 00:04:20 +08:00
//判断两边是否交叉、重叠
2026-09-28 15:28:50 +08:00
bool IsCrossWith(TPGeDscEdge* pEdge) const;
2026-10-04 00:04:20 +08:00
//计算一般线性插值点,失败返回NULL
2026-09-28 15:28:50 +08:00
TPGeDscPoint* GetFitPoint(double dz);
2026-10-04 00:04:20 +08:00
//从这一边起构造拟合路径,沿途边加VISITED标志
2026-09-28 15:28:50 +08:00
void ConnectPath(TPGeFitPath& path);
void GetExtend2D(TPGeExtend2D& ext);
TPGeGLineSeg2D* CreateEdge();
double GetMinZ();
bool operator >(const TPGeDscEdge& e) const;
bool operator <(const TPGeDscEdge& e) const;
public:
2026-10-04 00:04:20 +08:00
//第一点,第二点<引用>
2026-09-28 15:28:50 +08:00
TPGeDscPoint*pPt0,*pPt1;
2026-10-04 00:04:20 +08:00
//当前拟合点<引用>
2026-09-28 15:28:50 +08:00
TPGeDscPoint*pPtFit;
2026-10-04 00:04:20 +08:00
//边长
2026-09-28 15:28:50 +08:00
double length;
2026-10-04 00:04:20 +08:00
//相领的两个三角
2026-09-28 15:28:50 +08:00
TPGeFitTriangle* pTrgLeft,*pTrgRight;
};
#endif