From 8556fdd4bc1560f03f70df08282b12464a4cdf04 Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Sat, 1 Oct 2022 21:53:12 -0500 Subject: Move EulerOrder enum to math_defs.h and global scope --- scene/3d/node_3d.cpp | 2 +- scene/3d/node_3d.h | 2 +- scene/3d/remote_transform_3d.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'scene') diff --git a/scene/3d/node_3d.cpp b/scene/3d/node_3d.cpp index 1743fa1838..e2d68c36ff 100644 --- a/scene/3d/node_3d.cpp +++ b/scene/3d/node_3d.cpp @@ -393,7 +393,7 @@ Node3D::RotationEditMode Node3D::get_rotation_edit_mode() const { } void Node3D::set_rotation_order(RotationOrder p_order) { - Basis::EulerOrder order = Basis::EulerOrder(p_order); + EulerOrder order = EulerOrder(p_order); if (data.euler_rotation_order == order) { return; diff --git a/scene/3d/node_3d.h b/scene/3d/node_3d.h index 457f634c34..f6868209bb 100644 --- a/scene/3d/node_3d.h +++ b/scene/3d/node_3d.h @@ -100,7 +100,7 @@ private: struct Data { mutable Transform3D global_transform; mutable Transform3D local_transform; - mutable Basis::EulerOrder euler_rotation_order = Basis::EULER_ORDER_YXZ; + mutable EulerOrder euler_rotation_order = EulerOrder::YXZ; mutable Vector3 euler_rotation; mutable Vector3 scale = Vector3(1, 1, 1); mutable RotationEditMode rotation_edit_mode = ROTATION_EDIT_MODE_EULER; diff --git a/scene/3d/remote_transform_3d.cpp b/scene/3d/remote_transform_3d.cpp index ff05e88241..817ffbfec8 100644 --- a/scene/3d/remote_transform_3d.cpp +++ b/scene/3d/remote_transform_3d.cpp @@ -68,7 +68,7 @@ void RemoteTransform3D::_update_remote() { Transform3D our_trans = get_global_transform(); if (update_remote_rotation) { - n->set_rotation(our_trans.basis.get_euler_normalized(Basis::EulerOrder(n->get_rotation_order()))); + n->set_rotation(our_trans.basis.get_euler_normalized(EulerOrder(n->get_rotation_order()))); } if (update_remote_scale) { @@ -90,7 +90,7 @@ void RemoteTransform3D::_update_remote() { Transform3D our_trans = get_transform(); if (update_remote_rotation) { - n->set_rotation(our_trans.basis.get_euler_normalized(Basis::EulerOrder(n->get_rotation_order()))); + n->set_rotation(our_trans.basis.get_euler_normalized(EulerOrder(n->get_rotation_order()))); } if (update_remote_scale) { -- cgit v1.2.3