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.
117 lines
3.4 KiB
C++
117 lines
3.4 KiB
C++
/**
|
|
*
|
|
* @file FITKAssInstanceTR.h
|
|
* @brief
|
|
* @author LiBaojun (libaojunqd@foxmail.com)
|
|
* @date 2024-03-29
|
|
*
|
|
*/
|
|
#ifndef _FITKINSTANCEASS_TR_H__
|
|
#define _FITKINSTANCEASS_TR_H__
|
|
|
|
#include "FITKAbstractAssInstance.h"
|
|
|
|
namespace Interface
|
|
{
|
|
/**
|
|
* @brief 装配实例
|
|
* @author LiBaojun (libaojunqd@foxmail.com)
|
|
* @date 2024-03-22
|
|
*/
|
|
class FITKInerfaceModelAPI FITKAssemblyInstanceTR : public FITKAbstractAssInstance
|
|
{
|
|
FITKCLASS(Interface, FITKAssemblyInstanceTR);
|
|
|
|
public:
|
|
explicit FITKAssemblyInstanceTR() = default;
|
|
virtual ~FITKAssemblyInstanceTR() = default;
|
|
/**
|
|
* @brief 设置平移参数
|
|
* @param[i] x 平移参数x
|
|
* @param[i] y 平移参数y
|
|
* @param[i] z 平移参数z
|
|
* @author LiBaojun (libaojunqd@foxmail.com)
|
|
* @date 2024-03-25
|
|
*/
|
|
void setTransform(const double x, const double y, const double z);
|
|
/**
|
|
* @brief 设置旋转轴
|
|
* @param[i] p1 旋转轴第一点
|
|
* @param[i] p2 旋转轴第二点
|
|
* @author LiBaojun (libaojunqd@foxmail.com)
|
|
* @date 2024-03-25
|
|
*/
|
|
void setRotateAxis(double* p1, double* p2);
|
|
/**
|
|
* @brief 设置旋转角度 角度制
|
|
* @param[i] a 转动角度 角度制
|
|
* @author LiBaojun (libaojunqd@foxmail.com)
|
|
* @date 2024-03-25
|
|
*/
|
|
void setAngle(double a);
|
|
/**
|
|
* @brief 获取平移参数
|
|
* @param[i] transform 平移参数
|
|
* @author LiBaojun (libaojunqd@foxmail.com)
|
|
* @date 2024-03-25
|
|
*/
|
|
void getTransfom(double* transform) const;
|
|
/**
|
|
* @brief 获取旋转轴线
|
|
* @param[o] p1 旋转轴第一点
|
|
* @param[o] p2 旋转轴第二点
|
|
* @author LiBaojun (libaojunqd@foxmail.com)
|
|
* @date 2024-03-25
|
|
*/
|
|
void getRotateAxis(double* p1, double* p2) const;
|
|
/**
|
|
* @brief 获取旋转角度
|
|
* @return double
|
|
* @author LiBaojun (libaojunqd@foxmail.com)
|
|
* @date 2024-03-25
|
|
*/
|
|
double getAngle() const;
|
|
|
|
/**
|
|
* @brief 获取点坐标
|
|
* @param[i] pointID 点ID
|
|
* @param[o] coor 节点坐标
|
|
* @param[i] modelIndex 模型索引,用于复合模型(一个模型包含多个子模型)
|
|
* @return bool 是否获取成功
|
|
* @author LiBaojun (libaojunqd@foxmail.com)
|
|
* @date 2024-04-19
|
|
*/
|
|
virtual bool getPointCoor(int pointID, double* coor, int modelIndex = 0) override;
|
|
|
|
private:
|
|
/**
|
|
* @brief 平移
|
|
* @author LiBaojun (libaojunqd@foxmail.com)
|
|
* @date 2024-03-25
|
|
*/
|
|
double _trans[3] = { 0.0, 0.0, 0.0 };
|
|
/**
|
|
* @brief 旋转轴第一点
|
|
* @author LiBaojun (libaojunqd@foxmail.com)
|
|
* @date 2024-03-25
|
|
*/
|
|
double _rotate1[3] = { 0.0, 0.0, 0.0 };
|
|
/**
|
|
* @brief 旋转轴第二点
|
|
* @author LiBaojun (libaojunqd@foxmail.com)
|
|
* @date 2024-03-25
|
|
*/
|
|
double _rotate2[3] = { 0.0, 0.0, 0.0 };
|
|
/**
|
|
* @brief 旋转角度
|
|
* @author LiBaojun (libaojunqd@foxmail.com)
|
|
* @date 2024-03-25
|
|
*/
|
|
double _angle = 0.0;
|
|
|
|
};
|
|
}
|
|
|
|
|
|
#endif
|