/** * * @file FITKAbsGeomTools.h * @brief 抽象查询类声明 * @author LiBaojun (libaojunqd@foxmail.com) * @date 2024-08-18 * */ #ifndef _FITK_ABSTRACT_GEOM_TOOLS_H___ #define _FITK_ABSTRACT_GEOM_TOOLS_H___ #include "FITK_Kernel/FITKCore/FITKAbstractObject.hpp" #include "FITKInterfaceGeometryAPI.h" namespace Interface { class FITKAbsVirtualTopo; /** * @brief 点查询类 * @author LiBaojun (libaojunqd@foxmail.com) * @date 2024-08-18 */ class FITKInterfaceGeometryAPI FITKAbstractGeomPointTool : public Core::FITKAbstractObject { public: /** * @brief Construct a new FITKAbstractGeomPointTool object * @author LiBaojun (libaojunqd@foxmail.com) * @date 2024-08-18 */ explicit FITKAbstractGeomPointTool() = default; /** * @brief Destroy the FITKAbstractGeomPointTool object * @author LiBaojun (libaojunqd@foxmail.com) * @date 2024-08-18 */ virtual ~FITKAbstractGeomPointTool() = default; /** * @brief 创建点查询类 * @author LiBaojun (libaojunqd@foxmail.com) * @date 2024-08-18 * @return FITKAbstractGeomPointTool* */ static FITKAbstractGeomPointTool* createTool(); /** * @brief 获取点坐标 * @author LiBaojun (libaojunqd@foxmail.com) * @date 2024-08-18 * @param id 虚拓扑的id * @param xyz 点的坐标 * @return true 成功 * @return false 失败 */ virtual bool getXYZ(const int & id, double* xyz) = 0; /** * @brief 获取点坐标 * @author LiBaojun (libaojunqd@foxmail.com) * @date 2024-08-18 * @param vtp 虚拓扑对象 * @param xyz 点的坐标 * @return true 成功 * @return false 失败 */ virtual bool getXYZ(FITKAbsVirtualTopo* vtp, double* xyz) = 0; }; /** * @brief 平面信息查询工具。 * @author ChengHaotian (yeguangbaozi@foxmail.com) * @date 2024-09-05 */ class FITKInterfaceGeometryAPI FITKAbstractGeomPlaneFaceTool : public Core::FITKAbstractObject { public: /** * @brief 构造函数。 * @author ChengHaotian (yeguangbaozi@foxmail.com) * @date 2024-09-05 */ explicit FITKAbstractGeomPlaneFaceTool() = default; /** * @brief 析构函数。 * @author ChengHaotian (yeguangbaozi@foxmail.com) * @date 2024-09-05 */ virtual ~FITKAbstractGeomPlaneFaceTool() = default; /** * @brief 创建(实例化)工具方法。[静态] * @return 查询工具实例 * @author ChengHaotian (yeguangbaozi@foxmail.com) * @date 2024-09-05 */ static FITKAbstractGeomPlaneFaceTool* createTool(); /** * @brief 获取查询信息。[纯虚函数] * @param id:面虚拓扑ID(必须为平面)[引用] * @param pos:面中心点坐标 * @param normal:面法向 * @param up:面向上方向 * @return 是否为有效平面 * @author ChengHaotian (yeguangbaozi@foxmail.com) * @date 2024-09-05 */ virtual bool getPlane(const int & id, double* pos, double* normal, double* up) = 0; /** * @brief 获取查询信息。[纯虚函数] * @param vtp:面虚拓扑(必须为平面) * @param pos:面中心点坐标 * @param normal:面法向 * @param up:面向上方向 * @return 是否为有效平面 * @author ChengHaotian (yeguangbaozi@foxmail.com) * @date 2024-09-05 */ virtual bool getPlane(FITKAbsVirtualTopo* vtp, double* pos, double* normal, double* up) = 0; }; /** * @brief 抽象查询类生成器 * @author LiBaojun (libaojunqd@foxmail.com) * @date 2024-08-18 */ class FITKInterfaceGeometryAPI FITKAbstractGeomToolsCreator { public: /** * @brief Construct a new FITKAbstractGeomToolsCreator object * @author LiBaojun (libaojunqd@foxmail.com) * @date 2024-08-18 */ explicit FITKAbstractGeomToolsCreator() = default; /** * @brief Destroy the FITKAbstractGeomToolsCreator object * @author LiBaojun (libaojunqd@foxmail.com) * @date 2024-08-18 */ virtual ~FITKAbstractGeomToolsCreator() = 0; /** * @brief 创建点查询类 * @return FITKAbstractGeomPointTool* * @author LiBaojun (libaojunqd@foxmail.com) * @date 2024-08-18 */ virtual FITKAbstractGeomPointTool* createPointTool(); /** * @brief 创建平面信息查询工具。[虚函数] * @return 平面信息查询工具 * @author ChengHaotian (yeguangbaozi@foxmail.com) * @date 2024-09-05 */ virtual FITKAbstractGeomPlaneFaceTool* createPlaneFaceTool(); }; } #endif