Move EulerOrder enum to math_defs.h and global scope

This commit is contained in:
Aaron Franke
2022-10-01 21:53:12 -05:00
parent 39cece382d
commit 8556fdd4bc
16 changed files with 105 additions and 127 deletions

View File

@@ -44,7 +44,7 @@ real_t Quaternion::angle_to(const Quaternion &p_to) const {
// This implementation uses XYZ convention (Z is the first rotation).
Vector3 Quaternion::get_euler_xyz() const {
Basis m(*this);
return m.get_euler(Basis::EULER_ORDER_XYZ);
return m.get_euler(EulerOrder::XYZ);
}
// get_euler_yxz returns a vector containing the Euler angles in the format
@@ -56,7 +56,7 @@ Vector3 Quaternion::get_euler_yxz() const {
ERR_FAIL_COND_V_MSG(!is_normalized(), Vector3(0, 0, 0), "The quaternion must be normalized.");
#endif
Basis m(*this);
return m.get_euler(Basis::EULER_ORDER_YXZ);
return m.get_euler(EulerOrder::YXZ);
}
void Quaternion::operator*=(const Quaternion &p_q) {