diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2016-05-06 23:38:08 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2016-05-06 23:38:08 +0200 |
commit | 4eab767a6fbc746f6a13e976b4e34d566e7cc4cd (patch) | |
tree | fb577113bcc70a23d88cfd74141030eb842edb4f /scene/3d/spatial.h | |
parent | e7f78cddc91696bd47b5e5400f0b4b4fd654fd6b (diff) | |
download | redot-engine-4eab767a6fbc746f6a13e976b4e34d566e7cc4cd.tar.gz |
Rotation APIs: Better exposure for degrees methods
Made public the various set/getters for rotations in degrees.
For consistency, renamed the exposed method names to remove the leading
underscore, and kept the old names with a deprecation warning.
Fixes #4511.
Diffstat (limited to 'scene/3d/spatial.h')
-rw-r--r-- | scene/3d/spatial.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scene/3d/spatial.h b/scene/3d/spatial.h index 50123b2d81..fdc9f95f0b 100644 --- a/scene/3d/spatial.h +++ b/scene/3d/spatial.h @@ -110,7 +110,8 @@ class Spatial : public Node { void _notify_dirty(); void _propagate_transform_changed(Spatial *p_origin); - void _set_rotation_deg(const Vector3& p_deg); + // Deprecated, should be removed in a future version. + void _set_rotation_deg(const Vector3& p_euler_deg); Vector3 _get_rotation_deg() const; void _propagate_visibility_changed(); @@ -144,11 +145,13 @@ public: Ref<World> get_world() const; void set_translation(const Vector3& p_translation); - void set_rotation(const Vector3& p_euler); + void set_rotation(const Vector3& p_euler_rad); + void set_rotation_deg(const Vector3& p_euler_deg); void set_scale(const Vector3& p_scale); Vector3 get_translation() const; Vector3 get_rotation() const; + Vector3 get_rotation_deg() const; Vector3 get_scale() const; void set_transform(const Transform& p_transform); |