Переименование методов на распространённые названия
This commit is contained in:
parent
039b26305a
commit
b621191698
14 changed files with 192 additions and 192 deletions
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
// =================== Reset ==================== //
|
||||
|
||||
inline void bgc_fp32_slerp_reset(BGC_FP32_Slerp3* slerp)
|
||||
inline void bgc_fp32_slerp3_reset(BGC_FP32_Slerp3* slerp)
|
||||
{
|
||||
slerp->_cosine_weight.s0 = 1.0f;
|
||||
slerp->_cosine_weight.x1 = 0.0f;
|
||||
|
|
@ -22,7 +22,7 @@ inline void bgc_fp32_slerp_reset(BGC_FP32_Slerp3* slerp)
|
|||
slerp->radians = 0.0f;
|
||||
}
|
||||
|
||||
inline void bgc_fp64_slerp_reset(BGC_FP64_Slerp3* slerp)
|
||||
inline void bgc_fp64_slerp3_reset(BGC_FP64_Slerp3* slerp)
|
||||
{
|
||||
slerp->_cosine_weight.s0 = 1.0;
|
||||
slerp->_cosine_weight.x1 = 0.0;
|
||||
|
|
@ -39,54 +39,54 @@ inline void bgc_fp64_slerp_reset(BGC_FP64_Slerp3* slerp)
|
|||
|
||||
// ==================== Make ==================== //
|
||||
|
||||
void bgc_fp32_slerp_make(BGC_FP32_Slerp3* slerp, const BGC_FP32_Turn3* start, const BGC_FP32_Turn3* augment);
|
||||
void bgc_fp64_slerp_make(BGC_FP64_Slerp3* slerp, const BGC_FP64_Turn3* start, const BGC_FP64_Turn3* augment);
|
||||
void bgc_fp32_slerp3_make(BGC_FP32_Slerp3* slerp, const BGC_FP32_Turn3* start, const BGC_FP32_Turn3* augment);
|
||||
void bgc_fp64_slerp3_make(BGC_FP64_Slerp3* slerp, const BGC_FP64_Turn3* start, const BGC_FP64_Turn3* augment);
|
||||
|
||||
// ================= Make Full ================== //
|
||||
|
||||
inline void bgc_fp32_slerp_make_full(BGC_FP32_Slerp3* slerp, const BGC_FP32_Turn3* start, const BGC_FP32_Turn3* end)
|
||||
inline void bgc_fp32_slerp3_make_full(BGC_FP32_Slerp3* slerp, const BGC_FP32_Turn3* start, const BGC_FP32_Turn3* end)
|
||||
{
|
||||
BGC_FP32_Turn3 augment;
|
||||
|
||||
bgc_fp32_turn3_exclude(&augment, end, start);
|
||||
|
||||
bgc_fp32_slerp_make(slerp, start, &augment);
|
||||
bgc_fp32_slerp3_make(slerp, start, &augment);
|
||||
}
|
||||
|
||||
inline void bgc_fp64_slerp_make_full(BGC_FP64_Slerp3* slerp, const BGC_FP64_Turn3* start, const BGC_FP64_Turn3* end)
|
||||
inline void bgc_fp64_slerp3_make_full(BGC_FP64_Slerp3* slerp, const BGC_FP64_Turn3* start, const BGC_FP64_Turn3* end)
|
||||
{
|
||||
BGC_FP64_Turn3 augment;
|
||||
|
||||
bgc_fp64_turn3_exclude(&augment, end, start);
|
||||
|
||||
bgc_fp64_slerp_make(slerp, start, &augment);
|
||||
bgc_fp64_slerp3_make(slerp, start, &augment);
|
||||
}
|
||||
|
||||
// =============== Make Shortened =============== //
|
||||
|
||||
inline void bgc_fp32_slerp_make_shortened(BGC_FP32_Slerp3* slerp, const BGC_FP32_Turn3* start, const BGC_FP32_Turn3* end)
|
||||
inline void bgc_fp32_slerp3_make_shortened(BGC_FP32_Slerp3* slerp, const BGC_FP32_Turn3* start, const BGC_FP32_Turn3* end)
|
||||
{
|
||||
BGC_FP32_Turn3 augment;
|
||||
|
||||
bgc_fp32_turn3_exclude(&augment, end, start);
|
||||
bgc_fp32_turn3_shorten(&augment);
|
||||
|
||||
bgc_fp32_slerp_make(slerp, start, &augment);
|
||||
bgc_fp32_slerp3_make(slerp, start, &augment);
|
||||
}
|
||||
|
||||
inline void bgc_fp64_slerp_make_shortened(BGC_FP64_Slerp3* slerp, const BGC_FP64_Turn3* start, const BGC_FP64_Turn3* end)
|
||||
inline void bgc_fp64_slerp3_make_shortened(BGC_FP64_Slerp3* slerp, const BGC_FP64_Turn3* start, const BGC_FP64_Turn3* end)
|
||||
{
|
||||
BGC_FP64_Turn3 augment;
|
||||
|
||||
bgc_fp64_turn3_exclude(&augment, end, start);
|
||||
bgc_fp64_turn3_shorten(&augment);
|
||||
|
||||
bgc_fp64_slerp_make(slerp, start, &augment);
|
||||
bgc_fp64_slerp3_make(slerp, start, &augment);
|
||||
}
|
||||
|
||||
// =============== Get Phase Turn =============== //
|
||||
|
||||
inline void bgc_fp32_slerp_get_phase_turn(BGC_FP32_Turn3* turn, const BGC_FP32_Slerp3* slerp, const float phase)
|
||||
inline void bgc_fp32_slerp3_get_phase_turn(BGC_FP32_Turn3* turn, const BGC_FP32_Slerp3* slerp, const float phase)
|
||||
{
|
||||
const float angle = slerp->radians * phase;
|
||||
const float cosine = cosf(angle);
|
||||
|
|
@ -100,7 +100,7 @@ inline void bgc_fp32_slerp_get_phase_turn(BGC_FP32_Turn3* turn, const BGC_FP32_S
|
|||
bgc_fp32_turn3_set_quaternion(turn, &q);
|
||||
}
|
||||
|
||||
inline void bgc_fp64_slerp_get_phase_turn(BGC_FP64_Turn3* turn, const BGC_FP64_Slerp3* slerp, const double phase)
|
||||
inline void bgc_fp64_slerp3_get_phase_turn(BGC_FP64_Turn3* turn, const BGC_FP64_Slerp3* slerp, const double phase)
|
||||
{
|
||||
const double angle = slerp->radians * phase;
|
||||
const double cosine = cos(angle);
|
||||
|
|
@ -116,7 +116,7 @@ inline void bgc_fp64_slerp_get_phase_turn(BGC_FP64_Turn3* turn, const BGC_FP64_S
|
|||
|
||||
// ========= Get Phase Rotation Matrix ========== //
|
||||
|
||||
inline void bgc_fp32_slerp_get_phase_rotation_matrix(BGC_FP32_Matrix3x3* rotation_matrix, const BGC_FP32_Slerp3* slerp, const float phase)
|
||||
inline void bgc_fp32_slerp3_get_phase_rotation_matrix(BGC_FP32_Matrix3x3* rotation_matrix, const BGC_FP32_Slerp3* slerp, const float phase)
|
||||
{
|
||||
const float angle = slerp->radians * phase;
|
||||
const float cosine = cosf(angle);
|
||||
|
|
@ -130,7 +130,7 @@ inline void bgc_fp32_slerp_get_phase_rotation_matrix(BGC_FP32_Matrix3x3* rotatio
|
|||
bgc_fp32_quaternion_get_rotation_matrix(rotation_matrix, &q);
|
||||
}
|
||||
|
||||
inline void bgc_fp64_slerp_get_phase_rotation_matrix(BGC_FP64_Matrix3x3* rotation_matrix, const BGC_FP64_Slerp3* slerp, const double phase)
|
||||
inline void bgc_fp64_slerp3_get_phase_rotation_matrix(BGC_FP64_Matrix3x3* rotation_matrix, const BGC_FP64_Slerp3* slerp, const double phase)
|
||||
{
|
||||
const double angle = slerp->radians * phase;
|
||||
const double cosine = cos(angle);
|
||||
|
|
@ -146,7 +146,7 @@ inline void bgc_fp64_slerp_get_phase_rotation_matrix(BGC_FP64_Matrix3x3* rotatio
|
|||
|
||||
// ========== Get Phase Reverse Matrix ========== //
|
||||
|
||||
inline void bgc_fp32_slerp_get_phase_reverse_matrix(BGC_FP32_Matrix3x3* reverse_matrix, const BGC_FP32_Slerp3* slerp, const float phase)
|
||||
inline void bgc_fp32_slerp3_get_phase_reverse_matrix(BGC_FP32_Matrix3x3* reverse_matrix, const BGC_FP32_Slerp3* slerp, const float phase)
|
||||
{
|
||||
const float angle = slerp->radians * phase;
|
||||
const float cosine = cosf(angle);
|
||||
|
|
@ -160,7 +160,7 @@ inline void bgc_fp32_slerp_get_phase_reverse_matrix(BGC_FP32_Matrix3x3* reverse_
|
|||
bgc_fp32_quaternion_get_reverse_matrix(reverse_matrix, &q);
|
||||
}
|
||||
|
||||
inline void bgc_fp64_slerp_get_phase_reverse_matrix(BGC_FP64_Matrix3x3* reverse_matrix, const BGC_FP64_Slerp3* slerp, const double phase)
|
||||
inline void bgc_fp64_slerp3_get_phase_reverse_matrix(BGC_FP64_Matrix3x3* reverse_matrix, const BGC_FP64_Slerp3* slerp, const double phase)
|
||||
{
|
||||
const double angle = slerp->radians * phase;
|
||||
const double cosine = cos(angle);
|
||||
|
|
@ -176,7 +176,7 @@ inline void bgc_fp64_slerp_get_phase_reverse_matrix(BGC_FP64_Matrix3x3* reverse_
|
|||
|
||||
// ========== Get Phase Both Matrices =========== //
|
||||
|
||||
inline void bgc_fp32_slerp_get_phase_both_matrices(BGC_FP32_Matrix3x3* rotation_matrix, BGC_FP32_Matrix3x3* reverse_matrix, const BGC_FP32_Slerp3* slerp, const float phase)
|
||||
inline void bgc_fp32_slerp3_get_phase_both_matrices(BGC_FP32_Matrix3x3* rotation_matrix, BGC_FP32_Matrix3x3* reverse_matrix, const BGC_FP32_Slerp3* slerp, const float phase)
|
||||
{
|
||||
const float angle = slerp->radians * phase;
|
||||
const float cosine = cosf(angle);
|
||||
|
|
@ -190,7 +190,7 @@ inline void bgc_fp32_slerp_get_phase_both_matrices(BGC_FP32_Matrix3x3* rotation_
|
|||
bgc_fp32_quaternion_get_both_matrices(rotation_matrix, reverse_matrix, &q);
|
||||
}
|
||||
|
||||
inline void bgc_fp64_slerp_get_phase_both_matrices(BGC_FP64_Matrix3x3* rotation_matrix, BGC_FP64_Matrix3x3* reverse_matrix, const BGC_FP64_Slerp3* slerp, const double phase)
|
||||
inline void bgc_fp64_slerp3_get_phase_both_matrices(BGC_FP64_Matrix3x3* rotation_matrix, BGC_FP64_Matrix3x3* reverse_matrix, const BGC_FP64_Slerp3* slerp, const double phase)
|
||||
{
|
||||
const double angle = slerp->radians * phase;
|
||||
const double cosine = cos(angle);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue