////////////////////////////////////////////////////////////////////////////// //文件: DFDraw补充绘图元素接口类 //主要功能: // //程序编写: 2005-12-07 // // ///////////////////////////////////////////////////////////////////////////// #pragma once #include ".\fmnfrommapping.h" class CSectionBase; class AFX_EXT_CLASS CDrawExchange { public: CDrawExchange(void); virtual ~CDrawExchange(void); int CreateDrawExchange(CString name,CString m_3dv); int CreateDrawExchangeMapping(CString sfx,CString sfy); virtual void Initialize(void); virtual void* SetDrawExchange(int IsDepth); virtual double V(double x, double y, double t); virtual double Exchange(double& x, double& y); //y=time virtual BOOL IsCanExchange(void); virtual BOOL IsDrawExchange(); virtual void Clear(void); double Exchange(double& m, double& n, double &t); //返回时t为深度 double DrawExchange(double &x,double &y); BOOL IsX(void); BOOL IsY(void); BOOL IsAny(void); //速度场是否是XY方式的 BOOL IsExchangeWidthXY(void) { return pDrawExchangeMapping==NULL ? FALSE:TRUE; } int GetLineSel(void); void SetLineSel(int nXYorAny); //0是Y(主)线,1是X(联)线,2是任意线 void GetMN(double& x, double& y); void SetLineName(int nLineName); //设置三维工区的线名DrawExchangeXY void SetLineName(CString lpszLineName); //根据测线名称设置DrawExchangeXY与m_nLineSelect void SetSection(CSectionBase* pSection); CSectionBase* GetSection(void); //输入的x为CDP号,y为深度值,返回时y为时间,函数返回速度值 double ExchangeToTime(double& x, double& y); void* GetExchangeToTime(void); BOOL CreateExchangeToTime(int numx, int numy, double* cdp); //BEGIN 以下仅是为了层拉平 CCurve* m_pDragCurve; //根据该曲线拉平指定的曲线 double d0; //拉平到该值 void ToDragFlat(CCurve* pCurve); void SetDragCurve(CCurve* pCurve, double bd); double GetOffsetOfDragFlat(double x0); BOOL IsDragFlat(void); //END protected: double DrawExchangeWidthMN(double &m,double &n,double &t); double DrawExchangeWidthXY(double &m,double &n,double &t); protected: CSectionBase *pSectionBase; CDimension3D *pDrawExchange3D; CDimension3D *pDrawExchange3DOld; CFmnFromMapping* pDrawExchangeMapping; void* pExchangeToTime; //根据(CDP,H)插值速度V,深度域解释时用来转换为时间 int m_nLineSelect; //0是Y(主)线,1是X(联)线,2是任意线 double DrawExchangeXY; CFileMapping MappingFxy; int m_nSel; //-1为缺省方式(三维),0为时深曲线方式,1为二维测线方式 }; class AFX_EXT_CLASS CDrawExchangeCurve : public CDrawExchange { public: CDrawExchangeCurve(void); virtual ~CDrawExchangeCurve(void); virtual void Clear(void); public: virtual void Initialize(void); virtual void* SetDrawExchange(int IsDepth); virtual double Exchange(double& x, double& y); virtual BOOL IsCanExchange(void); virtual BOOL IsDrawExchange(); int CreateDrawExchangeCurve(CString tv_curve_file); double DrawExchangeWidthCurve(double& x, double& y); BOOL IsCurveExchange(void); protected: //时速曲线变换方式 CCurve* m_pCurve, *m_pCurveOld; }; class AFX_EXT_CLASS CDrawExchange2D : public CDrawExchangeCurve { public: CDrawExchange2D(void); virtual ~CDrawExchange2D(void); virtual double Exchange(double& x, double& y); //x为CDP号,y为时间 virtual BOOL IsDrawExchange(); void SetCurve2D(CCurve* pCurve); BOOL IsExchange2D(void); int SetCurve2D(CString strCurveFile); protected: double m_prevCDP; double m_prevX; double m_prevY; }; //CDrawExchange2D* GetDrawExchange(void); //double DrawExchangeToDepth(double &x,double &y);