diff options
author | Silc Renew <tokage.it.lab@gmail.com> | 2022-07-27 21:27:51 +0900 |
---|---|---|
committer | Silc Renew <tokage.it.lab@gmail.com> | 2022-07-27 23:22:50 +0900 |
commit | 4211e68d8019a757a54a435e1c4e240a784b463b (patch) | |
tree | e1b4cb53b126f8fa7808c8b43aa40205a8e6fa10 /core/math | |
parent | cc5135959b8d7956e93c566916352f5818f008f1 (diff) |
rename and unify notation for spherical interpolation
Diffstat (limited to 'core/math')
-rw-r--r-- | core/math/quaternion.cpp | 2 | ||||
-rw-r--r-- | core/math/quaternion.h | 2 | ||||
-rw-r--r-- | core/math/transform_3d.cpp | 2 | ||||
-rw-r--r-- | core/math/transform_3d.h | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/core/math/quaternion.cpp b/core/math/quaternion.cpp index bb3b1ca63c..252c108166 100644 --- a/core/math/quaternion.cpp +++ b/core/math/quaternion.cpp @@ -183,7 +183,7 @@ Quaternion Quaternion::slerpni(const Quaternion &p_to, const real_t &p_weight) c invFactor * from.w + newFactor * p_to.w); } -Quaternion Quaternion::cubic_slerp(const Quaternion &p_b, const Quaternion &p_pre_a, const Quaternion &p_post_b, const real_t &p_weight) const { +Quaternion Quaternion::spherical_cubic_interpolate(const Quaternion &p_b, const Quaternion &p_pre_a, const Quaternion &p_post_b, const real_t &p_weight) const { #ifdef MATH_CHECKS ERR_FAIL_COND_V_MSG(!is_normalized(), Quaternion(), "The start quaternion must be normalized."); ERR_FAIL_COND_V_MSG(!p_b.is_normalized(), Quaternion(), "The end quaternion must be normalized."); diff --git a/core/math/quaternion.h b/core/math/quaternion.h index 684e7cb091..cb54a6f540 100644 --- a/core/math/quaternion.h +++ b/core/math/quaternion.h @@ -71,7 +71,7 @@ struct _NO_DISCARD_ Quaternion { Quaternion slerp(const Quaternion &p_to, const real_t &p_weight) const; Quaternion slerpni(const Quaternion &p_to, const real_t &p_weight) const; - Quaternion cubic_slerp(const Quaternion &p_b, const Quaternion &p_pre_a, const Quaternion &p_post_b, const real_t &p_weight) const; + Quaternion spherical_cubic_interpolate(const Quaternion &p_b, const Quaternion &p_pre_a, const Quaternion &p_post_b, const real_t &p_weight) const; Vector3 get_axis() const; real_t get_angle() const; diff --git a/core/math/transform_3d.cpp b/core/math/transform_3d.cpp index 76b31daa76..c54d7bdd54 100644 --- a/core/math/transform_3d.cpp +++ b/core/math/transform_3d.cpp @@ -80,7 +80,7 @@ void Transform3D::set_look_at(const Vector3 &p_eye, const Vector3 &p_target, con origin = p_eye; } -Transform3D Transform3D::sphere_interpolate_with(const Transform3D &p_transform, real_t p_c) const { +Transform3D Transform3D::spherical_interpolate_with(const Transform3D &p_transform, real_t p_c) const { /* not sure if very "efficient" but good enough? */ Transform3D interp; diff --git a/core/math/transform_3d.h b/core/math/transform_3d.h index 25832434cd..938a749bbd 100644 --- a/core/math/transform_3d.h +++ b/core/math/transform_3d.h @@ -100,7 +100,7 @@ struct _NO_DISCARD_ Transform3D { void operator*=(const real_t p_val); Transform3D operator*(const real_t p_val) const; - Transform3D sphere_interpolate_with(const Transform3D &p_transform, real_t p_c) const; + Transform3D spherical_interpolate_with(const Transform3D &p_transform, real_t p_c) const; Transform3D interpolate_with(const Transform3D &p_transform, real_t p_c) const; _FORCE_INLINE_ Transform3D inverse_xform(const Transform3D &t) const { |