Добавление арифметических операций для дуальных кватернионов
This commit is contained in:
parent
b470a3194b
commit
b0b064de5a
24 changed files with 171 additions and 102 deletions
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef _BGC_DUAL_VECTOR3_H_INCLUDE_
|
||||
#define _BGC_DUAL_VECTOR3_H_INCLUDE_
|
||||
#ifndef _BGC_DUAL_VECTOR3_H_INCLUDED_
|
||||
#define _BGC_DUAL_VECTOR3_H_INCLUDED_
|
||||
|
||||
#include "./vector3.h"
|
||||
|
||||
|
|
@ -197,4 +197,18 @@ inline void bgc_fp64_dual_vector3_get_mean3(BGC_FP64_DualVector3* mean, const BG
|
|||
bgc_fp64_vector3_get_mean3(&mean->dual, &vector1->dual, &vector2->dual, &vector3->dual);
|
||||
}
|
||||
|
||||
// ============ Linear Interpolation ============ //
|
||||
|
||||
inline void bgc_fp32_dual_vector3_interpolate(BGC_FP32_DualVector3* interpolation, const BGC_FP32_DualVector3* quaternion1, const BGC_FP32_DualVector3* quaternion2, const float phase)
|
||||
{
|
||||
bgc_fp32_vector3_interpolate(&interpolation->real, &quaternion1->real, &quaternion2->real, phase);
|
||||
bgc_fp32_vector3_interpolate(&interpolation->dual, &quaternion1->dual, &quaternion2->dual, phase);
|
||||
}
|
||||
|
||||
inline void bgc_fp64_dual_vector3_interpolate(BGC_FP64_DualVector3* interpolation, const BGC_FP64_DualVector3* quaternion1, const BGC_FP64_DualVector3* quaternion2, const double phase)
|
||||
{
|
||||
bgc_fp64_vector3_interpolate(&interpolation->real, &quaternion1->real, &quaternion2->real, phase);
|
||||
bgc_fp64_vector3_interpolate(&interpolation->dual, &quaternion1->dual, &quaternion2->dual, phase);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue