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.

97 lines
2.9 KiB
C

/**
*
* @file FITKVec3DAlg.h
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-04-19
*
*/
#ifndef __FITKVEC3D_ALG_H__
#define __FITKVEC3D_ALG_H__
#include "FITKVec3D.h"
#define FITK_PI 3.14159265358979323846
namespace Core
{
/**
* @brief a*aFac + b*bFac
* @param[i] a
* @param[i] b
* @param[i] aFac
* @param[i] bFac
* @return FITKPoint
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-04-19
*/
FITKPoint FITKCoreAPI Add(const FITKPoint& a, const FITKPoint& b,
const double aFac = 1.0, const double bFac = 1.0);
/**
* @brief a*aFac - b*bFac
* @param[i] a
* @param[i] b
* @param[i] aFac
* @param[i] bFac
* @return FITKPoint
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-04-19
*/
FITKPoint FITKCoreAPI Subtract(const FITKPoint& a, const FITKPoint& b,
const double aFac = 1.0, const double bFac = 1.0);
/**
* @brief
* @param[i] a
* @param[i] b
* @return FITKPoint
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-04-19
*/
FITKPoint FITKCoreAPI CrossProduct(const FITKPoint& a, const FITKPoint& b);
/**
* @brief
* @param[i] a
* @param[i] b
* @return FITKPoint
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-04-19
*/
double FITKCoreAPI DotProduct(const FITKPoint & a, const FITKPoint & b);
/**
* @brief PAxis
* @param[i] P
* @param[i] Axis 线
* @param[i] Angle
* @return FITKPoint
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-04-19
*/
FITKPoint FITKCoreAPI RotateAroundAxis(const FITKPoint& P, FITKVec3D& Axis, double Angle);
/**
* @brief
* @param[i] a
* @param[i] b
* @return double
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-04-19
*/
double FITKCoreAPI Distance(const FITKPoint& a, const FITKPoint& b);
/**
* @brief
* @param[i] v1
* @param[i] v2
* @return double
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-04-19
*/
double FITKCoreAPI AngleBetweenVec(const FITKVec3D& v1, const FITKVec3D& v2);
}
#endif