//-------------------------------------------------------------------------------------------------------+ // Copyright (C), 1998-2007, Beijing Tangent Software Co. Ltd. // = FileName : TPGeFitGraph3D 类 // = Version : ver2.0 // = Author : wlw // = CreateDate : 2002-09-09 // = Description: TPGeFitGraph3D 声明 拟合图 // = Maintainers: // //-------------------------------------------------------------------------------------------------------+ #ifndef _TPGEFITGRAPH3D_H_ #define _TPGEFITGRAPH3D_H_ #ifndef _TPGEDSCPOINT3D_H_ #include "TPGeDscPoint3D.h" #endif #ifndef _TPDLIST_H_ #include "TPDList.h" #endif #ifndef _TPDLISTEX_H_ #include "TPDListEx.h" #endif #ifndef _TPGEFITPATH3D_H_ #include "TPGeFitPath3D.h" #endif #ifndef _TPGEDSCEDGE3D_H_ #include "TPGeDscEdge3D.h" #endif #ifndef _TPGEFITTRIANGLE3D_H_ #include "TPGeFitTriangle3D.h" #endif class GEOAPI TPGeFitGraph3D { public: TPGeFitGraph3D(); virtual ~TPGeFitGraph3D(); //加三角形 virtual TPGeFitTriangle3D* AppendTriangle(TPGeDscPoint3D pt0,TPGeDscPoint3D pt1,TPGeDscPoint3D pt2); //遍历点 virtual long GetPointNum() const; TPGeDscPoint3D& operator [](long i); //拟合出等值线,执行前边表和三角形表要准备好! virtual void Fit(double value,double vSnap = 0); //清理工作区 virtual void Reset(); public: //拟合曲线路径,结果 TPDList newPath; protected: TPGeDscPoint3D* FindOrAddPoint(TPGeDscPoint3D pt); TPGeDscEdge3D* FindOrAddEdge(TPGeDscPoint3D pt0,TPGeDscPoint3D pt1); protected: //所有离散点,不能有相同点 TPDListEx allPoint; //所有组成三角形边 TPDListEx allEdge; //所有三角形 TPDListEx allTrg; //拟合生成点 TPDList newPoint; //拟合生成边 TPDList newEdge; }; #endif