/************************************************************************************** 栅状图类 **************************************************************************************/ #ifndef WELLFENCE_H #define WELLFENCE_H #pragma once class AFX_EXT_CLASS CWellFence : public CWellSection { public: CWellFence(void); virtual ~CWellFence(void); //G_CLONE_ELEMENT(CWellFence) virtual CString GetXmlType() { return _T("FenceDiagram"); } public: double m_xMin; //x最小坐标 double m_yMax; //y最大坐标 double m_fHorzRatio; //水平比例系数 ////// double m_fReferenceY; //剖面情况下井体顶位置y的中间值,仰俯角度改变时的参考点 double m_fCenterY; //所有井体顶位置y的中间值 CWellBaseObjList m_SortObjList; ///按画的先后顺序排序后的井与连层 public: virtual void* CloneElement(void); virtual void Clone(CWellBaseObj& object); virtual void Serialize(CArchive& ar, const short &ver); virtual void Draw(CXyDC* pDC); virtual CBendObj* CreateBendObj() { return new CFenceBendObj; } void RotateWells(); //旋转后,重新计算新的井位置 void ReComputeWells(); //根据仰俯角再次计算井位置 void ReComputeBends(); //旋转后,重新计算新的连层位置 void ReComputeBends(CWellPole* pWell); //井操作后重新计算相关的层位(包含拖动井 拖拽井 拖动道 拖拽道等操作) void SortWellAndBendList(); //重新排列井和连层链表 void ReSetPosition(); //重新计算图形范围 virtual void BuildBends(); //构建Bend与层关系 protected: //旋转后重新计算断层的位置 void ReComputeFaults(); //得到所有井的中心点 CPoint2D GetWellsCenterPoint(); //取得所有井的所在区域的中心点y double GetFenceCenterY(); ///// 计算井位置(fTop 是参考点) virtual void ComputeWellPosition(double fTop); ///// 根据对象的前后位置放入到链表中 virtual void SortObject(); ///// 画连层时检查是否有未画的井位于该连层之间 virtual BOOL FindWellBehindBend(CBendObj* pBend, CWellPole* pWell); ////判断鼠标选中对象 virtual CWellBaseObj* ObjectAt(const CRect8& rect, double dHandleSize, BOOL bNesting=FALSE); public: virtual int ReadPCG_Feature(CXmlParse &xp,const short& ver); virtual int ReadPCG_Section(CFile &fr,const short& ver); virtual int ReadPCG_Wells(CFile &fr,const short& ver); virtual void WritePCG_Feature(CFile &fw,int nBaseTabNum); //pcg文件中 特征 virtual void WritePCG_Tail(CFile &fw,int nBaseTabNum); //pcg文件中 尾部分 }; #endif