Files
envi-code/SourceCode/Code2026/tg_shs/inc/subgeo/TPGeFitGraph.h
T
2026-09-28 15:28:50 +08:00

112 lines
2.2 KiB
C++

//-------------------------------------------------------------------------------------------------------+
// Copyright (C), 1998-2007, Beijing Tangent Software Co. Ltd.
// = FileName : TPGeFitGraph 类
// = Version : ver2.0
// = Author : wlw
// = CreateDate : 2002-09-09
// = Description: TPGeFitGraph 声明 拟合图
// = Maintainers:
//
//-------------------------------------------------------------------------------------------------------+
#ifndef _TPGEFITGRAPH_H_
#define _TPGEFITGRAPH_H_
#ifndef _TPGEDSCPOINT_H_
#include "TPGeDscPoint.h"
#endif
#ifndef _TPDLIST_H_
#include "TPDList.h"
#endif
#ifndef _TPDLISTEX_H_
#include "TPDListEx.h"
#endif
#ifndef _TPGEFITPATH3D_H_
#include "TPGeFitPath3D.h"
#endif
#ifndef _TPGEDSCEDGE_H_
#include "TPGeDscEdge.h"
#endif
#ifndef _TPGEFITTRIANGLE3D_H_
#include "TPGeFitTriangle3D.h"
#endif
#ifndef _TGOBJECTLIST_H_
#include "TGObjectList.h"
#endif
#ifndef _TPGEFITPATH_H_
#include "TPGeFitPath.h"
#endif
class GEOAPI TPGeFitGraph
{
public:
virtual ~TPGeFitGraph();
TPGeDscPoint* FindOrAddPoint(TPGeDscPoint pt);
void AppendPoint(TPGeDscPoint* pPt);
void AppendEdge(TPGeDscEdge* pEdge);
void AppendTriangle(TPGeFitTriangle* pTrg);
void AppendEdge(TPGeDscPoint* p0,TPGeDscPoint* p1);
void AppendTriangle(TPGeDscEdge* p0,TPGeDscEdge* p1,TPGeDscEdge* p2);
//由离散点自动生成边,设置最大边长可提高速度!执行前点要准备好!
//连接原则:短边优先,且禁止交叉、重叠边出现
void MakeEdge(double maxDist = 0);
//由边表自动生成三角形,执行前边要连接好!
void MakeTriangle();
//拟合出Z等高线,执行前边表和三角形表要准备好!
void Fit(double z,double zSnap = 0);
//清理工作区
void Reset();
void CreatePoint(TGObjectList& res);
void CreateEdge(TGObjectList& res);
void CreateFitEdge(TGObjectList& res);
void CreateCurve(TGObjectList& res);
void CreateTriangle(TGObjectList& res);
public:
//拟合曲线路径,结果
TPDList<TPGeFitPath> newPath;
protected:
//所有离散点,不能有相同点
TPDListEx<TPGeDscPoint> allPoint;
//所有组成三角形边
TPDList<TPGeDscEdge> allEdge;
//所有三角形
TPDList<TPGeFitTriangle> allTrg;
//拟合生成点
TPDList<TPGeDscPoint> newPoint;
//拟合生成边
TPDList<TPGeDscEdge> newEdge;
};
#endif