BIMHome v1.0.0
BIMHome接口文档说明
PolyLine2D.h
浏览该文件的文档.
1/************************************************************************
2* @file PolyLine2D.h
3*
4* @brief 二维多段线
5*
6* @details 二维多段线
7*
8* @author lirf
9*
10* @version 1.0
11*
12* @date 2025-6-7
13*
14* @license 北京华科软科技有限公司
15*
16*************************************************************************/
17
18#ifndef BIMHOMEBASE_POLYLINE2D_H
19#define BIMHOMEBASE_POLYLINE2D_H
20
21#include "Base/Math/Geometry/Curve2D.h"
22
23namespace Base
24{
25 //多段线
26 class BaseExport PolyLine2D :public Curve2D
27 {
28 public:
30
36 PolyLine2D(const std::vector<std::shared_ptr<Curve2D>>& polyline);
37 virtual Geometry2D* copy(void) const;
38 std::vector<std::shared_ptr<Curve2D>> getPolyline()const;
39
45 void setPolyline(const std::vector<std::shared_ptr<Curve2D>>& curveVec);
46
47 int size();
48
55 bool getCurve(int nIndex, std::shared_ptr<Base::Curve2D>& curve);
56
57 bool isClosed();
58
59 double getLength();
60
61 private:
62 std::vector<std::shared_ptr<Curve2D>> mCurveVec;//构成多段线的曲线集合
63 };
64
65}
66
67#endif
Definition Curve2D.h:28
Definition Geometry2D.h:72
PolyLine2D(const std::vector< std::shared_ptr< Curve2D > > &polyline)
通过曲线指针集合构造二维多段线
std::vector< std::shared_ptr< Curve2D > > getPolyline() const
std::vector< std::shared_ptr< Curve2D > > mCurveVec
Definition PolyLine2D.h:62
bool getCurve(int nIndex, std::shared_ptr< Base::Curve2D > &curve)
获取二维多段线中指定索引的曲线段
virtual Geometry2D * copy(void) const
double getLength()
void setPolyline(const std::vector< std::shared_ptr< Curve2D > > &curveVec)
设置构成二维多段线的曲线指针集合
Definition PolyLine2D.h:27
Definition BaseFigureFactory.h:24