MapLine.h
上传用户:bjslfz
上传日期:2022-07-25
资源大小:4430k
文件大小:1k
- /************************************************************
- 文件名: MapLine.h
-
- 作者: 谢婧 Version : 1.0 Date: 2008/05/26
-
- 类描述: 对多义线对象的管理
-
- 邮件地址:xiejing0707@163.com
- ***********************************************************/
- #ifndef _MAP_LINE_H_
- #define _MAP_LINE_H_
- #include "MapParts.h"
- class CMapLine:public CObject
- {
-
- DECLARE_DYNAMIC(CMapLine)
- public:
- CMapLine();
- CMapLine(CMapLine& mapline );
- ~CMapLine();
- //Attributes
- public:
- long GetCount();
- CMapRectangle GetExtent();
- void SetExtent(CMapRectangle& exent);
- CMapParts* GetParts(long lIndex);
- double GetLength();
- double Distance(CMapPoint& pt );
- double ptToSegment(CMapPoint& pt,CMapPoint& ptStart,CMapPoint& ptEnd);
- //operation
- public:
- void Add(CMapParts* pParts);
- void Set(long lIndex , CMapParts* pParts);
- void SetIndex(unsigned int uiIndex ) { m_uiIndex = uiIndex ; };
- unsigned int GetIndex() { return m_uiIndex; };
- void Remove(long lIndex);
- void Insert(long lndex , CMapParts* pParts);
- void Clear();
- CArray<CMapParts*,CMapParts*> m_Line; //存储点集合对象
- private:
- unsigned int m_uiIndex; //索引值
- CString m_csID;
- CMapRectangle m_Extent;
- };
- #endif //_MAP_LINE_H_