Добавление операций проверки состояний кватернионов и дуальных кватернионов, а также операций трансформации вектора с помощью rigid pose
This commit is contained in:
parent
dc759e61f7
commit
405af2f3a7
8 changed files with 152 additions and 32 deletions
|
|
@ -204,12 +204,12 @@ inline void bgc_fp64_turn3_swap(BGC_FP64_Turn3* const turn1, BGC_FP64_Turn3* con
|
|||
|
||||
inline int bgc_fp32_turn3_is_idle(const BGC_FP32_Turn3* const turn)
|
||||
{
|
||||
return turn->_versor.x1 * turn->_versor.x1 + turn->_versor.x2 * turn->_versor.x2 + turn->_versor.x3 * turn->_versor.x3 <= BGC_FP32_SQUARE_EPSILON;
|
||||
return bgc_fp32_quaternion_is_real(&turn->_versor);
|
||||
}
|
||||
|
||||
inline int bgc_fp64_turn3_is_idle(const BGC_FP64_Turn3* const turn)
|
||||
{
|
||||
return turn->_versor.x1 * turn->_versor.x1 + turn->_versor.x2 * turn->_versor.x2 + turn->_versor.x3 * turn->_versor.x3 <= BGC_FP64_SQUARE_EPSILON;
|
||||
return bgc_fp64_quaternion_is_real(&turn->_versor);
|
||||
}
|
||||
|
||||
// ================== Convert =================== //
|
||||
|
|
@ -333,7 +333,7 @@ inline void bgc_fp32_turn3_combine3(BGC_FP32_Turn3* const combination, const BGC
|
|||
{
|
||||
BGC_FP32_Quaternion product;
|
||||
|
||||
bgc_fp32_quaternion_multiply_by_quaternion(&product, &second->_versor, &first->_versor);
|
||||
_bgc_fp32_restrict_quaternion_multiply_by_quaternion(&product, &second->_versor, &first->_versor);
|
||||
|
||||
bgc_fp32_quaternion_multiply_by_quaternion(&combination->_versor, &third->_versor, &product);
|
||||
|
||||
|
|
@ -344,7 +344,7 @@ inline void bgc_fp64_turn3_combine3(BGC_FP64_Turn3* const combination, const BGC
|
|||
{
|
||||
BGC_FP64_Quaternion product;
|
||||
|
||||
bgc_fp64_quaternion_multiply_by_quaternion(&product, &second->_versor, &first->_versor);
|
||||
_bgc_fp64_restrict_quaternion_multiply_by_quaternion(&product, &second->_versor, &first->_versor);
|
||||
|
||||
bgc_fp64_quaternion_multiply_by_quaternion(&combination->_versor, &third->_versor, &product);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue