You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
94 lines
2.8 KiB
C++
94 lines
2.8 KiB
C++
#pragma once
|
|
|
|
#include "CommonDefines.h"
|
|
|
|
class CPointSeriesManager;
|
|
class CGDFSegment;
|
|
|
|
//是构成CElementLine和CElementFill的基本单位
|
|
class CPointSeries : public CObject
|
|
{
|
|
public:
|
|
DECLARE_SERIAL(CPointSeries)
|
|
CPointSeries(CPointSeriesManager* pSeriesManager=NULL);
|
|
~CPointSeries();
|
|
//Attributes
|
|
private:
|
|
POINTSERIESID m_id;
|
|
|
|
/*时间戳*/
|
|
ULONGLONG m_ullTimeStamp;
|
|
|
|
CPointSeriesManager* m_pSeriesManager;
|
|
|
|
/*原始的点序列*/
|
|
CArray<FACIESPOINT,FACIESPOINT> m_pointarray;
|
|
|
|
/* 插值平滑后的点序列,全部转换为图坐标*/
|
|
CArray<CPoint2D,CPoint2D> m_mappointarray;
|
|
|
|
/* 所有引用此点序列的CGDFSegment */
|
|
CTypedPtrArray<CPtrArray,CGDFSegment*> m_referencearray;
|
|
//Operations
|
|
public:
|
|
void BuildMapPointArray();
|
|
void Clear();
|
|
void CreateID(POINTSERIESID& id);
|
|
void IncreaseReference(CGDFSegment* pSegment);
|
|
void DecreaseReference(CGDFSegment* pSegment);
|
|
|
|
POINTSERIESID* GetID();
|
|
CPoint2D* GetMapPointArray();
|
|
FACIESPOINT* GetPointArray();
|
|
|
|
int GetPointCount();
|
|
void Initialize();
|
|
void InsertPoint(int index,CPoint2D point,BYTE smooth);
|
|
void InsertPoint(int index,CPoint2D* pointarray,int count,BYTE smooth);
|
|
void InsertPoint(int index,FACIESPOINT point);
|
|
void InsertPoint(int index,FACIESPOINT* pointarray,int count);
|
|
CPoint2D FPtoMP(FACIESPOINT yapoint);
|
|
FACIESPOINT MPtoFP(CPoint2D point);
|
|
|
|
CSize8 FPtoMP(CSize8 ysize);
|
|
CSize8 MPtoFP(CSize8 fsize);
|
|
BOOL SendInitializedMessage();
|
|
BOOL SendInvalidateMessage(int index0,int index1);
|
|
|
|
//向所有与此序列有关的Segment及Relative发送消息
|
|
BOOL SendMovePointMessage(int index0,int index1);
|
|
BOOL SendInsertPointMessage(int index0,int index1);
|
|
|
|
void SetPoint(CPoint2D point);
|
|
void SetPoint(CPoint2D point,BYTE smooth);
|
|
void SetPoint(int index,CPoint2D point);
|
|
void SetPoint(int index,CPoint2D point,BYTE smooth);
|
|
void SetPoint(FACIESPOINT point);
|
|
void SetPoint(int index,FACIESPOINT point);
|
|
void SetPoint(int index,double x,double y);
|
|
|
|
//void GetPoint(int index,FACIESPOINT& point);
|
|
void GetPoint(int index,double& x,double& y);
|
|
BOOL GetPoint(int index,CPoint2D& point);
|
|
|
|
//以下函数传入和返回的坐标值的坐标类型为图坐标
|
|
void SetPointArray(CPoint2D* pointarray,int count,BYTE smooth);
|
|
//以下函数不考虑点序列的坐标类型,传入和返回的坐标值与点序列的坐标类型一致
|
|
void SetPointArray(FACIESPOINT* pointarray,int count);
|
|
void SetPointAttribute(int index,BYTE byteValue,BYTE byteMask);
|
|
BYTE GetPointAttribute(int index,BYTE byteMask);
|
|
void SetPointAttribute(int index0,int index1,BYTE byteValue,BYTE byteMask);
|
|
void SetSeriesManager(CPointSeriesManager* pSeriesManager);
|
|
void Smooth();
|
|
|
|
void SmoothOneNode(int indexl,int index0,int index1,int index2,int indexr);
|
|
void SmoothOneNode(int index);
|
|
void SmoothThreeNode(int index);
|
|
void UpdateTimeStamp();
|
|
|
|
friend class CGDFSegment;
|
|
friend class CPointSeriesManager;
|
|
friend class CPointSeriesCreator;
|
|
|
|
};
|