|
|
|
|
|
#pragma once
|
|
|
|
|
|
#include "scatteredtracer.h"
|
|
|
|
|
|
|
|
|
|
|
|
class CFaciesTracer : public CFaciesRgnTracer
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
|
|
|
|
|
CFaciesTracer();
|
|
|
|
|
|
~CFaciesTracer();
|
|
|
|
|
|
//Attributes
|
|
|
|
|
|
public:
|
|
|
|
|
|
struct APPENDCONTROLPOINTSPLIT
|
|
|
|
|
|
{
|
|
|
|
|
|
int iTriangleIndex0[3];
|
|
|
|
|
|
int iTriangleIndex1[3];
|
|
|
|
|
|
};
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
|
|
CArray<APPENDCONTROLPOINTSPLIT,APPENDCONTROLPOINTSPLIT> m_AppendControlPointSplitArray;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⾮<EFBFBD><E2BEAE><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>εķָ<C4B7><D6B8><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
|
|
CArray<CPoint2D,CPoint2D> m_OldPointArray;//ԭʼ<D4AD><CABC>,<2C><><EFBFBD><EFBFBD><EFBFBD>ε<EFBFBD><CEB5>е<EFBFBD>
|
|
|
|
|
|
CArray<CPoint2D,CPoint2D> m_NewPointArray;//<2F><>Ӧ<EFBFBD><D3A6><EFBFBD>ƶ<EFBFBD><C6B6><EFBFBD><EFBFBD>ĵ<EFBFBD>
|
|
|
|
|
|
|
|
|
|
|
|
//Operations
|
|
|
|
|
|
public:
|
|
|
|
|
|
void TraceStringData(int iPrecision);//<2F><><EFBFBD>ִ<EFBFBD><D6B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><D7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD>
|
|
|
|
|
|
|
|
|
|
|
|
// <><D7B7><EFBFBD><EFBFBD>
|
|
|
|
|
|
void TraceStringDataLine();
|
|
|
|
|
|
|
|
|
|
|
|
void TraceStringDataSearchStart(int& iTriangleIndex,BYTE& byteBorderIndex);
|
|
|
|
|
|
|
|
|
|
|
|
virtual void Clear();
|
|
|
|
|
|
|
|
|
|
|
|
double GetTriangleStringValueByPointStringValue(double dData0,double dData1,double dData2);
|
|
|
|
|
|
|
|
|
|
|
|
void InterpolateValue();
|
|
|
|
|
|
|
|
|
|
|
|
void EnhanceSmooth();
|
|
|
|
|
|
|
|
|
|
|
|
void EnhanceSmooth(CArray<int,int>& TriangleIndexArray,CArray<BYTE,BYTE>& BorderIndexArray,BOOL bClose);
|
|
|
|
|
|
|
|
|
|
|
|
void CalculateSmoothPoint(CPoint2D& p0,CPoint2D& p1,CPoint2D& p2,CPoint2D& p3,CPoint2D& p4,CPoint2D& pa,CPoint2D& pb,double dFactor0=1.0,double dFactor1=1.0);
|
|
|
|
|
|
|
|
|
|
|
|
double CalculateCutPosition(int iTriangleIndex,BYTE byteBorderIndex,BOOL bOutBorder,double& dLeftValue,double& dRightValue);
|
|
|
|
|
|
|
|
|
|
|
|
CPoint2D CalculateCutPoint(int iTriangleIndex,BYTE byteBorderInde);
|
|
|
|
|
|
|
|
|
|
|
|
void SavePointMoved();//<2F><><EFBFBD><EFBFBD><EFBFBD>༭<EFBFBD>ۼ<EFBFBD>
|
|
|
|
|
|
|
|
|
|
|
|
BOOL AddSavedPointToTriangle();
|
|
|
|
|
|
|
|
|
|
|
|
CPoint2D GetSavedPointFromTriangle(int iTriangleIndex,BYTE byteBorderIndex);
|
|
|
|
|
|
|
|
|
|
|
|
double CalculateBorderPositionA(int iTriangleIndex,BYTE byteBorderIndex);
|
|
|
|
|
|
|
|
|
|
|
|
void SetFaciesTypeManager(CFaciesTypeMgr* pFaciesTypeManager);
|
|
|
|
|
|
|
|
|
|
|
|
CFaciesTypeMgr* GetFaciesTypeManager();
|
|
|
|
|
|
|
|
|
|
|
|
BOOL Prepare(int iPrecision);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
|
|
void AddAppendControlPointToTriangleGrid(int index);
|
|
|
|
|
|
|
|
|
|
|
|
void RemoveAppendControlPointFromTriangleGrid(int index);
|
|
|
|
|
|
};
|