BIMHome v1.0.0
BIMHome接口文档说明
GeometryCalculate.h
浏览该文件的文档.
1/************************************************************************
2* @file GeometryCalculate.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_GEOMETRYCALCULATE_H
19#define BIMHOMEBASE_GEOMETRYCALCULATE_H
20
21#include "Base/Math/Geometry/Geometry.h"
22
23namespace Base
24{
25 class ArcofCircle;
26
32 class BaseExport GeometryCalculate
33 {
34 public:
40
46
47 public:
48
55 static std::shared_ptr<Geometry> geometryPtrToSharePtr(Geometry* obj);
56
63 static Geometry* sharePtrToGeometrPtr(std::shared_ptr<Geometry> obj);
64
71 static std::vector<std::shared_ptr<Geometry>> geometryPtrToSharePtrOfList(const std::vector<Geometry*>& objList);
72
79 static std::vector<Geometry*> sharePtrToGeometrPtrOfList(const std::vector<std::shared_ptr<Geometry>>& objList);
80
88 static void rotationGeometryList(std::vector<std::shared_ptr<Base::Geometry>>& geolist,
89 const Base::Vector3d& center,
90 double angle);
91
102 static void calcOffsetdata(std::vector<std::shared_ptr<Base::Geometry>> geolist, double& minx, double& miny, int dir);
103
114 static void calOffsetGeometry(double minx, double miny, int dir, std::vector<std::shared_ptr<Base::Geometry>> geolist);
115
124 static bool isPointOnArc(const Base::ArcofCircle& parc, const Base::Vector3d& pt);
125 };
126}
127
128#endif
Definition ArcofCircle.h:34
static std::vector< Geometry * > sharePtrToGeometrPtrOfList(const std::vector< std::shared_ptr< Geometry > > &objList)
批量转换共享指针列表为裸指针列表
static void rotationGeometryList(std::vector< std::shared_ptr< Base::Geometry > > &geolist, const Base::Vector3d &center, double angle)
对几何对象列表进行旋转变换
static void calcOffsetdata(std::vector< std::shared_ptr< Base::Geometry > > geolist, double &minx, double &miny, int dir)
计算几何列表的最小包围点并返回偏移量
static void calOffsetGeometry(double minx, double miny, int dir, std::vector< std::shared_ptr< Base::Geometry > > geolist)
根据左下角偏移量重置几何数据
~GeometryCalculate()
默认析构函数
static std::shared_ptr< Geometry > geometryPtrToSharePtr(Geometry *obj)
将裸指针转换为共享指针
static Geometry * sharePtrToGeometrPtr(std::shared_ptr< Geometry > obj)
将共享指针转换为裸指针
static std::vector< std::shared_ptr< Geometry > > geometryPtrToSharePtrOfList(const std::vector< Geometry * > &objList)
批量转换裸指针列表为共享指针列表
static bool isPointOnArc(const Base::ArcofCircle &parc, const Base::Vector3d &pt)
判断空间圆弧是否包含给定点
GeometryCalculate()
默认构造函数
提供几何对象的指针转换和几何变换功能的工具类
Definition GeometryCalculate.h:33
Definition Geometry.h:81
Definition BaseFigureFactory.h:24